/* ============================================================
   KEDAI KASIR — Design System Modern (Bootstrap 5.3 based)
  app.css  ·  Light & Dark mode  ·  Mobile friendly
   ============================================================ */

/* ============ 1. DESIGN TOKENS ============ */
:root {
  --font: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
          Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Brand */
  --primary: #ea580c;
  --primary-600: #dc4a04;
  --primary-soft: #fff1e7;
  --primary-ring: rgba(234, 88, 12, .28);

  /* Surfaces */
  --bg: #f4f6fb;
  --bg-grad: radial-gradient(1200px 500px at 85% -10%, #ffe8d9 0%, rgba(255,232,217,0) 60%),
             radial-gradient(900px 420px at -10% 110%, #e0ecff 0%, rgba(224,236,255,0) 55%);
  --card: #ffffff;
  --card-2: #f8fafc;
  --line: #e6e9f0;
  --line-2: #eef1f6;

  /* Text */
  --text: #17203a;
  --text-2: #475069;
  --muted: #8a92a6;

  /* Semantic */
  --green: #16a34a;
  --green-soft: #e9f9ef;
  --red: #dc2626;
  --red-soft: #fdeeee;
  --orange: #ea580c;
  --orange-soft: #fff1e7;
  --blue: #2563eb;
  --blue-soft: #e8effd;
  --purple: #7c3aed;
  --purple-soft: #f1eafd;
  --gray: #64748b;
  --gray-soft: #eef1f5;

  /* Sidebar */
  --sb-w: 264px;
  --sb-w-min: 78px;
  --sb-bg-1: #101828;
  --sb-bg-2: #1a2336;
  --sb-text: #c6cfdd;
  --sb-muted: #7e8aa0;
  --sb-line: rgba(255, 255, 255, .07);
  --sb-hover: rgba(255, 255, 255, .06);
  --sb-active: linear-gradient(135deg, #f97316, #ea580c);

  /* Effects */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-2: 0 8px 24px -6px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .05);
  --shadow-3: 0 24px 60px -12px rgba(16, 24, 40, .25);
  --ring: 0 0 0 4px var(--primary-ring);

  --topbar-h: 64px;
}

/* ---------- Dark mode ---------- */
html.dark {
  --bg: #0b1020;
  --bg-grad: radial-gradient(1200px 500px at 85% -10%, rgba(234, 88, 12, .14) 0%, rgba(234,88,12,0) 60%),
             radial-gradient(900px 420px at -10% 110%, rgba(37, 99, 235, .12) 0%, rgba(37,99,235,0) 55%);
  --card: #131a2c;
  --card-2: #1a2236;
  --line: #232d45;
  --line-2: #1e2740;
  --text: #e7ecf5;
  --text-2: #aab4c8;
  --muted: #76819a;

  --primary-soft: rgba(234, 88, 12, .16);
  --green-soft: rgba(22, 163, 74, .16);
  --red-soft: rgba(220, 38, 38, .18);
  --orange-soft: rgba(234, 88, 12, .16);
  --blue-soft: rgba(37, 99, 235, .18);
  --purple-soft: rgba(124, 58, 237, .18);
  --gray-soft: rgba(100, 116, 139, .2);

  --sb-bg-1: #0d1424;
  --sb-bg-2: #121a2c;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 8px 24px -6px rgba(0, 0, 0, .5);
  --shadow-3: 0 24px 60px -12px rgba(0, 0, 0, .6);
}

/* ============ 2. BASE ============ */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-600); }
code {
  font-family: var(--mono);
  font-size: .82em;
  background: var(--card-2);
  border: 1px solid var(--line);
  padding: .15em .45em;
  border-radius: 6px;
  color: var(--text-2);
}
h1, h2, h3, h4, h5, h6 { color: var(--text); font-weight: 700; letter-spacing: -.01em; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
::placeholder { color: var(--muted); opacity: 1; }

/* Scrollbar halus */
* { scrollbar-width: thin; scrollbar-color: rgba(125, 140, 165, .45) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(125, 140, 165, .4); border-radius: 99px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(125, 140, 165, .65); }
*::-webkit-scrollbar-track { background: transparent; }

.muted, .sub { color: var(--muted); }
.sub { font-size: .78rem; display: block; line-height: 1.45; }
.link { color: var(--primary); font-weight: 600; font-size: .85rem; }
.link:hover { text-decoration: underline; }
.empty { color: var(--muted); padding: 2.4rem 1rem; text-align: center; }
.empty.full { width: 100%; }

/* ============ 3. BUTTONS ============ */
.btn {
  --bs-btn-border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: .875rem;
  line-height: 1.2;
  border-radius: var(--r-sm);
  padding: .58rem 1.05rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(234, 88, 12, .55);
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, #fb8332, #f2660f);
  color: #fff;
  box-shadow: 0 6px 18px -4px rgba(234, 88, 12, .6);
}

.btn-outline {
  background: var(--card);
  border-color: var(--line);
  color: var(--text-2);
  box-shadow: var(--shadow-1);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.btn-ok {
  background: var(--green-soft);
  border-color: rgba(22, 163, 74, .35);
  color: var(--green);
}
.btn-ok:hover { background: var(--green); border-color: var(--green); color: #fff; }

.btn-danger {
  background: var(--red-soft);
  border-color: rgba(220, 38, 38, .3);
  color: var(--red);
}
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }

.btn-sm { padding: .38rem .72rem; font-size: .8rem; border-radius: 8px; }
.btn-lg { padding: .8rem 1.5rem; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; display: flex; }
.btn-icon { width: 40px; height: 40px; padding: 0; font-size: 1.05rem; border-radius: 10px; }

/* ============ 4. FORMS ============ */
.input, .form-control, .form-select {
  display: block;
  width: 100%;
  font-family: var(--font);
  font-size: .9rem;
  color: var(--text);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: .58rem .85rem;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  appearance: none;
  -webkit-appearance: none;
}
select.input, select.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238a92a6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 14px;
  padding-right: 2.1rem;
}
.input:focus, .form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
  background: var(--card);
  color: var(--text);
  outline: 0;
}
.input:hover, .form-control:hover { border-color: #c9d0dd; }
html.dark .input:hover, html.dark .form-control:hover { border-color: #3a4763; }

.field { margin-bottom: 1rem; }
.field > label, .form-label {
  display: block;
  font-weight: 600;
  font-size: .82rem;
  color: var(--text-2);
  margin-bottom: .35rem;
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.row-add { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .4rem; }

/* Switch modern */
.switch { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; user-select: none; font-weight: 600; font-size: .86rem; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span {
  width: 42px; height: 24px; flex: 0 0 auto;
  background: #cdd4e0;
  border-radius: 99px;
  position: relative;
  transition: background .2s ease;
}
html.dark .switch span { background: #3a4763; }
.switch span::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .2s ease;
}
.switch input:checked + span { background: linear-gradient(135deg, #f97316, #ea580c); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: var(--ring); }

/* ============ 5. BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .01em;
  line-height: 1;
  padding: .38em .7em;
  border-radius: 99px;
  border: 1px solid transparent;
  vertical-align: middle;
}
.badge.b-blue   { background: var(--blue-soft);   color: var(--blue);   border-color: rgba(37, 99, 235, .22); }
.badge.b-green  { background: var(--green-soft);  color: var(--green);  border-color: rgba(22, 163, 74, .25); }
.badge.b-orange { background: var(--orange-soft); color: var(--orange); border-color: rgba(234, 88, 12, .25); }
.badge.b-red    { background: var(--red-soft);    color: var(--red);    border-color: rgba(220, 38, 38, .25); }
.badge.b-purple { background: var(--purple-soft); color: var(--purple); border-color: rgba(124, 58, 237, .22); }
.badge.b-gray   { background: var(--gray-soft);   color: var(--gray);   border-color: rgba(100, 116, 139, .25); }
.badge-muted    { background: var(--gray-soft);   color: var(--gray); }

/* ============ 6. CARDS ============ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  margin-bottom: 1.25rem;
  overflow: hidden;
  color: var(--text);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.05rem 1.3rem;
  border-bottom: 1px solid var(--line-2);
}
.card-head h3 { margin: 0; font-size: 1.02rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.card-head p { margin: .2rem 0 0; font-size: .82rem; }
.card-body { padding: 1.3rem; }
.card-narrow { max-width: 720px; }
.banner {
  background: var(--blue-soft);
  border: 1px solid rgba(37, 99, 235, .25);
  color: var(--text-2);
  border-radius: var(--r);
  padding: .8rem 1.1rem;
  font-size: .86rem;
  margin-bottom: 1.25rem;
}
.warning-card {
  border-color: rgba(234, 88, 12, .35);
  background: linear-gradient(0deg, var(--card), var(--card)), var(--orange-soft);
}
.warning-card h3 { color: var(--orange); font-size: 1rem; }

/* ============ 7. TABLES ============ */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--line);
  --bs-table-hover-bg: var(--card-2);
  --bs-table-hover-color: var(--text);
  --bs-table-striped-bg: var(--card-2);
  --bs-table-striped-color: var(--text);
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: .88rem;
  color: var(--text);
}
.table thead th {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  background: var(--card-2);
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table tbody td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: var(--card-2); }
.table .r { text-align: right; }
.table .c { text-align: center; }
.empty-td { text-align: center; color: var(--muted); padding: 2.2rem 1rem !important; }
.menu-row { display: flex; align-items: center; gap: .8rem; min-width: 220px; }
.menu-row strong { display: block; font-size: .9rem; }
.p-thumb {
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: 12px;
  background: var(--primary-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  overflow: hidden;
  color: var(--primary);
}
.p-thumb-img { width: 100%; height: 100%; object-fit: cover; }
.p-info { min-width: 0; }
.act-row { display: inline-flex; gap: .35rem; flex-wrap: wrap; }

/* ============ 8. TOOLBAR / FILTERS ============ */
.toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.toolbar-title h2, .toolbar-title h3 { margin: 0 0 .15rem; font-size: 1.15rem; }
.toolbar-actions { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.filters { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.filters .input { width: auto; min-width: 130px; }
.filter-sep { color: var(--muted); }
.filter-gap { display: inline-block; width: .5rem; }

/* ============ 9. DROPDOWN CUSTOM (data-drop) ============ */
.drop { position: relative; display: inline-block; }
.drop-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1050;
  min-width: 230px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-3);
  padding: .4rem;
  display: none;
  animation: dropIn .16s ease;
}
.drop-menu.open { display: block; }
.drop-menu a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .8rem;
  border-radius: 9px;
  color: var(--text);
  font-size: .87rem;
  font-weight: 500;
}
.drop-menu a:hover { background: var(--primary-soft); color: var(--primary); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ============ 10. PAGER ============ */
.pager { display: flex; justify-content: center; gap: .35rem; padding: 1rem; flex-wrap: wrap; }
.pager .pg {
  min-width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 .5rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text-2);
  font-weight: 600;
  font-size: .85rem;
  transition: all .15s ease;
}
.pager a.pg:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.pager .pg.cur { background: linear-gradient(135deg, #f97316, #ea580c); border-color: transparent; color: #fff; }
.pager .pg.off { opacity: .4; cursor: default; }

/* ============ 11. LIVE INDICATOR ============ */
.tx-realtime {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(22, 163, 74, .25);
  border-radius: 99px;
  padding: .35rem .85rem;
  margin-bottom: 1rem;
}
.tx-realtime .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.6s ease infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); }
  70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* ============================================================
   12. APP SHELL — SIDEBAR + TOPBAR + CONTENT
   ============================================================ */
.app { min-height: 100vh; }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1029;
  background: rgba(9, 14, 26, .55);
  backdrop-filter: blur(2px);
  display: none;
}

.sidebar {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 1030;
  width: var(--sb-w);
  min-width: var(--sb-w);
  display: flex;
  flex-direction: column;
  color: var(--sb-text);
  background: linear-gradient(180deg, var(--sb-bg-1) 0%, var(--sb-bg-2) 100%);
  border-right: 1px solid var(--sb-line);
  box-shadow: 4px 0 24px rgba(6, 10, 22, .35);
  transition: transform .28s ease, width .25s ease;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px 220px at 0% 0%, rgba(249, 115, 22, .16) 0%, rgba(249,115,22,0) 70%);
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1.05rem 1.15rem;
  border-bottom: 1px solid var(--sb-line);
  position: relative;
}
.brand-img { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; }
.logo-badge {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px;
  background: var(--sb-active);
  color: #fff; font-weight: 800; font-size: 17px;
  box-shadow: 0 4px 12px -3px rgba(234, 88, 12, .6);
}
.brand-text { min-width: 0; line-height: 1.25; }
.brand-text strong { font-size: .92rem; color: #fff; letter-spacing: -.01em; }
.brand-text small { font-size: .72rem; color: var(--sb-muted); }

/* Nav */
.snav { padding: .9rem .75rem; }
.snav .nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--sb-text);
  font-size: .885rem;
  font-weight: 500;
  padding: .62rem .8rem;
  margin-bottom: .15rem;
  border-radius: 11px;
  border: 0;
  transition: all .16s ease;
  position: relative;
}
.snav .nav-link:hover { background: var(--sb-hover); color: #fff; }
.snav .nav-link.active {
  background: var(--sb-active);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px -6px rgba(234, 88, 12, .65);
}
.snav .nav-link.active .nav-ico { background: rgba(255, 255, 255, .18); color: #fff; }
.nav-ico {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .07);
  color: var(--sb-text);
  transition: all .16s ease;
}
.nav-ico svg { width: 17px; height: 17px; }
.nav-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-count { background: #fff; color: var(--primary); font-weight: 700; }
.nav-count-green { background: var(--green); color: #fff; }
.nav-count-orange { background: var(--orange); color: #fff; animation: navPulse 1.6s ease-in-out infinite; }
@keyframes navPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .nav-count-orange { animation: none; } }
.nav-lbl {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sb-muted);
  padding: .3rem .8rem .5rem;
}

/* Sidebar footer */
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--sb-line);
  padding: .9rem;
  position: relative;
}
.side-user { padding-bottom: .75rem; }
.avatar {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--sb-active);
  color: #fff; font-weight: 700;
  box-shadow: 0 3px 10px -3px rgba(234, 88, 12, .7);
}
.avatar-sm { width: 32px; height: 32px; font-size: .8rem; }
.side-user-txt { min-width: 0; line-height: 1.3; }
.side-user-txt strong { font-size: .84rem; color: #fff; display: block; }
.side-user-txt small { font-size: .72rem; color: var(--sb-muted); }
.side-actions { display: flex; flex-direction: column; gap: .5rem; }
.sidebar-foot .btn {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .14);
  color: var(--sb-text);
  font-size: .82rem;
}
.sidebar-foot .btn:hover { background: var(--sb-hover); border-color: rgba(255, 255, 255, .3); color: #fff; }
.sidebar-foot .side-logout:hover { background: rgba(220, 38, 38, .22); border-color: rgba(220, 38, 38, .55); color: #ffb4b4; }

/* ---- Main area ---- */
.main {
  min-height: 100vh;
  margin-left: var(--sb-w);
  display: flex;
  flex-direction: column;
  transition: margin-left .25s ease;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 1.5rem;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.page-title { font-size: 1.12rem; font-weight: 800; margin: 0; letter-spacing: -.015em; }
.topbar-right { display: flex; align-items: center; gap: .55rem; }
.topbar .btn-icon { background: var(--card); border-color: var(--line); color: var(--text-2); box-shadow: var(--shadow-1); }
.topbar .btn-icon:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.hamburger { border-radius: 10px; }

/* User dropdown (topbar) */
.user-btn {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .32rem .75rem .32rem .35rem;
  box-shadow: var(--shadow-1);
  transition: all .18s ease;
}
.user-btn:hover { border-color: var(--primary); }
.user-btn .avatar { width: 32px; height: 32px; font-size: .8rem; }
.user-btn .u-meta { text-align: left; line-height: 1.2; }
.user-btn .u-meta strong { display: block; font-size: .8rem; color: var(--text); }
.user-btn .u-meta small { font-size: .7rem; color: var(--muted); }
.dropdown-menu {
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-3);
  background: var(--card);
  padding: .4rem;
  min-width: 220px;
}
.dropdown-item {
  border-radius: 9px;
  padding: .55rem .8rem;
  font-size: .87rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.dropdown-item:hover { background: var(--primary-soft); color: var(--primary); }
.dropdown-item.text-muted { color: var(--muted); cursor: default; }
.dropdown-item.text-muted:hover { background: none; color: var(--muted); }
.dropdown-divider { border-color: var(--line); }

/* Content */
.content { flex: 1 0 auto; padding: 1.6rem 1.5rem 2.5rem; max-width: 1440px; width: 100%; margin: 0 auto; }

/* ---- Collapse desktop (nav-collapsed) ---- */
#app.nav-collapsed .sidebar { width: var(--sb-w-min); min-width: var(--sb-w-min); }
#app.nav-collapsed .main { margin-left: var(--sb-w-min); }
#app.nav-collapsed .brand { justify-content: center; padding-inline: .5rem; }
#app.nav-collapsed .brand-text,
#app.nav-collapsed .nav-text,
#app.nav-collapsed .nav-lbl,
#app.nav-collapsed .side-user-txt,
#app.nav-collapsed .st-txt { display: none; }
#app.nav-collapsed .snav .nav-link { justify-content: center; padding-inline: 0; }
#app.nav-collapsed .snav { padding-inline: .55rem; }
#app.nav-collapsed .side-user { justify-content: center; }
#app.nav-collapsed .sidebar-foot .btn { justify-content: center; padding-inline: 0; }

/* ---- Mobile (off-canvas) ---- */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-3); }
  .main { margin-left: 0 !important; }
  #app.nav-collapsed .sidebar { width: var(--sb-w); min-width: var(--sb-w); }
  #app.nav-collapsed .brand-text,
  #app.nav-collapsed .nav-text,
  #app.nav-collapsed .nav-lbl,
  #app.nav-collapsed .side-user-txt,
  #app.nav-collapsed .st-txt { display: block; }
  #app.nav-collapsed .snav .nav-link { justify-content: flex-start; padding-inline: .8rem; }
  .content { padding: 1.1rem .9rem 2rem; }
  .topbar { padding: .55rem .9rem; }
}

