:root {
  color-scheme: light dark;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Mam Duyuk Brand Tokens (Warm Gold + Warm Charcoal + Warm Stone Palette matching POS Web) */
  --gold: #FAD674;
  --gold-hover: #F5CB5C;
  --gold-deep: #D4A843;
  --gold-ink: #2D282A;

  --bg: light-dark(#F8F7F4, #0C0A09);
  --bg-elevated: light-dark(#F1EDE6, #141210);
  --surface: light-dark(#FFFFFF, #1C1917);
  --surface-subtle: light-dark(#F5F2EC, #24201D);
  --surface-hover: light-dark(#ECE8DF, #292524);

  --border: light-dark(#E8E4E1, #292524);
  --border-strong: light-dark(#D6D0CA, #44403C);

  --text: light-dark(#1C1917, #FAFAF9);
  --text-secondary: light-dark(#57534E, #A8A29E);
  --text-muted: light-dark(#78716C, #78716C);

  --gold-tint: light-dark(rgba(250, 214, 116, 0.24), rgba(250, 214, 116, 0.14));
  --gold-border: light-dark(rgba(212, 168, 67, 0.55), rgba(250, 214, 116, 0.36));

  --pill-active-bg: light-dark(#2D282A, #FAD674);
  --pill-active-fg: light-dark(#FFFFFF, #2D282A);

  --accent-badge-bg: light-dark(#2D282A, #FAD674);
  --accent-badge-fg: light-dark(#FAD674, #2D282A);

  --success: light-dark(#059669, #34D399);
  --success-bg: light-dark(#ECFDF5, rgba(16, 185, 129, 0.14));
  --success-border: light-dark(#A7F3D0, rgba(52, 211, 153, 0.32));

  --warning: light-dark(#B45309, #FBBF24);
  --warning-bg: light-dark(#FFFBEB, rgba(245, 158, 11, 0.14));
  --warning-border: light-dark(#FDE68A, rgba(251, 191, 36, 0.32));

  --danger: light-dark(#DC2626, #F87171);
  --danger-bg: light-dark(#FEF2F2, rgba(239, 68, 68, 0.14));
  --danger-border: light-dark(#FECACA, rgba(248, 113, 113, 0.32));

  --header-bg: light-dark(rgba(255, 255, 255, 0.92), rgba(28, 25, 23, 0.92));
  --overlay-bg: rgba(12, 10, 9, 0.72);
  --shadow-sm: light-dark(0 1px 2px rgba(28, 25, 23, 0.05), 0 1px 2px rgba(0, 0, 0, 0.38));
  --shadow-card: light-dark(0 4px 16px -4px rgba(45, 40, 42, 0.08), 0 8px 24px -6px rgba(0, 0, 0, 0.48));
  --shadow-float: light-dark(0 14px 32px -8px rgba(45, 40, 42, 0.25), 0 14px 32px -8px rgba(0, 0, 0, 0.75));

  --radius-sm: 9px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --scrollbar-thumb: light-dark(#A8A29E, #57534E);
  --scrollbar-track: transparent;
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);

  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

:root:has(> head > meta[name="color-scheme"][content="light"]) {
  color-scheme: light;
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  color-scheme: dark;
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
  }
  ::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
}

.skip-link:focus {
  left: 16px;
}

:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Inline SVG Icon Utility */
svg.md-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

svg.md-icon-xs {
  width: 12px;
  height: 12px;
}

svg.md-icon-sm {
  width: 14px;
  height: 14px;
}

svg.md-icon-md {
  width: 16px;
  height: 16px;
}

svg.md-icon-lg {
  width: 20px;
  height: 20px;
}

svg.md-icon-xl {
  width: 28px;
  height: 28px;
}

.ui-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Logo & Theme Toggle Light/Dark Swapping */
.brand-logo-dark,
.theme-icon-sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .brand-logo-light,
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-icon-moon {
    display: none;
  }
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .brand-logo-dark,
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-icon-sun {
    display: inline-flex;
  }
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) .brand-logo-light,
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-icon-moon {
  display: none;
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) .brand-logo-dark,
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-icon-sun {
  display: inline-flex;
}

/* ==========================================================================
   App Shell & POS-Aligned Compact Header
   ========================================================================== */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.site-header-inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'brand actions'
    'nav nav';
  gap: 8px 10px;
  align-items: center;
}

.header-brand-cluster {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.brand-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  border-radius: 10px;
}

.brand-logo-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
  overflow: hidden;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Custom Branch Picker Popover (No OS Blue Select Popup) */
.branch-dropdown {
  position: relative;
  max-width: 100%;
}

.branch-picker-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  max-width: 100%;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.branch-picker-pill:hover {
  border-color: var(--gold-deep);
  background: var(--surface-hover);
}

.branch-picker-icon {
  color: var(--gold-deep);
  display: inline-flex;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.branch-trigger-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 175px;
}

.branch-picker-chevron {
  display: inline-flex;
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.16s ease;
}

.branch-picker-pill[aria-expanded='true'] .branch-picker-chevron {
  transform: rotate(180deg);
}

.branch-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  min-width: 240px;
  max-width: calc(100vw - 28px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 5px;
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.branch-menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.14s ease;
}

.branch-menu-item:hover {
  background: var(--surface-hover);
}

.branch-menu-item.active {
  background: var(--gold-tint);
}

.branch-menu-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.branch-menu-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.branch-menu-code {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.branch-menu-check {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-deep);
  flex-shrink: 0;
}

.header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.sync-pill.offline {
  color: var(--warning);
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.8);
  }
}

.table-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--gold-tint);
  color: var(--text);
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s var(--ease-spring), background-color 0.16s ease, border-color 0.16s ease;
}

.table-badge:hover {
  background: var(--gold);
  color: var(--gold-ink);
  border-color: var(--gold-deep);
}

.table-badge:active {
  transform: scale(0.96);
}

.table-badge-icon {
  width: 13px;
  height: 13px;
  display: inline-flex;
  color: var(--gold-deep);
}

.table-badge:hover .table-badge-icon {
  color: var(--gold-ink);
}

.theme-toggle-btn {
  width: 31px;
  height: 31px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.14s var(--ease-spring);
}

.theme-toggle-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.theme-toggle-btn:active {
  transform: scale(0.92);
}

.theme-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}

/* Navigation Tabs (Compact POS Segmented Control) */
.nav-tabs {
  grid-area: nav;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: var(--radius-md);
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.14s var(--ease-spring), box-shadow 0.18s ease;
}

.nav-tab:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.nav-tab:active {
  transform: scale(0.97);
}

.nav-tab.active {
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(212, 168, 67, 0.25);
}

.nav-tab-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.nav-tab-icon svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   Main Workspace & Desktop 2-Pane Split
   ========================================================================== */
.workspace-shell {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 14px 92px;
  flex: 1;
}

.workspace-shell.is-menu-layout {
  max-width: 1300px;
}

.app-main {
  min-width: 0;
  animation: fade-rise 0.2s var(--ease-spring);
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.desktop-cart-panel {
  display: none;
}

@media (min-width: 1024px) {
  .site-header-inner {
    padding: 9px 22px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: 'brand nav actions';
    gap: 14px;
  }

  .nav-tabs {
    justify-self: center;
    min-width: 410px;
    max-width: 480px;
  }

  .nav-tab {
    padding: 7px 12px;
    font-size: 12.5px;
  }

  .workspace-shell {
    padding: 18px 22px 44px;
  }

  .workspace-shell.is-menu-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 336px;
    gap: 20px;
    align-items: start;
    padding-bottom: 40px;
  }

  .workspace-shell.is-menu-layout .desktop-cart-panel {
    display: block;
    position: sticky;
    top: 74px;
  }

  body:has(.workspace-shell.is-menu-layout) .floating-cart {
    display: none;
  }
}

@media (max-width: 520px) {
  .nav-tab {
    flex-direction: column;
    gap: 2px;
    padding: 6px 4px;
    font-size: 10.5px;
  }

  .branch-dropdown {
    width: 100%;
  }

  .branch-picker-pill {
    width: 100%;
    justify-content: flex-start;
  }

  .branch-trigger-label {
    max-width: none;
    flex: 1;
    text-align: left;
  }

  .sync-pill {
    display: none;
  }
}

/* ==========================================================================
   Menu Toolbar, Search, Sort & Pills (Compact POS Density & Unified Active Style)
   ========================================================================== */
.menu-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.search-sort-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.menu-search-box {
  position: relative;
  flex: 1 1 220px;
  min-width: 0;
}

.menu-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: inline-flex;
}

.menu-search-input {
  width: 100%;
  min-height: 38px;
  padding: 7px 36px 7px 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.menu-search-input::placeholder {
  color: var(--text-muted);
}

.menu-search-input:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 2px var(--gold-tint);
}

.menu-search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-search-clear:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.sort-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sort-pills::-webkit-scrollbar {
  display: none;
}

.sort-pill {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.sort-pill:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.sort-pill.active {
  background: var(--gold-tint);
  color: var(--text);
  border-color: var(--gold-deep);
  font-weight: 800;
}

.channel-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.channel-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.14s var(--ease-spring);
}

.channel-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.channel-btn:active {
  transform: scale(0.98);
}

.channel-btn.active {
  border-color: var(--gold-deep);
  background: var(--gold-tint);
  color: var(--text);
  font-weight: 800;
}

.channel-btn.is-locked {
  border-style: dashed;
  opacity: 0.72;
}

.channel-qr-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.cat-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 3px;
  scrollbar-width: none;
}

.cat-pills::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.14s var(--ease-spring);
}

.cat-pill:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.cat-pill:active {
  transform: scale(0.96);
}

.cat-pill.active {
  background: var(--gold-tint);
  color: var(--text);
  border-color: var(--gold-deep);
  font-weight: 800;
}

/* ==========================================================================
   Shared Cards, Banners & Typography
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 8px;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.section-meta {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.closed-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.event-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--gold-tint);
  border: 1px solid var(--gold-border);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.promo-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 4px;
  scrollbar-width: none;
}

.promo-strip::-webkit-scrollbar {
  display: none;
}

.voucher-chip {
  flex: 0 0 auto;
  min-width: 215px;
  max-width: 260px;
  background: var(--surface);
  border: 1px dashed var(--gold-deep);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.voucher-chip-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.voucher-chip-meta {
  font-size: 10.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.bundle-card {
  flex: 0 0 auto;
  width: 245px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease-spring), border-color 0.18s ease, box-shadow 0.18s ease;
}

.bundle-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-deep);
  box-shadow: var(--shadow-card);
}

.bundle-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-badge-bg);
  color: var(--accent-badge-fg);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}

.bundle-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin-top: 5px;
}

.bundle-items {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.35;
}

.bundle-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--border);
}

.bundle-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.bundle-normal-price {
  font-size: 10.5px;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* ==========================================================================
   Product Grid & Compact POS Cards
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 640px) {
  .product-grid {
    gap: 14px;
  }
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-spring), border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-deep);
  box-shadow: var(--shadow-card);
}

.product-card.in-cart {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 1px var(--gold-deep), var(--shadow-sm);
}

.product-card.sold-out {
  opacity: 0.56;
  filter: grayscale(0.45);
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-subtle);
  overflow: hidden;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s var(--ease-spring);
}

.product-card:hover .product-img {
  transform: scale(1.04);
}

.product-img-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20%;
  background: radial-gradient(circle at 50% 45%, var(--gold-tint), var(--surface-subtle));
}

.product-img-fallback img {
  width: 56px;
  height: 56px;
  opacity: 0.72;
}

.product-badge-top {
  position: absolute;
  top: 7px;
  left: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(28, 25, 23, 0.86);
  color: #FAFAF9;
  backdrop-filter: blur(6px);
}

.product-badge-top.is-combo {
  background: var(--accent-badge-bg);
  color: var(--accent-badge-fg);
}

.product-badge-top.is-out {
  background: var(--danger);
  color: #FFFFFF;
}

.product-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: 8px;
}

.product-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.product-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
}

.product-price {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.product-stock {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.product-stock.low {
  color: var(--warning);
  font-weight: 700;
}

.btn-add {
  width: 100%;
  min-height: 33px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  background: var(--gold);
  color: var(--gold-ink);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.16s ease, transform 0.12s var(--ease-spring);
}

.btn-add:hover:not(:disabled) {
  background: var(--gold-hover);
}

.btn-add:active:not(:disabled) {
  transform: scale(0.96);
}

.btn-add:disabled {
  background: var(--surface-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: not-allowed;
}

.card-stepper {
  width: 100%;
  min-height: 33px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  background: var(--gold-tint);
  border: 1.5px solid var(--gold-deep);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.card-stepper-btn {
  height: 31px;
  border: 0;
  background: var(--gold);
  color: var(--gold-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 800;
  transition: background-color 0.14s ease;
}

.card-stepper-btn:hover:not(:disabled) {
  background: var(--gold-hover);
}

.card-stepper-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.card-stepper-qty {
  text-align: center;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
}

/* Full-width Empty & Skeleton States */
.empty-catalog-card,
.skeleton-wrap {
  grid-column: 1 / -1;
}

.empty-catalog-card {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 26px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.empty-catalog-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gold-tint);
  color: var(--gold-deep);
  border: 1px solid var(--gold-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.empty-catalog-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
}

.empty-catalog-desc {
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 390px;
  line-height: 1.5;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 768px) {
  .skeleton-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding-bottom: 10px;
}

.skeleton-block {
  background: linear-gradient(
    90deg,
    var(--surface-subtle) 25%,
    var(--surface-hover) 50%,
    var(--surface-subtle) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ==========================================================================
   Desktop Cart Sidebar (POS-style) & Mobile Floating Cart
   ========================================================================== */
.cart-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 94px);
}

.cart-sidebar-head {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface-subtle);
}

.cart-sidebar-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.cart-sidebar-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.cart-sidebar-body {
  padding: 12px 15px;
  overflow-y: auto;
  flex: 1;
}

.cart-sidebar-empty {
  padding: 20px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.cart-sidebar-empty-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--gold-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-sidebar-foot {
  padding: 12px 15px 15px;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
}

.sidebar-sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.sidebar-sum-row.is-total {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
  margin: 7px 0 10px;
  padding-top: 7px;
  border-top: 1px dashed var(--border-strong);
}

.floating-cart {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 45;
  padding: 0 14px;
  pointer-events: none;
}

.floating-cart-btn {
  pointer-events: auto;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(250, 214, 116, 0.35);
  background: #2D282A;
  color: #FAFAF9;
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-float);
  transition: transform 0.15s var(--ease-spring);
}

.floating-cart-btn:active {
  transform: scale(0.985);
}

.floating-cart-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.floating-cart-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(250, 214, 116, 0.16);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.floating-cart-icon svg {
  width: 16px;
  height: 16px;
}

.floating-cart-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.floating-cart-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.floating-cart-count {
  font-size: 12px;
  font-weight: 800;
}

.floating-cart-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.floating-cart-total {
  font-size: 13.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.floating-cart-cta {
  background: var(--gold);
  color: var(--gold-ink);
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 11px;
  border-radius: 8px;
}

/* ==========================================================================
   Buttons & Inputs (Compact & Crisp)
   ========================================================================== */
.btn-primary,
.btn-outline,
.btn-secondary {
  width: 100%;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  padding: 8px 14px;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.12s var(--ease-spring), opacity 0.16s ease;
}

.btn-primary {
  border: 0;
  background: var(--gold);
  color: var(--gold-ink);
}

.btn-primary:hover:not(:disabled) {
  background: var(--gold-hover);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.985);
}

.btn-primary:disabled {
  background: var(--surface-hover);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: not-allowed;
}

.btn-secondary {
  border: 1px solid var(--border-strong);
  background: var(--pill-active-bg);
  color: var(--pill-active-fg);
}

.btn-outline {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.btn-outline:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--gold-deep);
}

.btn-outline:active:not(:disabled) {
  transform: scale(0.985);
}

.btn-inline {
  width: auto;
  min-height: 32px;
  padding: 5px 11px;
  font-size: 11.5px;
  border-radius: var(--radius-sm);
}

.btn-icon-ghost {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  min-height: 28px;
  padding: 4px 9px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.btn-icon-ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.btn-danger-outline {
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn-danger-outline:hover:not(:disabled) {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.field-group {
  margin-bottom: 10px;
}

.field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.field-input,
.field-textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field-input:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 2px var(--gold-tint);
}

.field-textarea {
  min-height: 68px;
  resize: vertical;
}

/* ==========================================================================
   Cart Item Rows & Checkout Summary
   ========================================================================== */
.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-row:last-child {
  border-bottom: 0;
}

.cart-item-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
}

.cart-item-meta {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cart-item-price {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-subtle);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.qty-btn:hover {
  background: var(--gold);
  color: var(--gold-ink);
  border-color: var(--gold-deep);
}

.qty-val {
  min-width: 16px;
  text-align: center;
  font-weight: 800;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.pay-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.pay-option {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 10px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.pay-option input {
  display: none;
}

.pay-option:has(input:checked) {
  border-color: var(--gold-deep);
  background: var(--gold-tint);
}

.pay-option-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.pay-option-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.voucher-picker {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}

.voucher-pick-btn {
  width: 100%;
  border: 1px dashed var(--gold-deep);
  background: var(--gold-tint);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.voucher-pick-btn:hover {
  background: var(--gold);
  color: var(--gold-ink);
}

.summary-box {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.sum-row.total {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-strong);
  margin-bottom: 0;
}

.info-banner-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}

.info-banner-danger {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 8px;
}

.info-banner-success {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}

/* ==========================================================================
   Modals (Bottom Sheet on Mobile, Centered Card on Desktop)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--overlay-bg);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overscroll-behavior: contain;
  animation: fade-in 0.16s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  padding: 16px 16px max(20px, env(safe-area-inset-bottom));
  box-shadow: var(--shadow-float);
  animation: sheet-up 0.2s var(--ease-spring);
}

@keyframes sheet-up {
  from {
    transform: translateY(14px);
    opacity: 0.7;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 18px;
  }
  .modal-sheet {
    border-radius: 18px;
    padding: 18px;
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.modal-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.14s ease;
}

.modal-close:hover {
  background: var(--surface-hover);
}

.mod-group {
  margin-bottom: 12px;
}

.mod-group-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.mod-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 5px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.mod-opt:has(input:checked) {
  border-color: var(--gold-deep);
  background: var(--gold-tint);
}

.mod-opt-left {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
}

.mod-opt-price {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-secondary);
}

.table-grid-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.table-preset-btn {
  min-height: 34px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.table-preset-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.table-preset-btn.active {
  background: var(--gold-tint);
  color: var(--text);
  border-color: var(--gold-deep);
  font-weight: 800;
}

/* ==========================================================================
   Track Order (Responsive 2-Column Desktop + Stepper + QRIS Safe Ink)
   ========================================================================== */
.track-desktop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

@media (min-width: 960px) {
  .track-desktop-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 18px;
  }
}

.kk-subtabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.kk-subtab {
  min-height: 36px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.14s var(--ease-spring);
}

.kk-subtab:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.kk-subtab:active {
  transform: scale(0.98);
}

.kk-subtab.active {
  background: var(--gold-tint);
  color: var(--text);
  border-color: var(--gold-deep);
  font-weight: 800;
}

.track-subtabs-mobile {
  display: grid;
}

@media (min-width: 960px) {
  .track-subtabs-mobile {
    display: none;
  }
}

@media (max-width: 959px) {
  .track-pane-hide-mobile {
    display: none;
  }
}

.kk-track-hero {
  border-radius: var(--radius-xl);
  padding: 16px;
  color: #FAFAF9;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.kk-track-hero.is-pay {
  background: linear-gradient(135deg, #2D282A 0%, #3D2B1F 100%);
}

.kk-track-hero.is-pending {
  background: linear-gradient(135deg, #2D282A 0%, #423315 100%);
}

.kk-track-hero.is-cooking {
  background: linear-gradient(135deg, #2D282A 0%, #1F242B 100%);
}

.kk-track-hero.is-ready {
  background: linear-gradient(135deg, #064E3B 0%, #059669 100%);
}

.kk-track-hero.is-done {
  background: linear-gradient(135deg, #1C1917 0%, #292524 100%);
}

.kk-track-hero.is-cancelled {
  background: linear-gradient(135deg, #7F1D1D 0%, #B91C1C 100%);
}

.kk-track-hero.is-expired {
  background: linear-gradient(135deg, #44403C 0%, #57534E 100%);
}

.kk-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(250, 214, 116, 0.16);
  color: var(--gold);
  border: 1px solid rgba(250, 214, 116, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 800;
  margin-bottom: 8px;
}

.kk-hero-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.kk-hero-sub {
  font-size: 12px;
  opacity: 0.88;
  margin-top: 4px;
  line-height: 1.45;
}

.kk-hero-order {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.22);
  font-size: 11.5px;
  font-weight: 700;
}

.kk-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.kk-step {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 7px 5px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.56;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.kk-step.is-done {
  opacity: 0.96;
  background: rgba(250, 214, 116, 0.18);
  border-color: rgba(250, 214, 116, 0.45);
}

.kk-step.is-active {
  opacity: 1;
  background: var(--gold);
  color: var(--gold-ink);
  border-color: var(--gold);
  font-weight: 800;
}

.qris-box {
  background: var(--surface);
  border: 2px dashed var(--gold-deep);
  border-radius: var(--radius-xl);
  padding: 15px;
  text-align: center;
  margin-bottom: 12px;
}

.qris-countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
}

.qris-svg-wrap {
  display: inline-flex;
  background: #FFFFFF !important;
  color: #18181B !important;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #E5E7EB;
  margin: 10px auto;
}

.qris-svg-wrap svg {
  width: 196px;
  height: 196px;
  display: block;
}

.kk-cash-box {
  background: var(--warning-bg);
  border: 1.5px dashed var(--warning-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  text-align: center;
  margin-bottom: 12px;
}

.kk-wifi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kk-hist-item {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: border-color 0.16s ease, transform 0.12s var(--ease-spring);
}

.kk-hist-item:hover {
  border-color: var(--gold-deep);
}

.kk-hist-item.active {
  border-color: var(--gold-deep);
  background: var(--gold-tint);
}

.kk-hist-chip {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
}

.kk-hist-chip.is-green {
  background: var(--success-bg);
  color: var(--success);
}

.kk-hist-chip.is-amber {
  background: var(--warning-bg);
  color: var(--warning);
}

.kk-hist-chip.is-red {
  background: var(--danger-bg);
  color: var(--danger);
}

.kk-search-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.kk-search-row .field-input {
  flex: 1;
}

.kk-search-row .btn-secondary {
  width: auto;
  padding: 0 14px;
}

/* ==========================================================================
   Claim View & Auth Center Container
   ========================================================================== */
.focused-card-shell {
  max-width: 480px;
  margin: 4px auto 0;
}

.claim-hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px 16px;
  box-shadow: var(--shadow-card);
}

.claim-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gold-tint);
  color: var(--gold-deep);
  border: 1px solid var(--gold-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}

/* ==========================================================================
   Member VIP Card (3D Interactive) & Member Desktop Layout
   ========================================================================== */
.member-desktop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

@media (min-width: 960px) {
  .member-desktop-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 18px;
  }
}

.card-perspective-wrap {
  perspective: 1200px;
  margin-bottom: 10px;
}

.member-card-3d,
.digital-card-3d {
  position: relative;
  width: 100%;
  min-height: 204px;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}

.member-card-3d.flipped,
.digital-card-3d.is-flipped {
  transform: rotateY(180deg);
}

.digital-card-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-xl);
  padding: 16px;
  min-height: 204px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.digital-card-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
}

.card-tier-bronze {
  background: linear-gradient(135deg, #432818 0%, #7C4A27 52%, #2B170C 100%);
  color: #FEF3C7;
}

.card-tier-silver {
  background: linear-gradient(135deg, #292524 0%, #57534E 55%, #1C1917 100%);
  color: #F5F5F4;
}

.card-tier-gold {
  background: linear-gradient(135deg, #78350F 0%, #D97706 48%, #451A03 100%);
  color: #FEF9C3;
}

.card-tier-sultan,
.card-tier-platinum {
  background: linear-gradient(135deg, #1C1917 0%, #44403C 52%, #0C0A09 100%);
  color: #FAD674;
}

.card-tier-frozen {
  background: linear-gradient(135deg, #44403C 0%, #57534E 100%);
  color: #E7E5E4;
  filter: grayscale(0.45);
}

.card-glint {
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(circle at 80% 18%, rgba(250, 214, 116, 0.24), transparent 52%);
  pointer-events: none;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-brand-chip {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-tier-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.card-member-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 8px;
}

.card-member-id {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.85;
  margin-top: 2px;
}

.card-bottom-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.card-points-val {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.card-mag-stripe {
  height: 24px;
  margin: -4px -16px 6px;
  background: rgba(12, 10, 9, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.card-barcode-box {
  background: #FFFFFF !important;
  color: #18181B !important;
  padding: 7px 9px;
  border-radius: 10px;
  text-align: center;
  margin: 6px 0;
}

.barcode-lines {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 2px;
  height: 38px;
}

.barcode-line {
  background: #18181B;
  height: 100%;
}

.card-flip-hint-btn {
  width: 100%;
  margin-bottom: 10px;
}

.tier-progress-track {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  overflow: hidden;
  margin: 7px 0 5px;
}

.tier-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  transition: width 0.35s var(--ease-spring);
}

.wallet-card,
.bursa-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wallet-card {
  border-left: 4px solid var(--gold-deep);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-root {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 28px);
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}

.md-toast {
  background: #2D282A;
  color: #FAFAF9;
  border: 1px solid rgba(250, 214, 116, 0.35);
  border-radius: var(--radius-md);
  padding: 9px 13px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toast-in 0.2s var(--ease-spring);
}

.md-toast.is-success {
  border-left: 4px solid #34D399;
}

.md-toast.is-warn {
  border-left: 4px solid var(--gold);
}

.md-toast.is-error {
  border-left: 4px solid #F87171;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
