/* ==========================================================================
   Crave Burger POS — Design System
   Industrial cashier UI · responsive · motion-aware
   ========================================================================== */

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

:root {
  --cb-ink: #161311;
  --cb-ink-soft: #3d3530;
  --cb-muted: #8a7f76;
  --cb-line: rgba(22, 19, 17, 0.1);
  --cb-surface: #f6f4f1;
  --cb-surface-2: #ffffff;
  --cb-panel: #1a1614;
  --cb-panel-2: #26201c;
  --cb-brand: #ff3b1f;
  --cb-brand-deep: #d92b12;
  --cb-accent: #ffb020;
  --cb-success: #1f9d6a;
  --cb-danger: #e11d48;
  --cb-info: #0ea5e9;
  --cb-shadow: 0 18px 50px rgba(22, 19, 17, 0.12);
  --cb-shadow-sm: 0 8px 24px rgba(22, 19, 17, 0.08);
  --cb-radius: 18px;
  --cb-radius-sm: 12px;
  --cb-radius-xs: 8px;
  --cb-sidebar: 260px;
  --cb-topbar: 68px;
  --cb-font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --cb-display: 'Oswald', 'Arial Narrow', sans-serif;
  --cb-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --cb-fast: 180ms;
  --cb-med: 320ms;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--cb-font);
  color: var(--cb-ink);
  background: var(--cb-surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* -------------------------------------------------------------------------- */
/* App shell                                                                  */
/* -------------------------------------------------------------------------- */

.cb-app {
  display: grid;
  grid-template-columns: var(--cb-sidebar) 1fr;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 0% -10%, rgba(255, 59, 31, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(255, 176, 32, 0.1), transparent 50%),
    var(--cb-surface);
}

.cb-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.25rem 1rem 1.5rem;
  background:
    linear-gradient(180deg, #221c18 0%, #14110f 100%);
  color: #f5f0ea;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 40;
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.18);
}

.cb-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.35rem 0.5rem;
  animation: cb-fade-up 0.6s var(--cb-ease) both;
}

.cb-brand__mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid rgba(255, 176, 32, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 59, 31, 0.15);
}

.cb-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.cb-brand__name {
  font-family: var(--cb-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cb-brand__tag {
  font-size: 0.7rem;
  color: rgba(245, 240, 234, 0.55);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cb-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.cb-nav__label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 240, 234, 0.4);
  margin: 0.75rem 0.65rem 0.35rem;
}

.cb-nav__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.78rem 0.9rem;
  border-radius: 12px;
  color: rgba(245, 240, 234, 0.78);
  font-weight: 600;
  font-size: 0.92rem;
  transition: background var(--cb-fast) var(--cb-ease), color var(--cb-fast), transform var(--cb-fast);
}

.cb-nav__link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transform: translateX(3px);
}

.cb-nav__link.is-active {
  background: linear-gradient(135deg, var(--cb-brand), #ff6a3d);
  color: #fff;
  box-shadow: 0 10px 28px rgba(255, 59, 31, 0.35);
}

.cb-nav__icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  opacity: 0.9;
}

.cb-sidebar__foot {
  padding: 0.85rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: rgba(245, 240, 234, 0.55);
  line-height: 1.45;
}

.cb-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.cb-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--cb-topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
  background: rgba(246, 244, 241, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--cb-line);
}

.cb-topbar__title {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.cb-topbar__title h1 {
  margin: 0;
  font-family: var(--cb-display);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.1;
}

.cb-topbar__title span {
  font-size: 0.78rem;
  color: var(--cb-muted);
  font-weight: 500;
}

.cb-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.cb-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--cb-line);
  border-radius: 12px;
  background: var(--cb-surface-2);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--cb-fast);
}

.cb-menu-toggle:active {
  transform: scale(0.96);
}

.cb-content {
  padding: 1.35rem 1.5rem 2rem;
  animation: cb-fade-up 0.55s var(--cb-ease) both;
}

.cb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 14, 0.45);
  z-index: 35;
  opacity: 0;
  transition: opacity var(--cb-med);
}

.cb-overlay.is-open {
  display: block;
  opacity: 1;
}