/* ============ 13. TOASTS ============ */
.toasts { position: fixed; bottom: 1rem; right: 1rem; z-index: 1080; display: flex; flex-direction: column; align-items: flex-end; }
#toasts .toast {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  min-width: 260px;
  max-width: 360px;
  margin-top: .6rem;
  padding: .85rem 1rem;
  border-radius: var(--r);
  font-size: .87rem;
  font-weight: 500;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  box-shadow: var(--shadow-3);
  animation: toastIn .28s cubic-bezier(.2, .9, .3, 1.2);
}
#toasts .toast.ok { border-left-color: var(--green); }
#toasts .toast.err { border-left-color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

.toast-snapshot {
  border-radius: var(--r) !important;
  border: 1px solid var(--line) !important;
  font-size: .88rem;
  box-shadow: var(--shadow-2) !important;
}

/* ============ 14. CUSTOM MODAL (.cmodal) ============ */
.cmodal {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(9, 14, 26, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow-y: auto;
}
.cmodal[hidden] { display: none !important; }
.modal-card {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  animation: modalIn .24s cubic-bezier(.2, .9, .3, 1.15);
  margin: auto;
}
.modal-card.modal-sm { max-width: 460px; }
.modal-card.modal-lg { max-width: 760px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.3rem;
  border-bottom: 1px solid var(--line-2);
}
.modal-head h3 { margin: 0; font-size: 1.02rem; }
.modal-x {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0;
  border-radius: 9px;
  background: var(--card-2);
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: all .15s ease;
}
.modal-x:hover { background: var(--red-soft); color: var(--red); }
.modal-body { padding: 1.3rem; overflow-y: auto; max-height: 68vh; }
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .55rem;
  flex-wrap: wrap;
  padding: 1rem 1.3rem;
  border-top: 1px solid var(--line-2);
  background: var(--card-2);
}
#modalWrap {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
  background: rgba(9, 14, 26, .55);
  backdrop-filter: blur(4px);
}
#modalWrap:not([hidden]) { display: block; }

