* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #f5f2f7;
  color: #1c1b1f;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.customer-unavailable {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, #111014 0%, #1d1725 100%);
}

.customer-unavailable-card {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.customer-unavailable-card h1 {
  margin: 0 0 12px;
  font-size: 28px;
}

.customer-unavailable-card p {
  margin: 0;
  color: #5c5568;
  line-height: 1.5;
}

.customer-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f5f2f7;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #e5ddea;
}

.customer-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7a688b;
  margin-bottom: 6px;
}

.customer-header h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-badge-btn {
  border: 1px solid #d7c7e7;
  background: #ffffff;
  color: #452c63;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.customer-search-wrap {
  display: flex;
}

.customer-search {
  width: 100%;
  border: 1px solid #d9d1df;
  background: #ffffff;
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 16px;
  outline: none;
}

.customer-main {
  padding: 16px 16px 100px;
  max-width: 920px;
  margin: 0 auto;
}

.menu-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.loading-card,
.section-card,
.category-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(37, 17, 64, 0.06);
}

.section-card-head,
.category-head,
.product-row,
.sheet-head,
.sheet-actions,
.basket-total-wrap,
.inline-field,
.checkbox-row,
.qty-row,
.status-pill {
  display: flex;
  align-items: center;
}

.section-card-head,
.category-head,
.product-row,
.sheet-head,
.sheet-actions {
  justify-content: space-between;
}

.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a688b;
  margin-bottom: 4px;
}

.table-summary-section {
  margin-top: 16px;
}

.table-summary-box {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-card {
  border: 1px solid #ece3f4;
  border-radius: 16px;
  padding: 14px;
  background: #fcfbfd;
}

.table-balance-card {
  background: #f5eefb;
  border-color: #dbc8ef;
}

.badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ece3f4;
  color: #5e3c81;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.status-line {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.45;
}

.muted {
  color: #6c6477;
}

.info,
.success,
.error {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  margin-top: 12px;
}

.info {
  background: #eef4ff;
  color: #2c4c82;
}

.success {
  background: #eaf8ef;
  color: #23653b;
}

.error {
  background: #fdeced;
  color: #922d3a;
}

.category-card {
  padding: 0;
  overflow: hidden;
}

.category-head {
  width: 100%;
  border: none;
  background: #ffffff;
  padding: 16px;
  cursor: pointer;
  text-align: left;
}

.category-head h2 {
  margin: 0;
  font-size: 18px;
}

.category-sub {
  font-size: 13px;
  color: #796d87;
  margin-top: 4px;
}

.category-toggle {
  font-size: 22px;
  color: #6a4b8d;
  flex-shrink: 0;
}

.category-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-row {
  gap: 14px;
  border: 1px solid #eee6f4;
  border-radius: 16px;
  padding: 14px;
  background: #fcfbfd;
}

.product-main {
  flex: 1;
  min-width: 0;
}

.product-main h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.product-main p {
  margin: 0;
  color: #6c6477;
  font-size: 14px;
  line-height: 1.45;
}

.product-side {
  text-align: right;
  min-width: 96px;
}

.product-price {
  font-weight: 800;
  margin-bottom: 10px;
}

.btn-dark,
.btn-light,
.inline-action,
.icon-btn {
  border: none;
  cursor: pointer;
  transition: 0.18s ease;
  font: inherit;
}

.btn-dark {
  background: #2c0b4f;
  color: #ffffff;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
}

.btn-light {
  background: #ece3f4;
  color: #472b63;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
}

.btn-dark:disabled,
.btn-light:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.icon-btn {
  background: #efe7f6;
  color: #452c63;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 18px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(19, 12, 27, 0.52);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.sheet {
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
}

.sheet.narrow {
  max-width: 520px;
}

.basket-sheet {
  max-width: 760px;
}

.sheet-head {
  padding: 18px 18px 14px;
  border-bottom: 1px solid #eee6f4;
}

.sheet-head h2 {
  margin: 0;
  font-size: 22px;
}

.sheet-body {
  padding: 18px;
  overflow: auto;
}

.sheet-actions {
  gap: 10px;
  padding: 16px 18px 18px;
  border-top: 1px solid #eee6f4;
}

.form-grid,
.basket-tools,
.cart-items,
.modifier-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field > span {
  font-size: 14px;
  font-weight: 700;
  color: #3d3149;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #d9d1df;
  background: #ffffff;
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 16px;
  outline: none;
  resize: vertical;
}

.inline-field {
  gap: 10px;
}

.inline-field input {
  flex: 1;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #34293f;
}

.modifier-group h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.modifier-note {
  margin-bottom: 8px;
}

.cart-item {
  border: 1px solid #eee6f4;
  border-radius: 16px;
  padding: 14px;
  background: #fcfbfd;
}

.qty-row {
  gap: 8px;
  margin-top: 12px;
}

.qty-row button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: #ece3f4;
  color: #472b63;
  font-weight: 800;
  cursor: pointer;
}

.basket-body {
  gap: 16px;
  display: flex;
  flex-direction: column;
}

.basket-table-info {
  margin-bottom: 4px;
}

.status-pill {
  gap: 10px;
  justify-content: space-between;
  border: 1px solid #dbc8ef;
  background: #f6eefc;
  border-radius: 14px;
  padding: 10px 12px;
  color: #4b2f69;
  font-weight: 700;
}

.inline-action {
  background: transparent;
  color: #4b2f69;
  text-decoration: underline;
  padding: 0;
}

.basket-footer {
  align-items: center;
}

.basket-total-wrap {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.basket-total-wrap span {
  font-size: 13px;
  color: #796d87;
}

.basket-total-wrap strong {
  font-size: 22px;
}

.floating-basket {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  border: none;
  border-radius: 999px;
  padding: 14px 16px;
  background: #2c0b4f;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 16px 36px rgba(44, 11, 79, 0.35);
  cursor: pointer;
  font-weight: 700;
}

#floatingBasketCount {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #ffffff;
  color: #2c0b4f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

@media (min-width: 768px) {
  .customer-header {
    padding: 20px 24px 16px;
  }

  .customer-main {
    padding: 24px 24px 110px;
  }

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

  .overlay {
    align-items: center;
    padding: 24px;
  }

  .sheet.narrow {
    max-width: 560px;
  }
}

@media (max-width: 767px) {
  .customer-header-top,
  .product-row,
  .sheet-actions,
  .section-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .product-side {
    text-align: left;
    min-width: 0;
  }

  .inline-field {
    flex-direction: column;
    align-items: stretch;
  }

  .basket-footer {
    align-items: stretch;
  }
}