/* -------------------------------------------------------------------------- */
/* Landing (home)                                                             */
/* -------------------------------------------------------------------------- */

.cb-home {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(115deg, rgba(20, 16, 14, 0.88) 0%, rgba(20, 16, 14, 0.55) 42%, rgba(20, 16, 14, 0.82) 100%),
    url('img/background.avif') center / cover no-repeat fixed;
  color: #fff;
}

.cb-home__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  animation: cb-fade-down 0.6s var(--cb-ease) both;
}

.cb-home__hero {
  display: grid;
  align-content: center;
  gap: 1.75rem;
  padding: clamp(1.5rem, 5vw, 4rem);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.cb-home__brand {
  font-family: var(--cb-display);
  font-size: clamp(3.2rem, 10vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  animation: cb-fade-up 0.7s var(--cb-ease) 0.05s both;
}

.cb-home__brand em {
  font-style: normal;
  color: var(--cb-accent);
}

.cb-home__lead {
  max-width: 34rem;
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
  animation: cb-fade-up 0.7s var(--cb-ease) 0.12s both;
}

.cb-home__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  animation: cb-fade-up 0.7s var(--cb-ease) 0.2s both;
}

.cb-home__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
  animation: cb-fade-up 0.75s var(--cb-ease) 0.28s both;
}

.cb-home-card {
  position: relative;
  overflow: hidden;
  padding: 1.35rem 1.25rem 1.25rem;
  border-radius: var(--cb-radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--cb-med) var(--cb-ease), background var(--cb-med), border-color var(--cb-med), box-shadow var(--cb-med);
}

.cb-home-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 176, 32, 0.45);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.cb-home-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cb-brand), #ff7a45);
  box-shadow: 0 10px 24px rgba(255, 59, 31, 0.35);
}

.cb-home-card h3 {
  margin: 1rem 0 0.35rem;
  font-family: var(--cb-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cb-home-card p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.45;
}

.cb-home-card__go {
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cb-accent);
}

/* -------------------------------------------------------------------------- */
/* Cards / panels / forms                                                     */
/* -------------------------------------------------------------------------- */

.cb-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.cb-page-head h2 {
  margin: 0;
  font-family: var(--cb-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cb-page-head p {
  margin: 0.25rem 0 0;
  color: var(--cb-muted);
  font-size: 0.92rem;
}

.cb-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.cb-stat {
  background: var(--cb-surface-2);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-sm);
  padding: 1rem 1.1rem;
  box-shadow: var(--cb-shadow-sm);
  animation: cb-fade-up 0.5s var(--cb-ease) both;
}

.cb-stat:nth-child(2) { animation-delay: 0.05s; }
.cb-stat:nth-child(3) { animation-delay: 0.1s; }
.cb-stat:nth-child(4) { animation-delay: 0.15s; }

.cb-stat__label {
  font-size: 0.75rem;
  color: var(--cb-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cb-stat__value {
  margin-top: 0.35rem;
  font-family: var(--cb-display);
  font-size: 1.65rem;
  letter-spacing: 0.02em;
}

.cb-card {
  background: var(--cb-surface-2);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius);
  box-shadow: var(--cb-shadow-sm);
  padding: 1.25rem;
}

.cb-card + .cb-card {
  margin-top: 1rem;
}

.cb-card__title {
  margin: 0 0 1rem;
  font-family: var(--cb-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cb-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.cb-hub-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.4rem 1.25rem;
  min-height: 140px;
  border-radius: var(--cb-radius);
  background: var(--cb-surface-2);
  border: 1px solid var(--cb-line);
  box-shadow: var(--cb-shadow-sm);
  overflow: hidden;
  transition: transform var(--cb-med) var(--cb-ease), box-shadow var(--cb-med), border-color var(--cb-med);
}

.cb-hub-tile::after {
  content: '';
  position: absolute;
  inset: auto -20% -40% auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 59, 31, 0.16), transparent 70%);
  pointer-events: none;
}

.cb-hub-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 59, 31, 0.35);
  box-shadow: var(--cb-shadow);
}