/* ---- Opsi picker (tambahan & level pedas) ---- */
.opt-row {
  display: flex;
  align-items: center;
  gap: .7rem;
  background: var(--card-2);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: .65rem .85rem;
  margin-bottom: .5rem;
  cursor: pointer;
  transition: all .15s ease;
  font-size: .88rem;
}
.opt-row { cursor: pointer; }
.opt-row:hover { border-color: var(--primary); }
.opt-row:has(.opt-check:checked) { border-color: var(--primary); background: var(--primary-soft); }
.opt-check { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; flex: 0 0 auto; }
.opt-nm { flex: 1 1 auto; font-weight: 600; color: var(--text); }
.opt-nm-wrap { display: flex; align-items: center; gap: .7rem; flex: 1 1 auto; min-width: 0; cursor: pointer; }
.opt-pr { font-weight: 700; color: var(--primary); font-size: .82rem; font-variant-numeric: tabular-nums; }
/* stepper jumlah per tambahan (picker POS) */
.opt-qty-mini { display: inline-flex; align-items: center; gap: .25rem; flex: 0 0 auto; }
.opt-qbtn {
  width: 24px; height: 24px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--text); font: inherit; font-weight: 800; font-size: .85rem; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
}
.opt-qbtn:hover { border-color: var(--primary); color: var(--primary); }
.opt-qval { min-width: 20px; text-align: center; font-weight: 800; font-size: .85rem; color: var(--text); }
.opt-row.pd-opt { cursor: default; }
.opt-row.pd-opt:has(.opt-check:checked) { border-color: var(--line-2); background: var(--card-2); }
.pedas-ctrl { gap: .5rem; }

