/* =========================================================
   CAFE KITA — DESIGN TOKENS
   Tema "desktop app": sidebar biru tua + aksen biru muda,
   kanvas konten putih-kebiruan, komponen rapat & presisi
   (bukan gaya landing page/web marketing).
   ========================================================= */
:root {
  /* -- Brand & aksen -- */
  --accent: #2f6fed;
  --accent-dark: #1e4fc4;
  --accent-soft: #dce8fd;

  /* -- Sidebar (shell aplikasi) -- */
  --sidebar-bg: #0b1730;
  --sidebar-bg-hover: #142a4d;
  --sidebar-bg-active: #1c3260;
  --sidebar-text: #93a6c9;
  --sidebar-text-active: #ffffff;
  --sidebar-border: #1c2b4a;

  /* -- Kanvas & permukaan -- */
  --canvas: #eef2f8;
  --surface: #ffffff;
  --border: #dde4ee;
  --border-strong: #c3cddc;

  /* -- Teks -- */
  --text: #0f1720;
  --text-muted: #667085;
  --text-faint: #98a2b3;

  /* -- Status -- */
  --success: #1a7f4e;
  --success-bg: #e3f5ea;
  --warning: #b8791e;
  --warning-bg: #faeed9;
  --danger: #b23b2e;
  --danger-bg: #f9e7e4;

  /* -- Bentuk -- */
  --radius: 8px;
  --radius-sm: 5px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(20, 16, 12, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 16, 12, 0.14);
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  padding-bottom: 80px;
}
.bg-light { background: var(--canvas); }
.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.small { font-size: 12.5px; }
a { text-decoration: none; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
code {
  background: var(--canvas); border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 5px; font-size: 12px;
}

/* =========================================================
   APP WINDOW (admin / kasir / dapur) — jendela aplikasi native,
   TANPA sidebar. Title bar + tab toolbar horizontal di atas.
   Full-screen & responsif: menyesuaikan lebar HP, tablet, laptop,
   sampai monitor besar (bukan kotak kecil mengambang di tengah).
   ========================================================= */
body.app-body {
  background: var(--canvas);
  min-height: 100vh;
}

.app-window {
  width: 100%;
  min-height: 100vh;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.window-titlebar {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px; background: var(--sidebar-bg); color: #fff;
}
.traffic-lights { display: flex; gap: 7px; flex-shrink: 0; }
.traffic-lights .dot { width: 11px; height: 11px; border-radius: 50%; }
.traffic-lights .dot.red { background: #ff5f57; }
.traffic-lights .dot.yellow { background: #febc2e; }
.traffic-lights .dot.green { background: #28c840; }
.window-title {
  flex: 1; text-align: center; font-size: 12.5px; font-weight: 600;
  color: #aebbd6; letter-spacing: 0.01em;
  margin-left: -54px; /* imbangi lebar traffic-lights biar judul center sungguhan */
}
.window-user { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.window-user .avatar {
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700;
}
.window-user .uname { font-size: 12px; color: #d7deec; }
.window-logout {
  color: #8fa0c2; padding: 4px 6px; border-radius: 5px; display: flex; align-items: center;
}
.window-logout:hover { background: rgba(255,255,255,0.1); color: #fff; }
.window-logout svg { width: 15px; height: 15px; }

.window-toolbar {
  display: flex; align-items: center; gap: 4px; padding: 9px 16px;
  background: var(--canvas); border-bottom: 1px solid var(--border); overflow-x: auto;
}
.tab-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 7px; font-size: 12.5px; font-weight: 600;
  color: var(--text-muted); white-space: nowrap; transition: background 0.12s ease, color 0.12s ease;
}
.tab-pill svg { width: 14px; height: 14px; opacity: 0.75; }
.tab-pill:hover { color: var(--text); background: rgba(15,23,32,0.04); }
.tab-pill.active {
  background: var(--surface); color: var(--accent-dark);
  box-shadow: 0 1px 3px rgba(15,23,42,0.1); border: 1px solid var(--border);
}
.tab-pill.active svg { opacity: 1; }

.window-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 0; max-width: 1500px; margin: 0 auto; width: 100%; box-sizing: border-box;
}
.window-header h1 { font-size: 18px; font-weight: 700; }
.window-header .topbar-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }

.window-content {
  padding: 20px 20px 40px; background: var(--surface); flex: 1;
  max-width: 1500px; margin: 0 auto; width: 100%; box-sizing: border-box;
}

/* HP: rapatkan padding */
@media (max-width: 700px) {
  .window-header { padding: 14px 16px 0; }
  .window-content { padding: 16px 16px 32px; }
  .window-title { margin-left: 0; text-align: left; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}

/* Tablet & laptop: padding sedikit lebih lega */
@media (min-width: 900px) {
  .window-header { padding: 22px 32px 0; }
  .window-content { padding: 24px 32px 48px; }
  .window-titlebar { padding: 12px 24px; }
  .window-toolbar { padding: 10px 24px; }
}

/* Monitor besar: padding makin lega biar konten tidak mepet tepi */
@media (min-width: 1400px) {
  .window-header { padding: 26px 44px 0; }
  .window-content { padding: 28px 44px 56px; }
}

/* =========================================================
   TOPBAR sederhana (dipakai di halaman pengunjung / login)
   ========================================================= */
.topbar {
  background: var(--sidebar-bg); color: #fff;
  position: sticky; top: 0; z-index: 20;
}
.topbar-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; max-width: 860px; margin: 0 auto;
}
.topbar .muted { color: #b9b0a3; }
.topbar .btn-outline { color: #fff; border-color: rgba(255,255,255,0.35); }
.topbar .btn-outline:hover { background: rgba(255,255,255,0.1); }

/* ---------- Menu Hero (header halaman pengunjung) ---------- */
.menu-hero {
  background: linear-gradient(135deg, var(--sidebar-bg) 0%, #16264a 70%, #1c3260 100%);
  color: #fff; position: sticky; top: 0; z-index: 20;
}
.menu-hero-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px; max-width: 860px; margin: 0 auto;
}
.menu-hero-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.menu-hero-icon {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
  background: rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.menu-hero-title { font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; }
.menu-hero-meja {
  display: flex; align-items: center; gap: 5px; font-size: 12px; color: #b9c4de; margin-top: 2px;
}
.menu-hero-meja svg { width: 12px; height: 12px; opacity: 0.85; }
.menu-hero-orders-btn {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); color: #fff;
  padding: 9px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background 0.12s ease;
}
.menu-hero-orders-btn:hover { background: rgba(255,255,255,0.2); }
.menu-hero-orders-btn svg { width: 15px; height: 15px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: none; border-radius: var(--radius-sm);
  padding: 9px 15px; font-size: 13.5px; cursor: pointer; font-weight: 600;
  transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease, transform 0.12s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text); }
.btn-outline:hover { background: var(--canvas); }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-block { width: 100%; }

/* ---------- Login ---------- */
.login-page {
  position: relative; min-height: 100vh; overflow: hidden;
  background: radial-gradient(ellipse at top left, #16264a 0%, #0b1730 55%, #060d1e 100%);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.login-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
}
.login-blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; pointer-events: none;
}
.blob-1 { width: 420px; height: 420px; background: #2f6fed; top: -120px; left: -100px; }
.blob-2 { width: 380px; height: 380px; background: #38bdf8; bottom: -140px; right: -80px; opacity: 0.35; }
.blob-3 { width: 260px; height: 260px; background: #6d5bd0; top: 40%; right: 12%; opacity: 0.25; }

.login-wrap { position: relative; z-index: 2; width: 100%; max-width: 372px; }
.login-card {
  background: var(--surface); padding: 34px 30px 26px; border-radius: 18px;
  box-shadow: 0 30px 70px rgba(3, 8, 20, 0.55), 0 2px 10px rgba(3,8,20,0.25);
  width: 100%; text-align: center; position: relative; overflow: hidden;
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), #38bdf8);
}
.login-icon {
  width: 54px; height: 54px; border-radius: 15px; margin: 0 auto 14px;
  background: linear-gradient(150deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 10px 22px rgba(47, 111, 237, 0.35);
}
.login-icon svg { width: 26px; height: 26px; }
.login-card h1 { font-size: 20px; }
.login-tagline { color: var(--text-muted); font-size: 12.5px; margin: 3px 0 20px; }
.login-card form { text-align: left; }
.login-card label { display: block; margin: 14px 0 5px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }

.input-icon-wrap { position: relative; }
.input-icon-wrap .input-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); display: flex; pointer-events: none;
}
.input-icon-wrap .input-icon svg { width: 15px; height: 15px; }
.input-icon-wrap input { padding-left: 34px !important; }

.login-submit { margin-top: 20px; padding: 11px; font-size: 14px; }

.login-roles {
  display: flex; justify-content: center; gap: 8px; margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--border);
}
.role-chip {
  display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--text-faint);
  background: var(--canvas); padding: 5px 10px; border-radius: 999px;
}
.role-chip svg { width: 12px; height: 12px; opacity: 0.8; }

.login-footnote { text-align: center; color: #5c6d90; font-size: 11.5px; margin-top: 18px; }

.login-card input, .card-form input, .card-form select, .card-form textarea,
.billing-form input, .billing-form select, .filter-row input {
  width: 100%; padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: inherit; background: #fff; color: var(--text);
}
.login-card input:focus, .card-form input:focus, .card-form select:focus, .card-form textarea:focus,
.billing-form input:focus, .billing-form select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.alert { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--success-bg); border: 1px solid #b9dfb9; font-size: 13px; }
.alert-error { background: var(--danger-bg); border-color: #eabbb3; color: var(--danger); }

/* ---------- Kategori tabs (halaman pengunjung) ---------- */
.kategori-tabs {
  position: sticky; top: 73px; background: #fff; z-index: 15; border-bottom: 1px solid var(--border);
}
.tabs-inner {
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px;
  max-width: 860px; margin: 0 auto;
}
.tab-btn {
  border: 1px solid var(--border-strong); background: #fff; padding: 7px 14px; border-radius: 999px;
  font-size: 13px; white-space: nowrap; cursor: pointer; font-weight: 500; flex-shrink: 0;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.tab-btn.active { background: var(--sidebar-bg); color: #fff; border-color: var(--sidebar-bg); }
.tab-btn:hover:not(.active) { border-color: var(--accent); color: var(--accent-dark); }

/* ---------- Menu list (halaman pengunjung) ---------- */
.menu-list { max-width: 860px; margin: 0 auto; padding: 8px 16px 90px; }
.kategori-section h3 { margin: 20px 0 10px; font-size: 15.5px; }
.kategori-section:first-child h3 { margin-top: 16px; }

.menu-grid { display: flex; flex-direction: column; gap: 10px; }

.menu-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.menu-thumb { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--canvas); }
.menu-thumb-placeholder { display: flex; align-items: center; justify-content: center; font-size: 24px; }
.menu-info { flex: 1; min-width: 0; }
.menu-nama { font-weight: 700; font-size: 13.5px; }
.menu-desc { display: block; margin-top: 2px; }
.menu-harga { color: var(--accent-dark); font-weight: 700; margin-top: 4px; font-size: 13.5px; }
.menu-card > .btn { flex-shrink: 0; }

.menu-card-habis { opacity: 0.55; }
.menu-card-habis .menu-thumb { filter: grayscale(1); }
.menu-habis-label { color: var(--danger); font-weight: 700; margin-top: 4px; font-size: 12px; }

/* Tombol tambah bulat + stepper qty */
.menu-add-wrap { flex-shrink: 0; }
.menu-add-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--accent); color: #fff;
  font-size: 20px; line-height: 1; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(47,111,237,0.35); transition: background 0.12s ease, transform 0.1s ease;
}
.menu-add-btn:hover { background: var(--accent-dark); }
.menu-add-btn:active { transform: scale(0.92); }

.menu-stepper {
  display: flex; align-items: center; gap: 2px; background: var(--accent); border-radius: 999px; padding: 3px;
  box-shadow: 0 3px 10px rgba(47,111,237,0.3);
}
.menu-stepper button {
  width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(255,255,255,0.18); color: #fff;
  font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.12s ease;
}
.menu-stepper button:hover { background: rgba(255,255,255,0.32); }
.menu-stepper .menu-stepper-qty { min-width: 20px; text-align: center; font-weight: 700; font-size: 13px; color: #fff; }

/* Tablet & laptop: menu jadi grid kartu vertikal (gambar di atas), lebih enak dipandang */
@media (min-width: 640px) {
  .menu-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px;
  }
  .menu-card {
    flex-direction: column; align-items: stretch; padding: 0; overflow: visible; position: relative;
  }
  .menu-thumb { width: 100%; height: 140px; border-radius: var(--radius) var(--radius) 0 0; }
  .menu-thumb-placeholder { font-size: 34px; }
  .menu-info { padding: 12px 14px 16px; }
  .menu-nama { font-size: 14.5px; }
  .menu-desc { min-height: 32px; }
  .menu-card > .btn { margin: 12px 14px 14px; }
  .menu-card:hover { box-shadow: 0 10px 24px rgba(15,23,42,0.1); border-color: var(--border-strong); transform: translateY(-2px); }

  /* Tombol tambah mengambang menimpa sudut kanan-bawah gambar */
  .menu-add-wrap { position: absolute; top: 122px; right: 12px; z-index: 2; }
}

@media (min-width: 900px) {
  .menu-hero-inner, .tabs-inner, .menu-list { max-width: 1040px; }
  .menu-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (min-width: 1400px) {
  .menu-hero-inner, .tabs-inner, .menu-list { max-width: 1320px; }
  .menu-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* ---------- Cart FAB ---------- */
.cart-fab {
  position: fixed; bottom: 16px; left: 16px; right: 16px; background: var(--sidebar-bg); color: #fff;
  border: none; border-radius: 999px; padding: 8px 10px 8px 8px; cursor: pointer; z-index: 30;
  box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 10px;
}
.cart-fab-icon {
  position: relative; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.14);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cart-fab-icon svg { width: 18px; height: 18px; }
.cart-fab-badge {
  position: absolute; top: -4px; right: -4px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  padding: 0 3px; border: 2px solid var(--sidebar-bg);
}
.cart-fab-text { flex: 1; text-align: left; font-weight: 700; font-size: 13.5px; }
.cart-fab-total { font-weight: 800; font-size: 14px; padding-right: 8px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(20,16,12,0.45); z-index: 50; display: flex; align-items: flex-end; }
.modal-content { background: #fff; width: 100%; max-height: 85vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 16px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.btn-close { background: none; border: none; font-size: 24px; cursor: pointer; line-height: 1; color: var(--text-muted); }
.cart-items { margin: 8px 0; }
.cart-item-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-btn { width: 27px; height: 27px; border-radius: 50%; border: 1px solid var(--border-strong); background: #fff; cursor: pointer; font-size: 15px; }
.cart-footer { margin-top: 12px; }
.cart-total-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14.5px; }
textarea#catatanOrder { width: 100%; padding: 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); margin-top: 8px; min-height: 60px; font-family: inherit; }

.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: var(--sidebar-bg); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 13px; z-index: 60;
}

.center-msg { padding: 60px 24px; text-align: center; }

/* ---------- Modal notifikasi meja sudah ada pesanan ---------- */
.occupied-modal-content { text-align: center; padding: 26px 22px; }
.occupied-icon {
  width: 52px; height: 52px; border-radius: 50%; background: var(--warning-bg); color: var(--warning);
  font-size: 24px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.occupied-modal-content h3 { font-size: 16.5px; }

/* ---------- Page content: kartu, tabel, grid ---------- */
.page-pad { padding: 16px; }
.meja-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.meja-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-align: center; background: var(--surface); max-width: 220px; }
.meja-minta-bill { border-color: var(--warning); background: var(--warning-bg); }
.meja-nomor { font-weight: 700; font-size: 15px; }

/* ---------- Kartu QR meja (admin/meja.php) — versi rapi dengan spacing lega ---------- */
.meja-qr-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 250px));
  gap: 18px; margin-top: 22px; justify-content: start;
}
.meja-qr-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.meja-qr-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.meja-qr-nomor { font-weight: 700; font-size: 15.5px; }
.meja-qr-image-wrap {
  display: flex; justify-content: center; padding: 14px; background: var(--canvas);
  border-radius: var(--radius); margin-bottom: 14px;
}
.meja-qr-image-wrap img { width: 160px; height: 160px; display: block; border-radius: 4px; background: #fff; }
.meja-qr-footer { display: flex; justify-content: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }

.add-meja-form { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.add-meja-field { flex: 1; min-width: 200px; }
.add-meja-field label { margin-top: 0; }
.add-meja-form .btn { flex-shrink: 0; }
.badge {
  display: inline-block; background: var(--success-bg); color: var(--success);
  padding: 3px 9px; border-radius: 4px; font-size: 11px; font-weight: 600; margin-top: 6px;
}
.badge-warning { background: var(--warning-bg); color: var(--warning); }

.table { width: 100%; border-collapse: collapse; margin-top: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.table th { background: var(--canvas); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #faf9f7; }

.order-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; background: var(--surface); }
.order-block-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 600; font-size: 13.5px; }
.order-block-header svg { width: 14px; height: 14px; vertical-align: -2px; opacity: 0.6; margin-right: 3px; }
.order-item-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13.5px; align-items: center; }
.qty-chip {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px;
  background: var(--canvas); border-radius: 5px; font-size: 11.5px; font-weight: 700; color: var(--text-muted);
  padding: 0 5px; margin-right: 4px;
}
.badge-danger { background: var(--danger-bg); color: var(--danger); }

/* =========================================================
   POS CHECKOUT LAYOUT (halaman billing kasir) — 2 kolom ala POS
   ========================================================= */
.pos-layout { display: flex; gap: 22px; align-items: flex-start; }
.pos-order-col { flex: 1; min-width: 0; }
.pos-payment-col { width: 320px; flex-shrink: 0; }
.pos-payment-panel {
  position: sticky; top: 88px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm);
}
.pos-subtotal-row {
  display: flex; justify-content: space-between; align-items: center; font-size: 14px;
  padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px dashed var(--border);
  color: var(--text-muted);
}
.pos-subtotal-row strong { color: var(--text); font-size: 15px; }

.ppn-toggle-row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; font-weight: 600; }
.switch { position: relative; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch-track {
  display: block; width: 38px; height: 22px; background: var(--border-strong); border-radius: 999px;
  position: relative; cursor: pointer; transition: background 0.15s ease;
}
.switch-thumb {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.15s ease;
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(16px); }

.pos-section-label { display: block; margin: 16px 0 8px; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }

.paymethod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.paymethod-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 1.5px solid var(--border); border-radius: var(--radius); padding: 12px 4px;
  cursor: pointer; font-size: 11.5px; font-weight: 600; color: var(--text-muted);
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.paymethod-tile input { position: absolute; opacity: 0; pointer-events: none; }
.paymethod-tile svg { width: 20px; height: 20px; opacity: 0.7; }
.paymethod-tile.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.paymethod-tile.active svg { opacity: 1; }

.pos-total-box {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--canvas); border-radius: var(--radius); padding: 14px 16px; margin: 18px 0 14px;
}
.pos-total-box span { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.pos-total-box strong { font-size: 22px; color: var(--accent-dark); letter-spacing: -0.02em; }

.pos-pay-btn { padding: 13px; font-size: 14.5px; }
.pos-pay-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.cash-calc-box {
  background: var(--canvas); border-radius: var(--radius); padding: 14px; margin-bottom: 14px;
}
.cash-calc-box .form-field { margin-bottom: 10px; }
.cash-kembalian-row {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 10px; border-top: 1px dashed var(--border); font-size: 13.5px; font-weight: 600;
}
.cash-kembalian-row strong { font-size: 17px; color: var(--success); }

@media (max-width: 800px) {
  .pos-layout { flex-direction: column; }
  .pos-payment-col { width: 100%; }
  .pos-payment-panel { position: static; }
}

/* =========================================================
   HALAMAN PESAN MANUAL KASIR (kasir/pesan.php)
   ========================================================= */
.kategori-tabs-inline { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.menu-grid-kasir { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.menu-pick-card {
  border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface);
  padding: 10px; text-align: left; cursor: pointer; display: flex; flex-direction: column;
  font-family: inherit; transition: box-shadow 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}
.menu-pick-card:hover { box-shadow: var(--shadow-sm); border-color: var(--accent); transform: translateY(-2px); }
.menu-pick-card:active { transform: translateY(0); }
.menu-pick-thumb { width: 100%; height: 90px; border-radius: 6px; object-fit: cover; background: var(--canvas); margin-bottom: 8px; }
.menu-pick-thumb.menu-thumb-placeholder { display: flex; align-items: center; justify-content: center; font-size: 26px; }
.menu-pick-nama { font-weight: 600; font-size: 12.5px; line-height: 1.3; }
.menu-pick-harga { color: var(--accent-dark); font-weight: 700; font-size: 12.5px; margin-top: 4px; }

.kasir-cart-items { max-height: 340px; overflow-y: auto; margin-bottom: 14px; }
.kasir-cart-items .cart-item-row { padding: 8px 0; }

/* ---------- Stepper status pesanan (halaman pengunjung) ---------- */
.order-stepper { display: flex; align-items: flex-start; padding: 6px 4px 14px; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.step-dot {
  width: 22px; height: 22px; border-radius: 50%; background: var(--border);
  display: flex; align-items: center; justify-content: center; z-index: 2;
  font-size: 11px; color: #fff; font-weight: 700; flex-shrink: 0;
}
.step-line {
  position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--border); z-index: 1;
}
.step:first-child .step-line { display: none; }
.step-label { font-size: 10.5px; color: var(--text-faint); margin-top: 6px; text-align: center; line-height: 1.2; }

.step.done .step-dot { background: var(--accent); }
.step.done .step-line { background: var(--accent); }
.step.done .step-label { color: var(--text); }
.step.active .step-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.step.active .step-label { color: var(--accent); font-weight: 700; }
.step.cancelled-badge { background: var(--danger-bg); color: var(--danger); padding: 8px 10px; border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 600; text-align: center; flex: 1; }
.total-row { display: flex; justify-content: space-between; padding: 12px 0; border-top: 2px solid var(--border); margin-top: 10px; font-size: 15.5px; }
.billing-form label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 12.5px; color: var(--text-muted); }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.checkbox-row input { width: auto; }

.card-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; width: 100%; box-shadow: var(--shadow-sm); }
.card-form h3 { font-size: 14.5px; margin-bottom: 4px; }
.card-form label { display: block; margin: 10px 0 5px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.card-form textarea { min-height: 70px; font-family: inherit; }

/* Grid responsif untuk field form: field pendek berjejer, field panjang (textarea/checkbox/tombol) full lebar */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 20px; align-items: start; }
.form-grid .form-field { display: flex; flex-direction: column; min-width: 0; }
.form-grid .form-full { grid-column: 1 / -1; }
.form-actions { margin-top: 18px; display: flex; gap: 8px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; align-items: center; gap: 12px; transition: box-shadow 0.15s ease, border-color 0.15s ease; }
.stat-card:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.stat-icon {
  width: 38px; height: 38px; border-radius: 9px; background: var(--canvas); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 18px; height: 18px; }
.stat-card-accent .stat-icon { background: var(--accent-soft); color: var(--accent-dark); }
.stat-card-warning { border-color: var(--warning); background: var(--warning-bg); }
.stat-card-warning .stat-icon { background: #fff; color: var(--warning); }
.stat-num { font-size: 19px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; line-height: 1.2; }
.stat-label { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

/* Kartu meja versi POS (kasir) - lebih visual dari meja-card biasa */
.meja-card-pos {
  display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: var(--surface); transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.meja-card-pos:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); border-color: var(--border-strong); }
.meja-card-pos.meja-minta-bill { border-color: var(--warning); background: var(--warning-bg); }
.meja-card-pos-top { display: flex; justify-content: space-between; align-items: center; }
.meja-nomor-pos { font-weight: 700; font-size: 14.5px; }
.meja-card-pos-total { font-size: 19px; font-weight: 700; color: var(--accent-dark); letter-spacing: -0.02em; }
.meja-card-pos-meta { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-muted); }
.meja-card-pos-meta span { display: flex; align-items: center; gap: 4px; }
.meja-card-pos-meta svg { width: 13px; height: 13px; opacity: 0.7; }

.meja-card-pos-statuses { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mini-status-badge {
  display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px; background: var(--success-bg); color: var(--success);
  border: 1px solid rgba(63, 125, 82, 0.15); line-height: 1.2; white-space: nowrap;
}
.mini-status-badge.mini-status-warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(184, 121, 30, 0.2); }
.meja-card-pos-actions { display: flex; gap: 6px; margin-top: 10px; }
.meja-card-pos-actions .btn {
  flex: 1; white-space: nowrap; display: flex; align-items: center; justify-content: center;
  padding-left: 8px; padding-right: 8px; overflow: hidden; text-overflow: ellipsis;
}

.meja-card-kosong {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 18px 10px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  color: var(--text-muted); text-align: center; transition: border-color 0.12s ease, background 0.12s ease;
}
.meja-card-kosong:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.meja-card-kosong svg { width: 22px; height: 22px; opacity: 0.6; margin-bottom: 2px; }

.metode-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.metode-pill svg { width: 14px; height: 14px; opacity: 0.7; }
.mono-code { font-family: 'Courier New', monospace; font-size: 12px; color: var(--text-muted); }

.terlaris-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.terlaris-nama { width: 160px; flex-shrink: 0; font-size: 13px; font-weight: 600; }
.terlaris-bar-wrap { flex: 1; height: 8px; background: var(--canvas); border-radius: 999px; overflow: hidden; }
.terlaris-bar { height: 100%; background: linear-gradient(90deg, var(--accent), #38bdf8); border-radius: 999px; }
.terlaris-qty { width: 40px; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }

.sumber-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.sumber-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.sumber-label { width: 190px; flex-shrink: 0; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.sumber-label svg { width: 15px; height: 15px; opacity: 0.7; color: var(--accent-dark); }
.sumber-jumlah { width: 70px; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }

.filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-row label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.filter-row input { width: auto; }

.section-title { font-size: 14.5px; font-weight: 700; margin: 24px 0 10px; }
.section-title:first-child { margin-top: 0; }

/* ---------- Kitchen board ---------- */
.kitchen-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.kitchen-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 0; overflow: hidden; box-shadow: var(--shadow-sm);
}
.kitchen-card.status-pending { border-top: 4px solid var(--danger); }
.kitchen-card.status-diproses { border-top: 4px solid var(--warning); }
.kitchen-card.status-siap { border-top: 4px solid var(--success); }

.kitchen-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px 0;
}
.kitchen-meja { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.kitchen-elapsed {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: var(--success-bg); color: var(--success);
}
.kitchen-elapsed.elapsed-warn { background: var(--warning-bg); color: var(--warning); }
.kitchen-elapsed.elapsed-urgent { background: var(--danger-bg); color: var(--danger); animation: pulse-urgent 1.4s infinite; }
@keyframes pulse-urgent { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.kitchen-subheader { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px 10px; border-bottom: 1px dashed var(--border); }

.kitchen-items { padding: 10px 14px; }
.kitchen-item { padding: 6px 0; font-size: 14.5px; font-weight: 600; }
.kitchen-item-qty {
  display: inline-flex; min-width: 24px; height: 22px; align-items: center; justify-content: center;
  background: var(--canvas); border-radius: 5px; font-size: 12.5px; font-weight: 800; color: var(--accent-dark);
  padding: 0 5px; margin-right: 6px;
}
.kitchen-item-note { font-size: 12px; color: var(--text-muted); font-weight: 500; padding-left: 30px; margin-top: 1px; }
.kitchen-note-global { margin: 0 14px 10px; padding: 8px 10px; background: var(--canvas); border-radius: var(--radius-sm); font-size: 12.5px; color: var(--text-muted); }

.kitchen-actions { display: flex; gap: 6px; padding: 0 14px 14px; flex-wrap: wrap; }
.kitchen-actions .btn { flex: 1; min-width: 100px; }

.kds-empty {
  grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--text-muted);
  font-size: 15px; font-weight: 600;
}

/* =========================================================
   STOK MENU (dapur/menu.php)
   ========================================================= */
.stok-menu-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.stok-menu-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.stok-menu-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--canvas); flex-shrink: 0; }
.stok-menu-thumb.menu-thumb-placeholder { display: flex; align-items: center; justify-content: center; font-size: 18px; }
.stok-menu-info { flex: 1; min-width: 0; }
.stok-menu-nama { font-weight: 600; font-size: 13.5px; }

.stok-toggle-btn {
  border: 1.5px solid var(--border); border-radius: 999px; padding: 8px 18px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; background: #fff; transition: all 0.12s ease; flex-shrink: 0; min-width: 112px; font-family: inherit;
}
.stok-toggle-btn.is-tersedia { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.stok-toggle-btn.is-habis { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.stok-toggle-btn:disabled { opacity: 0.6; cursor: wait; }

@media (min-width: 700px) {
  .modal { align-items: center; justify-content: center; }
  .modal-content { max-width: 420px; border-radius: 16px; }
  .cart-fab { max-width: 400px; left: 50%; transform: translateX(-50%); right: auto; }
}