.cb-hub-tile h3 {
  margin: 0;
  font-family: var(--cb-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cb-hub-tile p {
  margin: 0;
  color: var(--cb-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 28ch;
}

.cb-hub-tile__badge {
  width: fit-content;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cb-brand-deep);
  background: rgba(255, 59, 31, 0.1);
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
}

.cb-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.cb-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cb-field--full {
  grid-column: 1 / -1;
}

.cb-field label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cb-ink-soft);
}

.cb-field input,
.cb-field select,
.cb-field textarea,
.cb-input,
.cb-select {
  width: 100%;
  border: 1px solid var(--cb-line);
  background: #fff;
  border-radius: var(--cb-radius-xs);
  padding: 0.78rem 0.9rem;
  color: var(--cb-ink);
  outline: none;
  transition: border-color var(--cb-fast), box-shadow var(--cb-fast);
}

.cb-field input:focus,
.cb-field select:focus,
.cb-field textarea:focus,
.cb-input:focus,
.cb-select:focus {
  border-color: rgba(255, 59, 31, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 59, 31, 0.12);
}

.cb-field input[readonly] {
  background: #f0eeeb;
  color: var(--cb-ink-soft);
}

.cb-field input.is-invalid,
.cb-field .cb-input.is-invalid {
  border-color: var(--cb-danger);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.12);
}

.cb-field-error {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cb-danger);
  line-height: 1.3;
}

.cb-field-error[hidden] {
  display: none;
}

.cb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.cb-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: transform var(--cb-fast), box-shadow var(--cb-fast), background var(--cb-fast), color var(--cb-fast);
}

.cb-btn:active {
  transform: scale(0.97);
}

.cb-btn--primary {
  background: linear-gradient(135deg, var(--cb-brand), #ff6a3d);
  color: #fff;
  box-shadow: 0 12px 28px rgba(255, 59, 31, 0.32);
}

.cb-btn--primary:hover {
  box-shadow: 0 16px 34px rgba(255, 59, 31, 0.42);
}

.cb-btn--accent {
  background: var(--cb-accent);
  color: var(--cb-ink);
}

.cb-btn--ghost {
  background: transparent;
  border: 1px solid var(--cb-line);
  color: var(--cb-ink);
}

.cb-btn--ghost:hover {
  background: rgba(22, 19, 17, 0.04);
}

.cb-btn--dark {
  background: var(--cb-panel);
  color: #fff;
}

.cb-btn--success {
  background: var(--cb-success);
  color: #fff;
}

.cb-btn--danger {
  background: var(--cb-danger);
  color: #fff;
}

.cb-btn--sm {
  padding: 0.45rem 0.8rem;
  font-size: 0.8rem;
}

.cb-search {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.cb-search input {
  flex: 1;
  min-width: 200px;
}

/* -------------------------------------------------------------------------- */
/* Tables                                                                     */
/* -------------------------------------------------------------------------- */

.cb-table-wrap {
  overflow: auto;
  border-radius: var(--cb-radius-sm);
  border: 1px solid var(--cb-line);
  background: #fff;
}

.cb-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.cb-table th,
.cb-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--cb-line);
  font-size: 0.92rem;
}

.cb-table th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cb-muted);
  background: #faf8f6;
  font-weight: 700;
  position: sticky;
  top: 0;
}

.cb-table tbody tr {
  transition: background var(--cb-fast);
}

.cb-table tbody tr:hover {
  background: rgba(255, 59, 31, 0.04);
}

.cb-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--cb-muted);
}

.cb-empty strong {
  display: block;
  color: var(--cb-ink);
  margin-bottom: 0.35rem;
  font-family: var(--cb-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* -------------------------------------------------------------------------- */
/* POS layout                                                                 */
/* -------------------------------------------------------------------------- */

.cb-pos {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 1rem;
  align-items: start;
  min-height: calc(100vh - var(--cb-topbar) - 3rem);
}

.cb-pos__menu,
.cb-pos__cart {
  background: var(--cb-surface-2);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius);
  box-shadow: var(--cb-shadow-sm);
  overflow: visible;
}

.cb-pos__menu {
  display: flex;
  flex-direction: column;
  min-height: 70vh;
  overflow: hidden;
}

.cb-pos__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--cb-line);
  background: #faf8f6;
}