/* ---- Pilihan level nama (mode teks) di modal tambahan POS ---- */
.lv-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.lv-btns .lv-btn {
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--text-2);
  border-radius: 99px;
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 600;
  padding: .45rem 1rem;
  cursor: pointer;
  transition: all .16s ease;
}
.lv-btns .lv-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.lv-btns .lv-btn.active { border-color: var(--primary); background: var(--primary); color: #fff; }

/* ---- Foto produk (modal menu) ---- */
.pd-foto-row { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.pd-foto-prev {
  width: 84px; height: 84px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft);
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
  font-size: 1.9rem;
  color: var(--primary);
  overflow: hidden;
}
.pd-foto-prev img { width: 100%; height: 100%; object-fit: cover; }
.pd-foto-ctrl { flex: 1 1 auto; min-width: 0; }
.pd-foto-ctrl .input { font-size: .82rem; }
.pd-foto-img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Detail transaksi (modal) ---- */
.tx-cust { margin-bottom: 1rem; }
.tx-cust-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .45rem 0;
  border-bottom: 1px dashed var(--line-2);
  font-size: .84rem;
}
.tx-cust-row span { color: var(--muted); }
.tx-cust-row strong { color: var(--text); text-align: right; }
.tx-items { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1rem; }
.tx-items .nm { font-weight: 600; color: var(--text); }
.tx-totals {
  background: var(--card-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: .8rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .86rem;
}
.tx-totals > div { display: flex; justify-content: space-between; gap: 1rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tx-totals .tt {
  border-top: 1px dashed var(--line);
  padding-top: .45rem;
  margin-top: .2rem;
  font-weight: 800;
  font-size: .95rem;
  color: var(--primary);
}
.tl-lbl { display: block; font-weight: 600; margin-bottom: .25rem; }
.it-qty { color: var(--muted); flex: 0 0 auto; }
.it-nm { flex: 1 1 auto; }

/* ---- Berbagi link tracking ---- */
.pub-linkbox {
  background: var(--card-2);
  border: 1px dashed var(--line);
  border-radius: var(--r);
  padding: .9rem 1rem;
  font-size: .84rem;
}

/* ============================================================
   15. DASHBOARD — STAT CARDS + QUICK ACTIONS
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.cards-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.cards-grid-2 .card { margin-bottom: 0; }
.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 1.15rem 1.25rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -22px; top: -22px;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: var(--card-2);
  opacity: .8;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line); }
.stat-ico {
  width: 52px; height: 52px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.45rem;
  border-radius: 15px;
  z-index: 1;
}
.stat-ico.i-blue   { background: var(--blue-soft);   color: var(--blue); }
.stat-ico.i-green  { background: var(--green-soft);  color: var(--green); }
.stat-ico.i-orange { background: var(--orange-soft); color: var(--orange); }
.stat-ico.i-purple { background: var(--purple-soft); color: var(--purple); }
.stat-body { min-width: 0; z-index: 1; }
.stat-label { font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 1.42rem; font-weight: 800; color: var(--text); line-height: 1.25; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: .8rem; color: var(--muted); }
.quick-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.4rem; }

/* Mode toggle (Normal / Katalog) */
.mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 99px;
  box-shadow: var(--shadow-1);
  padding: .45rem .55rem .45rem 1.1rem;
  margin-bottom: 1.3rem;
}
.mode-label { font-size: .82rem; font-weight: 600; color: var(--text-2); }
.seg { display: inline-flex; background: var(--card-2); border-radius: 99px; padding: .28rem; gap: .25rem; }
.seg-btn {
  border: 0;
  background: transparent;
  border-radius: 99px;
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-2);
  padding: .42rem 1.05rem;
  cursor: pointer;
  transition: all .18s ease;
}
.seg-btn:hover { color: var(--primary); }
.seg-btn.active {
  background: var(--sb-active);
  color: #fff;
  box-shadow: 0 3px 10px -3px rgba(234, 88, 12, .6);
}
.banner-ready {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: linear-gradient(90deg, var(--green-soft), transparent 75%);
  border: 1px solid rgba(22, 163, 74, .35);
  border-radius: var(--r);
  padding: .8rem 1.1rem;
  font-size: .9rem;
  margin-bottom: 1.3rem;
}
/* hidden attribute harus menang atas display:flex (banner SIAP realtime beranda) */
.banner-ready[hidden] { display: none; }