.cb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cb-chip {
  border: 1px solid var(--cb-line);
  background: #fff;
  color: var(--cb-ink-soft);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--cb-fast) var(--cb-ease);
}

.cb-chip:hover {
  border-color: rgba(255, 59, 31, 0.4);
}

.cb-chip.is-active {
  background: var(--cb-ink);
  color: #fff;
  border-color: var(--cb-ink);
}

.cb-pos__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.85rem;
  padding: 1rem;
  overflow: auto;
  max-height: calc(100vh - 220px);
}

.cb-item-card {
  position: relative;
  border: 1px solid var(--cb-line);
  border-radius: 14px;
  padding: 0.95rem 0.85rem;
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 132px;
  text-align: left;
  transition: transform var(--cb-med) var(--cb-ease), box-shadow var(--cb-med), border-color var(--cb-med);
  animation: cb-pop 0.45s var(--cb-ease) both;
}

.cb-item-card.is-in-cart {
  border-color: rgba(255, 59, 31, 0.55);
  background: #fff8f6;
  box-shadow: 0 0 0 3px rgba(255, 59, 31, 0.12);
}

.cb-item-card__badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--cb-brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
}

.cb-item-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(255, 59, 31, 0.4);
  box-shadow: var(--cb-shadow-sm);
}

.cb-item-card:active {
  transform: scale(0.98);
}

.cb-item-card__cat {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cb-muted);
}

.cb-item-card__name {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
  flex: 1;
}

.cb-item-card__price {
  font-family: var(--cb-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--cb-brand-deep);
}

.cb-item-card__disc {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cb-success);
}

.cb-pos__cart {
  position: sticky;
  top: calc(var(--cb-topbar) + 1rem);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--cb-topbar) - 2rem);
  overflow: hidden;
}

.cb-pos__cart-head {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--cb-line);
  background: var(--cb-panel);
  color: #fff;
  flex-shrink: 0;
}

.cb-pos__cart-head h3 {
  margin: 0;
  font-family: var(--cb-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 1.2rem;
}

.cb-pos__cart-head p {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.cb-pos__customer {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--cb-line);
  display: grid;
  gap: 0.55rem;
  flex-shrink: 0;
}

.cb-cart-list {
  flex: 1 1 auto;
  min-height: 180px;
  max-height: min(48vh, 420px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  -webkit-overflow-scrolling: touch;
}

.cb-cart-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: #faf8f6;
  border: 1px solid var(--cb-line);
  animation: cb-slide-in 0.35s var(--cb-ease) both;
  flex-shrink: 0;
}

.cb-cart-row__name {
  font-weight: 700;
  font-size: 0.88rem;
}

.cb-cart-row__meta {
  font-size: 0.75rem;
  color: var(--cb-muted);
}

.cb-cart-row__total {
  font-family: var(--cb-display);
  font-size: 1.05rem;
  justify-self: end;
}

.cb-pos__cart-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.cb-icon-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: inherit;
  flex-shrink: 0;
  margin-left: auto;
  transition: background var(--cb-fast), color var(--cb-fast), transform var(--cb-fast), border-color var(--cb-fast);
}

.cb-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.cb-icon-btn:active {
  transform: scale(0.95);
}

.cb-icon-btn--light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.cb-icon-btn--light:hover {
  background: rgba(255, 59, 31, 0.85);
  border-color: transparent;
}

.cb-icon-btn--danger {
  color: var(--cb-danger);
  border-color: rgba(225, 29, 72, 0.18);
  background: rgba(225, 29, 72, 0.08);
}

.cb-icon-btn--danger:hover {
  background: var(--cb-danger);
  color: #fff;
  border-color: transparent;
}

.cb-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  grid-column: 1 / -1;
}

.cb-qty button:not(.cb-icon-btn) {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--cb-line);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.cb-qty .cb-icon-btn {
  width: 32px;
  height: 32px;
  margin-left: auto;
}

.cb-qty span {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 700;
}

.cb-pos__totals {
  padding: 1rem 1.1rem;
  border-top: 1px solid var(--cb-line);
  background: #faf8f6;
  display: grid;
  gap: 0.45rem;
  flex-shrink: 0;
}

.cb-total-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--cb-ink-soft);
}

.cb-total-line--net {
  font-family: var(--cb-display);
  font-size: 1.45rem;
  color: var(--cb-ink);
  letter-spacing: 0.03em;
  margin-top: 0.25rem;
}

.cb-pos__footer {
  padding: 0.9rem 1rem 1.1rem;
  display: grid;
  gap: 0.55rem;
  flex-shrink: 0;
}

/* -------------------------------------------------------------------------- */
/* Checkout receipt                                                           */
/* -------------------------------------------------------------------------- */

.cb-receipt {
  max-width: 720px;
  margin: 0 auto;
}

.cb-receipt__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}

/* -------------------------------------------------------------------------- */
/* Toasts                                                                     */
/* -------------------------------------------------------------------------- */

.cb-toast-root {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}

.cb-toast {
  pointer-events: auto;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: var(--cb-panel);
  color: #fff;
  box-shadow: var(--cb-shadow);
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  animation: cb-toast-in 0.4s var(--cb-ease) both;
}

.cb-toast--success { border-left: 4px solid var(--cb-success); }
.cb-toast--error { border-left: 4px solid var(--cb-danger); }
.cb-toast--info { border-left: 4px solid var(--cb-info); }
.cb-toast--warn { border-left: 4px solid var(--cb-accent); }

.cb-toast__msg {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cb-toast__close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

/* -------------------------------------------------------------------------- */
/* Legacy compatibility (old class names map into new system)                 */
/* -------------------------------------------------------------------------- */

.container {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.mainMenu,
.menu {
  background: transparent;
  padding: 0;
  border-radius: 0;
  width: auto;
  height: auto;
  display: block;
}

.btn.custom-btn-store,
.btn.custom-btn-order,
.btn.custom-btn-customer,
.btn.custom-btn-report,
.btn.custom-btn-exit,
.menu button,
.add-button,
.back-button {
  width: auto;
  margin: 0;
}

.custom-search-input {
  width: 100%;
}

.input-group {
  width: 100%;
}

.img-fluid {
  width: auto;
  height: auto;
  margin: 0;
}

#itemTotal,
#disc,
#netTotal {
  max-width: none;
  font-weight: 700;
  font-size: 1rem;
  color: inherit;
}

/* -------------------------------------------------------------------------- */
/* Animations                                                                 */
/* -------------------------------------------------------------------------- */

@keyframes cb-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cb-fade-down {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cb-pop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes cb-slide-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes cb-toast-in {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

  @media (max-width: 1100px) {
  .cb-home__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cb-pos {
    grid-template-columns: 1fr;
  }

  .cb-pos__cart {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .cb-cart-list {
    max-height: none;
    min-height: 140px;
  }

  .cb-pos__grid {
    max-height: none;
  }

  .cb-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .cb-app {
    grid-template-columns: 1fr;
  }

  .cb-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform var(--cb-med) var(--cb-ease);
  }

  .cb-sidebar.is-open {
    transform: translateX(0);
  }

  .cb-menu-toggle {
    display: inline-flex;
  }

  .cb-hub-grid {
    grid-template-columns: 1fr;
  }

  .cb-form-grid {
    grid-template-columns: 1fr;
  }

  .cb-receipt__meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .cb-content {
    padding: 1rem 0.9rem 1.75rem;
  }

  .cb-topbar {
    padding: 0 0.9rem;
  }

  .cb-home__grid {
    grid-template-columns: 1fr;
  }

  .cb-stats {
    grid-template-columns: 1fr 1fr;
  }

  .cb-home__cta {
    flex-direction: column;
    align-items: stretch;
  }

  .cb-home__cta .cb-btn {
    width: 100%;
  }

  .cb-pos__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0.75rem;
  }

  .cb-item-card {
    min-height: 118px;
    padding: 0.75rem;
  }
}

@media (max-width: 420px) {
  .cb-stats {
    grid-template-columns: 1fr;
  }

  .cb-pos__grid {
    grid-template-columns: 1fr;
  }
}