/* Katalog mode */
.cat-hero {
  background: linear-gradient(135deg, #101828, #1f2a44 55%, #33255c);
  border-radius: var(--r-lg);
  color: #fff;
  padding: 2.6rem 1.5rem;
  text-align: center;
  margin-bottom: 1.6rem;
  position: relative;
  overflow: hidden;
}
.cat-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(500px 200px at 80% 0%, rgba(249, 115, 22, .35) 0%, transparent 70%);
}
.cat-hero-in { position: relative; max-width: 640px; margin: 0 auto; }
.cat-badge {
  display: inline-block;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #ffd9c0;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 600;
  padding: .35rem 1rem;
  margin-bottom: .9rem;
}
.cat-hero h1 { color: #fff; font-size: 1.65rem; margin: 0 0 .35rem; }
.cat-hero p { color: #b9c2d4; margin: 0 0 1.2rem; font-size: .9rem; }
.cat-hero-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.cat-hero-actions .btn-outline { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: #fff; box-shadow: none; }
.cat-hero-actions .btn-outline:hover { background: rgba(255,255,255,.16); border-color: #fff; color: #fff; }
.cat-sec { margin-bottom: 1.8rem; }
.cat-title { font-size: 1.08rem; margin: 0 0 .9rem; display: flex; align-items: center; gap: .5rem; }
.cat-title::before { content: ""; width: 4px; height: 20px; border-radius: 99px; background: var(--sb-active); }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .9rem;
}
.cat-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
}
.cat-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.cat-photo {
  height: 108px;
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--primary);
  font-weight: 800;
}
.cat-photo-img { width: 100%; height: 100%; object-fit: cover; }
.cat-info { padding: .7rem .85rem; }
.cat-name { font-weight: 700; font-size: .87rem; color: var(--text); }
.cat-price { color: var(--primary); font-weight: 800; font-size: .84rem; font-variant-numeric: tabular-nums; }

/* Laporan — chart harian */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 210px;
  padding: 1rem 1.2rem .6rem;
  overflow-x: auto;
}
.chart .bar {
  flex: 1 0 22px;
  max-width: 40px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: .3rem;
  min-width: 22px;
}
.chart .bar-val {
  width: 100%;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #fb923c, #ea580c);
  min-height: 2px;
  transition: height .3s ease, filter .15s ease;
}
.chart .bar:hover .bar-val { filter: brightness(1.15); }
.chart .bar-day { font-size: .64rem; color: var(--muted); font-weight: 600; }

/* ============================================================
   16. POS / KASIR
   ============================================================ */
.pos-cats { gap: .5rem; }
.chip {
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--text-2);
  border-radius: 99px;
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 600;
  padding: .45rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all .16s ease;
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.chip.active {
  background: var(--sb-active);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(234, 88, 12, .55);
}
.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: .75rem;
  align-content: start;
}
.menu-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .15rem;
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: var(--r);
  padding: .55rem;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: all .16s ease;
  min-height: 130px;
}
.menu-tile:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 22px -10px rgba(234, 88, 12, .45);
  transform: translateY(-2px);
}
.menu-tile .mt-img {
  width: 100%;
  height: 64px;
  object-fit: cover;
  border-radius: 9px;
  margin-bottom: .4rem;
}
.menu-tile .mt-nama {
  font-weight: 700;
  font-size: .83rem;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.menu-tile .mt-kat { font-size: .68rem; color: var(--muted); }
.menu-tile .mt-harga { font-size: .85rem; font-weight: 800; color: var(--primary); margin-top: auto; font-variant-numeric: tabular-nums; }

/* Cart */
.cart-items { display: flex; flex-direction: column; gap: .6rem; }
.cart-empty { text-align: center; color: var(--muted); padding: 2.6rem 1rem; }
.cart-empty.full { width: 100%; }
.cart-empty .icon { font-size: 2.6rem; opacity: .45; margin-bottom: .4rem; }
.cart-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  background: var(--card-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: .65rem .8rem;
  animation: toastIn .2s ease;
}
.ci-info { flex: 1 1 auto; min-width: 0; }
.ci-nama { font-weight: 700; font-size: .85rem; color: var(--text); }
.ci-opt { font-size: .72rem; color: var(--muted); }
.ci-harga { font-size: .78rem; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.qty-ctrl {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: .18rem;
  flex: 0 0 auto;
}
.qty-ctrl button {
  width: 26px; height: 26px;
  border: 0;
  border-radius: 50%;
  background: var(--card-2);
  color: var(--text-2);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all .15s ease;
}
.qty-ctrl button:hover { background: var(--sb-active); color: #fff; }
.qty-ctrl .qv { min-width: 26px; text-align: center; font-weight: 700; font-size: .85rem; color: var(--text); font-variant-numeric: tabular-nums; }
.ci-del {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
  width: 28px; height: 28px;
  border-radius: 8px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: all .15s ease;
}
.ci-del:hover { background: var(--red-soft); color: var(--red); }
.ci-edit {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1;
  width: 28px; height: 28px;
  border-radius: 8px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: all .15s ease;
}
.ci-edit:hover { background: var(--primary-soft); color: var(--primary); }

/* ============================================================
   17. DAPUR (KITCHEN)
   ============================================================ */
.kitchen-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.kitchen-head h3 { margin: 0 0 .15rem; font-size: 1.15rem; }
.kitchen-head p { margin: 0; }
.kdash { display: flex; gap: .5rem; }
.kitchen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.kcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--orange);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.kcard.k-card-proses { border-left-color: var(--orange); }
.kcard.k-card-baru { border-left-color: var(--blue); animation: kBaruIn .35s ease; }
@keyframes kBaruIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.kcard.k-card-siap { border-left-color: var(--green); }
.kcard-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.kcard-head .kno { font-size: 1.3rem; font-weight: 800; color: var(--text); letter-spacing: .02em; }
.kcard-time { font-size: .76rem; color: var(--muted); }
.kitems { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; flex: 1 1 auto; }
.kitems li {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  background: var(--card-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: .5rem .7rem;
  font-size: .86rem;
  transition: opacity .2s ease;
}
.kitems li label { display: flex; gap: .55rem; align-items: flex-start; cursor: pointer; flex: 1; }
.kitems li input[type="checkbox"] { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--green); cursor: pointer; flex: 0 0 auto; }
.kitems li.done { opacity: .55; }
.kitems li.done strong { text-decoration: line-through; }
.k-opt { display: block; font-size: .72rem; color: var(--orange); font-weight: 600; }
/* Catatan PER ITEM (v2.6.16): lebih tegas agar dapur tidak melewatkannya */
.k-opt.k-note-it { color: #b45309; font-weight: 800; }
html.dark .k-opt.k-note-it { color: #fbbf24; }
.k-cat { display: inline-block; font-size: .68rem; font-weight: 700; color: var(--muted); background: var(--gray-soft); border: 1px solid var(--line); border-radius: 999px; padding: 0 .5rem; margin-right: .35rem; vertical-align: 1px; }
.k-note {
  background: var(--orange-soft);
  border: 1px dashed rgba(234, 88, 12, .4);
  border-radius: 10px;
  padding: .5rem .75rem;
  font-size: .8rem;
  color: var(--text-2);
}
.k-alamat {
  background: #e7f1ff;
  border: 1px solid #b6d4fe;
  color: #084298;
  word-break: break-word;
}
.k-alamat a { color: #084298; font-weight: 700; }
html.dark .k-alamat { background: #14293f; border-color: #2c4a6e; color: #cfe2ff; }
html.dark .k-alamat a { color: #9ec5fe; }
/* Identitas pelanggan di kartu dapur: nama + badge Online, agar pesanan tidak tertukar */
.k-cust { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .95rem; margin: 2px 0 6px; color: var(--text); }
.k-cust b { font-weight: 800; }
.k-cust .badge { font-size: .66rem; padding: .14rem .5rem; }
/* Alamat kirim lebih menonjol: tebal & sedikit lebih besar dari catatan biasa */
.k-alamat { font-weight: 700; font-size: .85rem; }
.kcard-foot { display: flex; gap: .5rem; justify-content: space-between; flex-wrap: wrap; padding-top: .3rem; }

/* ============================================================
   18. PESANAN BARU (pb-*)
   ============================================================ */
.pb-list { display: flex; flex-direction: column; gap: .9rem; }
.pb-card {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 1.15rem 1.3rem;
}
.pb-main { flex: 1 1 260px; min-width: 0; }
.pb-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .5rem; }
.pb-head .nm { font-weight: 800; font-size: 1rem; color: var(--text); }
.pb-items { display: flex; flex-direction: column; gap: .3rem; }
.tx-item { font-size: .86rem; color: var(--text-2); display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--line-2); padding-bottom: .3rem; }
.tx-opt { font-size: .72rem; color: var(--muted); display: block; }
.tx-cust-row { font-size: .8rem; color: var(--muted); }
.pb-actions { display: flex; flex-direction: column; gap: .5rem; justify-content: center; }
.tx-link {
  font-size: .78rem;
  background: var(--card-2);
  border: 1px dashed var(--line);
  border-radius: 9px;
  padding: .45rem .7rem;
  color: var(--text-2);
  word-break: break-all;
}
.ready-line { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: var(--green-soft); border: 1px solid rgba(22,163,74,.3); border-radius: 12px; padding: .7rem 1rem; margin-bottom: .5rem; }

/* ============================================================
   19. STRUK (RECEIPT)
   ============================================================ */
.struk {
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--text);
  background: var(--card-2);
  border: 1px dashed var(--line);
  border-radius: var(--r);
  padding: 1.2rem;
  max-width: 340px;
  margin: 0 auto;
  line-height: 1.5;
}
.struk-brand { text-align: center; font-weight: 800; font-size: .95rem; }
.struk-sub { text-align: center; font-size: .72rem; color: var(--muted); }
.struk-line { border-top: 1px dashed var(--line); margin: .6rem 0; }
.struk-row { display: flex; justify-content: space-between; gap: 1rem; }
.struk-row.strong { font-weight: 800; font-size: .92rem; }
.struk-foot { text-align: center; font-size: .74rem; color: var(--muted); margin-top: .4rem; }
.struk-item { display: flex; justify-content: space-between; gap: .8rem; }
.struk-opt { font-size: .7rem; color: var(--muted); padding-left: .8rem; }

/* ============================================================
   20. BRAND UPLOAD / MEDIA PREVIEW
   ============================================================ */
.brand-upload-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.brand-upload {
  background: var(--card-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 1rem;
  text-align: center;
}
.media-prev {
  min-height: 72px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .6rem;
}
.brand-upload .input { font-size: .78rem; }

/* ============================================================
   21. LOGIN
   ============================================================ */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(900px 420px at 110% -10%, rgba(249, 115, 22, .25) 0%, rgba(249,115,22,0) 60%),
    radial-gradient(800px 400px at -10% 110%, rgba(37, 99, 235, .22) 0%, rgba(37,99,235,0) 55%),
    linear-gradient(160deg, #0c1222 0%, #111a30 55%, #16213c 100%);
}
.login-theme-btn {
  position: fixed;
  top: 1.1rem; right: 1.1rem;
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .2);
  color: #d7deeb;
  z-index: 5;
}
.login-theme-btn:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); color: #fff; }
.login-wrap { width: 100%; max-width: 430px; }
.login-card {
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 22px;
  box-shadow: 0 30px 80px -20px rgba(2, 6, 23, .7);
  overflow: hidden;
}
html.dark .login-card { background: rgba(19, 26, 44, .97); border-color: rgba(255, 255, 255, .08); }
.login-card .card-body { padding: 2.3rem 2.1rem; }
.login-logo { display: flex; justify-content: center; margin-bottom: 1rem; }
.login-logo .logo-badge { width: 64px; height: 64px; font-size: 26px; border-radius: 18px; }
.login-logo .brand-img { width: 64px; height: 64px; border-radius: 18px; }
.login-card h1 { text-align: center; font-size: 1.3rem; margin-bottom: .15rem; }
.login-sub { text-align: center; color: var(--muted); font-size: .85rem; margin-bottom: 1.5rem; }
.login-hint {
  margin-top: 1.4rem;
  font-size: .76rem;
  color: var(--muted);
  background: var(--card-2);
  border: 1px dashed var(--line);
  border-radius: var(--r);
  padding: .75rem .9rem;
  text-align: center;
}
.login-foot { text-align: center; color: #8b95ab; font-size: .76rem; margin-top: 1.2rem; }
.alert-err {
  background: var(--red-soft);
  border: 1px solid rgba(220, 38, 38, .35);
  color: var(--red);
  border-radius: var(--r-sm);
  padding: .7rem 1rem;
  font-size: .84rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* ============================================================
   22. BOOTSTRAP ALIGNMENT (modal/komponen BS di halaman)
   ============================================================ */
.modal-content {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-3);
}
.modal-header, .modal-footer { border-color: var(--line-2) !important; background: var(--card-2) !important; }
.modal-backdrop.show { opacity: .55; }

/* Pagination BS bila dipakai */
.pagination .page-link { border-radius: 10px; margin: 0 .15rem; border-color: var(--line); color: var(--text-2); }
.pagination .page-item.active .page-link { background: var(--sb-active); border-color: transparent; color: #fff; }

/* Utility */
.min-width-0 { min-width: 0; }
.mt-harga { font-weight: 800; }

/* ============ 23. RESPONSIVE DETAIL ============ */
@media (max-width: 575.98px) {
  .cards-grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .stat-card { flex-direction: column; align-items: flex-start; gap: .6rem; padding: 1rem; }
  .stat-value { font-size: 1.15rem; }
  .row-2 { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-actions { justify-content: flex-start; }
  .filters .input { min-width: 0; flex: 1 1 130px; }
  .pb-card { flex-direction: column; }
  .pb-actions { flex-direction: row; width: 100%; }
  .chart { height: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.banner-ok {
  border-color: rgba(22, 163, 74, .45);
  background: var(--green-soft);
}

/* ============ 24. HARDENING SIDEBAR (v2.1.0) ============
   Mencegah nav menu tampil 2 kolom / label terpotong:
   - .snav selalu 1 kolom tanpa wrap (tidak terpengaruh .nav flex-wrap Bootstrap)
   - saat off-canvas mobile terbuka (.sidebar.open), label SELALU tampil penuh
     walau app sedang dalam mode nav-collapsed (localStorage) */
.snav { flex-flow: column nowrap; width: 100%; }
.snav .nav-link { flex: 0 0 auto; width: 100%; max-width: 100%; }
.snav .nav-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 991.98px) {
  #app .sidebar.open { width: min(86vw, var(--sb-w)) !important; min-width: 0 !important; }
  #app.nav-collapsed .sidebar.open .brand-text,
  #app.nav-collapsed .sidebar.open .nav-text,
  #app.nav-collapsed .sidebar.open .nav-lbl,
  #app.nav-collapsed .sidebar.open .side-user-txt,
  #app.nav-collapsed .sidebar.open .st-txt { display: block !important; }
  #app.nav-collapsed .sidebar.open .snav .nav-link { justify-content: flex-start !important; padding-inline: .8rem !important; }
  .sidebar.open .nav-text { white-space: normal; word-break: break-word; }
  .sidebar.open .snav .nav-link { flex-wrap: nowrap; }
}
