:root {
  --bg: #fffdfb;
  --coffee: #5D4037;
  --coffee-2: #6d4c41;
  --success: #28a745;
  --ink: #1d1c1c;
  --muted: #8c8a8a;
  --surface: #ffffff;
  --shadow: 0 20px 36px rgba(0, 0, 0, .18);
  --radius: 18px;
  --category-sticky-top: 0;
  --category-gap: 12px;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

#app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100%;
  background: var(--surface)
}

#app[data-wide="true"] {
  max-width: 960px
}

.view {
  display: none;
  padding: 24px 20px 28px
}

.view.is-visible {
  display: block
}

/* Push home content lower (profile + greeting are fixed and unaffected) */
#view-home {
  padding-top: 96px
}

.hero {
  margin-top: 24px;
  text-align: center
}

.hero .logo {
  margin: 24px auto 8px;
  width: 72px;
  height: 72px
}

.hero h1 {
  font-size: 44px;
  letter-spacing: .3px;
  margin: 12px 0 6px;
  font-weight: 600
}

.hero h1 .em {
  font-weight: 800
}

.hero .sub {
  color: var(--muted);
  margin: 0
}

.cta-wrap {
  display: flex;
  justify-content: center;
  margin: 28px 0
}

.btn {
  appearance: none;
  border: 0;
  outline: 0;
  border-radius: 12px;
  padding: 12px 18px;
  background: #eae7e6;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed
}

.btn-primary {
  background: var(--coffee);
  color: #fff;
  box-shadow: var(--shadow)
}

.btn-primary:disabled {
  background: #cfcaca;
  color: #fff;
  box-shadow: none
}

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

.btn-success:disabled {
  background: #a9c8b4;
  color: #fff;
  box-shadow: none
}

.btn-success.keep-editing-btn {
  opacity: .9;
}

.btn-danger {
  background: #dc3545;
  color: #fff
}

.btn-danger:hover {
  background: #c82333
}

.btn-outline {
  background: #fff;
  border: 1px solid #e3dfde
}

.btn.is-loading {
  position: relative;
  opacity: .75;
  cursor: not-allowed;
}

.btn.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 14px;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  transform: translateY(-50%);
  animation: spin .7s linear infinite;
}

.btn-pill {
  border-radius: 40px;
  padding: 18px 28px;
  font-size: 18px
}

.btn-hero {
  padding: 24px 34px;
  font-size: 20px;
  border-radius: 56px;
  display: inline-flex;
  align-items: center;
  gap: 12px
}

.btn-text {
  background: transparent;
  color: var(--coffee);
  padding: 8px 0
}

.btn-full {
  width: 100%
}

.btn-cart {
  background: #f3f0ef
}

.icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px
}

.hint {
  color: var(--muted);
  text-align: center;
  margin: 8px 0
}

.tiny {
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  margin-top: 8px
}

.link {
  border: 0;
  background: transparent;
  color: var(--coffee);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  margin-left: 6px
}

.auth-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px
}

.user-info {
  text-align: center;
  margin-top: 8px
}

.user-info p {
  margin: 0 0 8px 0;
  color: var(--muted)
}

/* scanner */
.scanner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  height: 300px
}

.scanner video {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.scanner-overlay {
  position: absolute;
  inset: 0;
  border: 2px dashed rgba(255, 255, 255, .7);
  border-radius: 16px;
  margin: 24px
}

.alt-input {
  margin-top: 14px;
  color: var(--muted)
}

.manual {
  display: flex;
  gap: 10px;
  margin-top: 8px
}

.manual input {
  flex: 1;
  border: 1px solid #e3dfde;
  border-radius: 10px;
  padding: 12px 10px;
  font-size: 16px
}

/* menu */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px
}

/* Tighter layout for Menu topbar: arrow closer to title */
#view-menu .topbar {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  align-items: center
}

#view-menu .topbar h2 {
  grid-column: 2;
  justify-self: center;
  margin: 0
}

#view-menu .topbar .btn-back {
  grid-column: 1;
  justify-self: start;
  padding: 4px 8px;
  background: transparent;
  color: #000;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  -webkit-text-stroke: 0.5px #000;
  text-shadow: 0 0 1px #000
}

/* Scan view back arrow (slightly smaller) */
#view-scan .topbar .btn-back-scan {
  padding: 4px 8px;
  background: transparent;
  color: #000;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  -webkit-text-stroke: 0.5px #000;
  text-shadow: 0 0 1px #000
}

.badge {
  background: var(--coffee);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  margin-left: 6px
}

/* shop header and messages */
.shop-header {
  background: #f8f9fa;
  border: 1px solid #e3dfde;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: center
}

.shop-header h3 {
  margin: 0 0 8px 0;
  color: var(--coffee);
  font-size: 18px
}

.shop-header p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 14px
}

.shop-header .status {
  color: #28a745;
  font-weight: 600;
  margin-top: 8px
}

/* Make shop header span full width above item cards */
.menu-list .shop-header {
  grid-column: 1 / -1;
  padding: 12px;
  margin-bottom: 8px
}

.menu-list .shop-header h3 {
  font-size: 18px;
  margin: 0 0 4px 0
}

.menu-list .shop-header p {
  font-size: 13px;
  margin: 0
}

.menu-message {
  background: #d4edda;
  color: #155724;
  padding: 12px;
  border-radius: 8px;
  margin: 8px 0;
  text-align: center;
  font-size: 14px
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 12px;
}

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

.menu-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e9e5e1;
  background: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .06);
}

.menu-info-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.menu-info-icon {
  font-size: 18px;
}

.menu-info-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  color: var(--ink);
}

.menu-info-name {
  font-weight: 600;
  color: var(--coffee);
}

.menu-info-table {
  font-size: 13px;
  color: var(--muted);
}

.menu-info-row .menu-info-fav {
  padding: 6px;
  border-radius: 10px;
  border: 1px solid #e3dfde;
  background: #fff;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-info-row .menu-info-fav img {
  width: 20px;
  height: 20px;
}

.category-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0;
  margin-bottom: var(--category-gap);
  border-bottom: 1px solid #eee;
  background: var(--surface);
  position: sticky;
  top: var(--category-sticky-top);
  z-index: 6;
  -webkit-overflow-scrolling: touch;
  position: sticky;
}

.category-bar::before {
  content: '';
  position: absolute;
  top: -45px;
  left: 0;
  right: 0;
  height: 45px;
  background: var(--surface);
  pointer-events: none;
}

.category-bar::-webkit-scrollbar {
  height: 4px;
}

.category-bar::-webkit-scrollbar-thumb {
  background: #d4d0cd;
  border-radius: 999px;
}

.category-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid #e3dfde;
  padding: 6px 14px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: var(--coffee);
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}

.category-pill.is-active {
  background: var(--coffee);
  color: #fff;
  border-color: var(--coffee);
  box-shadow: 0 10px 20px rgba(93, 64, 55, .2);
}

.category-pill:focus-visible {
  outline: 2px solid var(--coffee);
  outline-offset: 2px;
}

.menu-sections {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.user-category {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-category h3 {
  margin: 0;
  padding-bottom: 6px;
  font-size: 18px;
  font-weight: 600;
  color: var(--coffee-2);
  border-bottom: 1px solid #f0ece9;
}

.user-category-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.menu-card {
  align-items: stretch;
  padding: 10px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.menu-card-image {
  position: relative;
  width: 100%;
  padding-top: 75%;
  /* 4:3 Aspect Ratio */
  background: #f5f5f5;
  border-radius: 16px;
  overflow: hidden;
  display: block;
}

.menu-card-unavailable-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #d8d8d8;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 10px;
  line-height: 1.3;
  white-space: nowrap;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


.menu-card-image.is-placeholder::before {
  display: none;
}

.menu-card-image.is-placeholder .menu-item-image {
  visibility: hidden;
}

.menu-card-image .menu-item-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.menu-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f7f7f7 0%, #ececec 100%);
  border-radius: inherit;
  color: #b5b5b5;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.2px;
  pointer-events: none;
  text-transform: uppercase;
}

.menu-card-image-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(248, 246, 244, 0.8);
  color: var(--coffee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.menu-card-image-delete:hover {
  background: rgba(248, 246, 244, 0.8);
  transform: translateY(-1px);
}

.menu-card-body-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.menu-card-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}

.menu-card-actions .btn-add {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 220px;
  margin: 8px auto 0;
  padding: 10px 12px;
  background: var(--coffee);
  color: #fff;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}

.menu-card-actions .btn-add:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .8);
  outline-offset: 2px;
}

.menu-card-actions .btn-add:disabled {
  opacity: .6;
  box-shadow: none;
}

.menu-card h4 {
  margin: 0;
  font-size: 15px;
}

.menu-card .price {
  margin-top: 0;
}

.item-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 12px 18px;
  z-index: 1300;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

.item-detail-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.item-detail-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 20px 20px 12px 12px;
  box-shadow: var(--shadow);
  padding: 18px 18px 24px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  transform-origin: center;
}

.customize-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 54px;
  margin-bottom: 4px;
  padding: 0 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.customize-title {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: .05em;
}

.item-detail-image-wrap {
  margin-top: 8px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.coffee-instance-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 4px 2px;
  margin-top: 12px;
  scroll-behavior: smooth;
}

.coffee-instance-chips::-webkit-scrollbar {
  height: 6px;
}

.coffee-instance-chips::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
}

.coffee-instance-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 36px;
  border: 1px solid #d9d1cd;
  padding: 0 14px;
  min-height: 36px;
  background: #fff;
  font-size: 14px;
  color: var(--coffee-2);
  cursor: pointer;
  white-space: nowrap;
}

.coffee-instance-pill .pill-label {
  font-weight: 600;
}

.coffee-instance-pill .pill-summary {
  font-size: 12px;
  font-weight: 400;
  opacity: .75;
}

.coffee-instance-pill .pill-remove {
  display: none;
  font-size: 16px;
  line-height: 1;
  font-weight: 600;
  padding: 0;
}

.coffee-instance-chips[data-multiple="true"] .coffee-instance-pill .pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f2efec;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
  margin-left: 4px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.coffee-instance-chips[data-multiple="true"] .coffee-instance-pill .pill-remove:hover {
  background: #dfd6cf;
  color: var(--ink);
}

.coffee-instance-pill.is-active {
  background: var(--coffee);
  color: #fff;
  border-color: var(--coffee);
}

.coffee-instance-pill.is-active .pill-summary {
  color: rgba(255, 255, 255, .8);
}

.coffee-instance-pill.is-active .pill-remove {
  color: rgba(255, 255, 255, .8);
}

.customize-options {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 12px;
}

.customize-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.customize-option label {
  font-size: 14px;
  font-weight: 600;
}

.customize-option label .required {
  color: #d93025;
  margin-left: 4px;
  font-weight: 600;
}

.customize-option select {
  border: 1px solid #e3dfde;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  height: 46px;
  background: #fff;
  appearance: none;
}

.customize-option textarea {
  border: 1px solid #e3dfde;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  min-height: 100px;
  resize: none;
}

.customize-option .extras-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customize-option .extras-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.35;
  width: 100%;
}

.customize-option .extras-choice input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.customize-option .extras-choice span {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.customize-counter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.customize-counter .btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 20px;
}

.customize-counter .counter-value {
  min-width: 48px;
  text-align: center;
  font-weight: 600;
}

.customize-additional {
  margin-top: 16px;
}

.customize-bottom {
  position: static;
  padding: 16px 0 0;
  background: transparent;
  margin-top: 16px;
  z-index: auto;
}

.customize-bottom .btn {
  height: 52px;
  border-radius: 999px;
  font-size: 16px;
}

.field-error {
  color: #d93025;
  font-size: 12px;
  line-height: 1.2;
}

.item-detail-panel:not(.is-customizing) .coffee-instance-chips,
.item-detail-panel:not(.is-customizing) .customize-options,
.item-detail-panel:not(.is-customizing) .customize-additional,
.item-detail-panel:not(.is-customizing) .customize-bottom {
  display: none;
}

.item-detail-panel.is-simple .customize-bottom {
  display: block;
}

.item-detail-panel.is-customizing .item-detail-body {
  display: none;
}

.item-detail-panel.is-customizing .item-detail-qty {
  display: none;
}

/* Make chips sit closer to the image when customizing */
.item-detail-panel.is-customizing .coffee-instance-chips {
  margin-top: 8px;
}

.modal-actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 16px;
}

.customize-toolbar .btn-text {
  padding: 0 6px;
}

.customize-toolbar .customize-cancel-btn {
  font-weight: 700;
  padding: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f8f6f4;
  color: var(--ink);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  line-height: 1;
}

.customize-toolbar .customize-cancel-btn:hover {
  background: #f1efed;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.customize-delete-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #dc3545;
  color: #fff;
  font-size: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.customize-delete-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.customize-delete-btn svg {
  width: 20px;
  height: 20px;
}

.modal-actions .btn {
  flex: 1;
}

.item-detail-panel.animate {
  animation: itemModalIn .22s ease-out;
}

.item-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 6px;
  font-size: 22px;
  line-height: 1;
}

.item-detail-panel .item-detail-image {
  display: block;
  width: 70%;
  max-width: 420px;
  max-height: 182px;
  aspect-ratio: 4 / 3;
  background: #f5f5f5;
  object-fit: cover;
  border-radius: 16px;
  margin: 0 auto;
  overflow: hidden;
}

.item-detail-image-overlay {
  position: absolute;
  inset: 12px 12px auto 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 15, 20, 0.85);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .25s ease, transform .25s ease;
}

.item-detail-image-overlay.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.menu-item-image {
  width: 100%;
  border-radius: 16px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.item-detail-body {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-detail-price {
  font-weight: 700;
  color: var(--coffee);
  font-size: 20px;
}

.item-detail-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.item-detail-qty {
  margin-top: 6px;
}

@keyframes itemModalIn {
  from {
    transform: scale(.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media(min-width:768px) {
  .item-detail-overlay {
    align-items: center;
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 12px;
  align-items: center;
  text-align: center;
}

.card img {
  width: 100%;
  aspect-ratio: 4/3;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}

.card h4 {
  margin: 6px 0 6px 0;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.price {
  font-weight: 700;
  margin-top: 6px;
}

.add-row {
  display: none;
}

.qty {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.qty button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f3f0ef;
}

.qty-under {
  margin-top: 10px;
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.qty-row .btn-qty {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f3f0ef;
}

.qty-empty .btn-add {
  width: 100%;
  border-radius: 12px;
  font-size: 14px;
  padding: 10px 0;
  font-weight: 600;
  background: var(--coffee);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.qty-empty .btn-add:disabled {
  opacity: .5;
  box-shadow: none;
}

.qty-empty .btn-add:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 24px rgba(93, 64, 55, .25);
}

@media(max-width:640px) {
  .menu-info-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-info-row .menu-info-fav {
    width: 100%;
  }

  .user-category-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-card {
    padding: 8px;
  }
}

/* Quick checkout bar (slides up from bottom) */
.quick-checkout {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(100%);
  transition: transform .5s ease;
  background: #fff;
  border-top: 1px solid #eee;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, .18);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1200;
}

.quick-checkout.is-visible {
  transform: translateY(0);
}

.quick-total {
  font-weight: 700;
  color: var(--coffee);
  font-size: 16px;
  margin-left: auto;
  text-align: right;
  display: block;
  line-height: 1;
  white-space: nowrap;
}

/* Ensure content can scroll behind the quick checkout bar */
body.has-qc #view-menu {
  padding-bottom: 120px;
}

/* Order status bar */
.order-status-bar {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 16px;
  width: min(360px, calc(100% - 24px));
  max-width: 360px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1300;
  transform: translate(-50%, 140%);
  transition: transform .4s ease, opacity .2s ease;
  opacity: 0;
}

.order-status-bar.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.order-status-bar.at-top {
  top: 72px;
  bottom: auto;
  transform: translate(-50%, -140%);
}

.order-status-bar.at-top.is-visible {
  transform: translate(-50%, 0);
}

.order-status-bar .status-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.order-status-bar .status-bar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-status-bar .status-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  border-radius: 50%;
}

.order-status-bar .status-icon.confirmed {
  background-color: #2e7d32;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24"><path fill="white" d="M9.5 16.17 5.33 12l-1.41 1.41L9.5 19 21 7.5 19.59 6.09z"/></svg>') center/contain no-repeat;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24"><path fill="white" d="M9.5 16.17 5.33 12l-1.41 1.41L9.5 19 21 7.5 19.59 6.09z"/></svg>') center/contain no-repeat;
}

.order-status-bar .status-icon.dismissed {
  background-color: #c1121f;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24"><path fill="white" d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>') center/contain no-repeat;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24"><path fill="white" d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>') center/contain no-repeat;
}

.order-status-bar .status-icon.pending {
  background-color: #f9a825;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24"><path fill="white" d="M12 2a10 10 0 1 0 10 10A10.011 10.011 0 0 0 12 2Zm1 11h-2V7h2Zm0 4h-2v-2h2Z"/></svg>') center/contain no-repeat;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24"><path fill="white" d="M12 2a10 10 0 1 0 10 10A10.011 10.011 0 0 0 12 2Zm1 11h-2V7h2Zm0 4h-2v-2h2Z"/></svg>') center/contain no-repeat;
}

.order-status-bar .status-spinner.small {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

/* Unavailable menu item styling */
.card.is-unavailable {
  opacity: .55;
  filter: grayscale(40%)
}

.card.is-unavailable .btn {
  cursor: not-allowed
}

.pill-unavail {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 11px;
  background: #e9ecef;
  color: #6c757d;
  border-radius: 999px;
}

/* cart sheet */
.cart-sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: -100%;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, .18);
  transition: bottom .28s ease
}

.cart-sheet[aria-hidden="false"] {
  bottom: 0
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #eee
}

.cart-items {
  max-height: 40vh;
  overflow: auto;
  padding: 10px 16px
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed #eee
}

.cart-footer {
  padding: 12px 16px 18px;
  border-top: 1px solid #eee;
  background: #fff
}

.totals {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px
}

/* Make cart footer button and price appear on one row */
.cart-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-footer .btn-full {
  width: auto
}

.cart-footer #btn-checkout {
  order: 1
}

.cart-footer .totals {
  order: 2;
  margin-left: auto;
  margin-bottom: 0
}

/* checkout */
.form {
  display: grid;
  gap: 12px;
  margin-top: 6px
}

.pair {
  display: grid;
  gap: 6px
}

.pair input {
  padding: 12px 10px;
  border: 1px solid #e3dfde;
  border-radius: 10px;
  font-size: 16px
}

.pair textarea {
  padding: 12px 10px;
  border: 1px solid #e3dfde;
  border-radius: 10px;
  font-size: 16px;
  min-height: 2.4em;
  max-height: none
}

.summary {
  background: #faf8f7;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px
}

.checkout-error {
  color: #d32f2f;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* status */
.status-card {
  margin: 80px auto;
  max-width: 360px;
  text-align: center;
  padding: 24px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  box-shadow: var(--shadow)
}

.status-card .status-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #d7ccc8;
  border-top-color: #5d4037;
  animation: spin .8s linear infinite;
  margin: 0 auto
}

.spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid #eee;
  border-top-color: var(--coffee);
  margin: 0 auto 14px;
  animation: spin 1s linear infinite
}

.status-auth {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed #d8d3d1;
  border-radius: 12px;
  background: #fff
}

.status-card .decision-message {
  display: block;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #e0f7e9;
  color: #1b5e20;
  font-size: 14px;
  line-height: 1.4
}

.order-feedback {
  margin-top: 14px;
  padding: 12px;
  background: #faf8f7;
  border: 1px solid #eee;
  border-radius: 12px;
  display: none;
  text-align: left;
}

.order-feedback-title {
  margin: 0 0 8px 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--coffee-2);
}

.order-feedback-stars {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  margin: 4px 0 8px;
}

.order-feedback-stars .feedback-star {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #e3dfde;
  background: #fff;
  color: #b17a35;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.order-feedback-stars .feedback-star.is-active {
  background: var(--coffee);
  border-color: var(--coffee);
  color: #fff;
  box-shadow: 0 8px 18px rgba(93, 64, 55, 0.22);
  transform: translateY(-1px);
}

#order-feedback-text {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #e3dfde;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  resize: vertical;
  min-height: 64px;
}

.order-feedback-status {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.order-feedback-status.success {
  color: #1b5e20;
  font-weight: 600;
}

@media (max-width:520px) {
  .order-feedback {
    padding: 10px;
  }
  .order-feedback-stars {
    gap: 6px;
  }
  .order-feedback-stars .feedback-star {
    flex: 0 0 auto;
    min-width: 32px;
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg)
  }

  to {
    transform: rotate(360deg)
  }
}

.hidden, .is-hidden {
  display: none
}

.readonly {
  background: #f8f9fa
}

/* Two columns on all widths for user menu */

/* Admin */
.admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px
}

.admin-list {
  display: grid;
  gap: 10px;
  margin-top: 8px
}

.admin-row {
  display: grid;
  grid-template-columns: 2fr 3fr 120px 3fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px
}

.admin-row input {
  width: 100%;
  padding: 10px;
  border: 1px solid #e3dfde;
  border-radius: 8px
}

.admin-row .btn {
  padding: 8px 10px
}

.admin-add {
  margin: 16px 0 40px;
  display: grid;
  gap: 10px;
  border: 1px dashed #d8d3d1;
  border-radius: 12px;
  padding: 14px
}

.muted {
  color: var(--muted)
}

@media(max-width:720px) {
  .admin-row {
    grid-template-columns: 1fr
  }
}

/* Shop Management */
.shop-info {
  background: #faf8f7;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}

.shop-info h3 {
  margin: 0 0 8px 0;
  color: var(--coffee);
}

.shop-info p {
  margin: 4px 0;
  color: var(--muted);
}

.shop-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  justify-content: center;
}

/* QR Generator */
.qr-generator {
  max-width: 400px;
  margin: 0 auto;
}

.qr-input {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.qr-input label {
  font-weight: 600;
  color: var(--coffee);
}

.qr-input input {
  padding: 8px 12px;
  border: 1px solid #e3dfde;
  border-radius: 8px;
  font-size: 16px;
  width: 100px;
}

.qr-output {
  text-align: center;
  margin: 20px 0;
  padding: 20px;
  background: #faf8f7;
  border-radius: 12px;
}

.qr-instructions {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
}

.qr-instructions p {
  margin: 0 0 12px 0;
  font-weight: 600;
  color: var(--coffee);
}

.qr-instructions ol {
  margin: 0;
  padding-left: 20px;
}

.qr-instructions li {
  margin: 4px 0;
  color: var(--muted);
}

/* Orders List */
.orders-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.orders-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 12px 0 20px;
}

.orders-pagination .page-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 8px;
  min-width: 40px;
  cursor: pointer;
  font-weight: 600;
  color: #5D4037;
}

.orders-pagination .page-btn.active {
  background: #5D4037;
  color: #fff;
  border-color: #5D4037;
}

.orders-pagination .page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.order-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.order-number {
  font-weight: 600;
  color: var(--coffee);
}

.order-status {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.order-status.preparing {
  background: #fff3cd;
  color: #856404;
}

.order-status.ready {
  background: #d4edda;
  color: #155724;
}

.order-status.completed {
  background: #d1ecf1;
  color: #0c5460;
}

.order-details {
  margin-bottom: 12px;
}

.order-details p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 14px;
}

.order-items {
  margin-bottom: 12px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 4px 0;
  border-bottom: 1px dashed #eee;
}

.order-item .order-item-options {
  margin-left: 0;
  color: #4a4a4a;
  font-size: 14px;
  font-style: normal;
}

.order-item span:first-child {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

.order-item:last-child {
  border-bottom: none;
}

.order-total {
  font-weight: 600;
  color: var(--coffee);
  text-align: right;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.order-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.order-actions .btn {
  flex: 1;
  font-size: 14px;
  padding: 8px 12px;
}

/* Moderator categories */
.moderator-category {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 18px;
  margin: 18px 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.moderator-category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
  gap: 12px;
}

.moderator-category-title {
  margin: 0;
  font-size: 18px;
  color: #5D4037;
}

.moderator-category-count {
  font-size: 14px;
  color: #6c6c6c;
}

.moderator-category-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 980px) {
  .moderator-category-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .moderator-category-items {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

/* Shop Header */
.shop-header {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid #e9ecef;
}

.shop-header h3 {
  margin: 0 0 10px 0;
  color: var(--coffee);
  font-size: 24px;
}

.shop-header p {
  margin: 5px 0;
  color: #666;
}

.shop-header .status {
  margin: 10px 0 0 0;
  font-size: 14px;
  color: #28a745;
  font-weight: 500;
}

/* Notification Styles */
.notifications-panel {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notification-badge {
  background: #ff4757;
  color: white;
  border-radius: 50%;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: bold;
  margin-right: 10px;
}

.notification-item {
  background: #f8f9fa;
  border-left: 4px solid #007bff;
  padding: 15px;
  margin: 10px 0;
  border-radius: 4px;
  position: relative;
  animation: slideIn 0.3s ease-out;
}

.notification-item.new-order {
  border-left-color: #28a745;
  background: #f8fff9;
}

.notification-item .notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.notification-item .notification-time {
  font-size: 12px;
  color: #666;
}

.notification-item .notification-message {
  font-weight: 500;
  margin-bottom: 5px;
}

.notification-item .notification-details {
  font-size: 14px;
  color: #555;
}

.notification-item .btn-dismiss {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-item .btn-dismiss:hover {
  background: #c82333;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notification-sound {
  display: none;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.notifications-row {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.notifications-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.notifications-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 36px;
}

.notifications-label {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #8c8a8a;
}

.notifications-column span,
.notifications-column strong {
  font-size: 14px;
  color: #2f2f2f;
}

.notifications-column strong {
  font-weight: 600;
}

.notifications-subtext {
  font-size: 11px;
  color: #6c757d;
}

.notifications-empty {
  text-align: center;
  color: #6c757d;
  padding: 16px 0;
  font-size: 14px;
  border-top: 1px solid #f1f3f5;
}

@media (max-width: 900px) {
  .notifications-row {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 600px) {
  .notifications-row {
    grid-template-columns: 1fr;
  }
}

/* Professional Notification Panel Styling */
.notifications-overlay {
  position: fixed;
  top: 20px;
  right: 20px;
  left: auto;
  bottom: auto;
  background: transparent;
  backdrop-filter: none;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0;
}

#notifications-container {
  max-width: 400px;
  width: 400px;
  max-height: auto;
  overflow-y: visible;
}

/* Flash Animation for Visual Notifications */
@keyframes flash {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* Header with Counter */
.notification-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px 16px 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  border-radius: 16px 16px 0 0;
}

.notification-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
  border-radius: 16px 16px 0 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(10px);
}

.badge-icon {
  font-size: 12px;
}

.badge-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.order-counter {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  backdrop-filter: blur(10px);
}

.close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
  backdrop-filter: blur(10px);
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Current Order Section */
.current-order-section {
  background: white;
  padding: 16px;
  border-bottom: 1px solid #e9ecef;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  margin: 0 0 16px 0;
}

.title-icon {
  font-size: 16px;
}

.order-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.order-header h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: #495057;
}

.order-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
}

.meta-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.meta-text {
  font-size: 11px;
  font-weight: 500;
  color: #495057;
  line-height: 1.2;
}

/* Order Items Section */
.order-items-section {
  margin-bottom: 16px;
}

.items-grid {
  display: grid;
  gap: 6px;
}

.item-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 8px 12px;
  transition: all 0.2s ease;
}

.item-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-color: #dee2e6;
}

.item-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-name {
  font-weight: 500;
  color: #495057;
  font-size: 12px;
}

.item-details {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-qty {
  background: #e9ecef;
  color: #495057;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
}

.item-price {
  color: #28a745;
  font-weight: 600;
  font-size: 12px;
}

/* Total Section */
.order-total-section {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
  text-align: center;
  color: white;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.total-display {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.total-label {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.total-amount {
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Action Buttons */
.order-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.confirm-btn,
.dismiss-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.confirm-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.confirm-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.dismiss-btn {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  box-shadow: 0 2px 10px rgba(220, 53, 69, 0.3);
}

.dismiss-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.btn-icon {
  font-size: 14px;
}

.btn-text {
  font-size: 10px;
}

/* Next Orders Preview Section */
.next-orders-section {
  background: white;
  padding: 16px;
  border-radius: 0 0 16px 16px;
}

.next-orders-list {
  display: grid;
  gap: 8px;
}

.next-order-preview {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 10px 12px;
  transition: all 0.2s ease;
}

.next-order-preview:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  border-color: #adb5bd;
}

.preview-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.preview-order-id {
  font-weight: 600;
  color: #495057;
  font-size: 12px;
}

.preview-table {
  color: #6c757d;
  font-size: 11px;
}

.preview-time {
  color: #6c757d;
  font-size: 10px;
  font-style: italic;
}

.preview-items {
  color: #28a745;
  font-size: 10px;
  font-weight: 500;
}

/* Animation */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notification-card {
  animation: slideInRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Responsive Design */
@media (max-width: 600px) {
  .notifications-overlay {
    top: 10px;
    right: 10px;
  }

  #notifications-container {
    width: 320px;
    max-width: 320px;
  }

  .order-meta {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .order-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Scrollbar Styling */
#notifications-container::-webkit-scrollbar {
  width: 6px;
}

#notifications-container::-webkit-scrollbar-track {
  background: transparent;
}

#notifications-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

#notifications-container::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Tab badge for orders count */
.tab-badge {
  display: inline-block;
  min-width: 18px;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1;
  color: #fff;
  background: #dc3545;
  border-radius: 10px;
  vertical-align: middle;
}



/* Clickable customer names in orders */
.clickable-customer {
  color: #0d6efd;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.clickable-customer:hover {
  color: #0a58ca;
  text-decoration: none;
}

/* Guest customer names (not clickable) */
.guest-customer {
  color: #6c757d;
  font-style: italic;
}

/* Clickable customer in notifications */
.clickable-customer-notification {
  color: #0d6efd;
  cursor: pointer;
  margin-left: 6px;
  font-size: 14px;
  transition: transform 0.2s ease;
}

.clickable-customer-notification:hover {
  transform: scale(1.2);
}


/* Customer Orders Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12000;
  backdrop-filter: blur(4px);
}

#order-detail-modal {
  z-index: 12100;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

#order-detail-modal .modal-content {
  max-width: 920px;
  width: min(92%, 920px);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  background: var(--coffee);
  color: white;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 16px 16px 0 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 24px;
  max-height: calc(80vh - 80px);
  overflow-y: auto;
}

#site-feedback-modal .modal-content {
  max-width: 520px;
  width: min(520px, 92vw);
}

#site-feedback-modal .modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#site-feedback-text {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

.feedback-status-text {
  min-height: 18px;
  font-size: 13px;
  color: var(--muted);
}

.feedback-status-text.is-error {
  color: #c62828;
}

.feedback-status-text.is-success {
  color: #1b5e20;
}

#customization-confirm-modal .modal-content {
  max-width: 360px;
  width: min(360px, 92vw);
  border-radius: 24px;
}

#customization-confirm-modal .modal-header {
  background: linear-gradient(135deg, var(--coffee), #453128);
  color: #fff;
  border-radius: 24px 24px 0 0;
}

#customization-confirm-modal .modal-header h3 {
  font-size: 20px;
  letter-spacing: 0.02em;
}

#customization-confirm-modal .modal-body {
  padding: 28px 24px;
  text-align: center;
  background: #fff6f1;
  border-radius: 0 0 24px 24px;
}

#customization-confirm-modal .modal-body p {
  margin: 0;
  font-size: 15px;
  color: rgba(0, 0, 0, 0.75);
  line-height: 1.6;
  white-space: pre-line;
}

#customization-confirm-modal .modal-actions {
  margin-top: 24px;
}

#customization-confirm-modal .modal-actions .btn {
  font-weight: 600;
  border-radius: 12px;
}

#customization-confirm-modal .modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

#customization-confirm-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

#modal-orders-list {
  display: grid;
  gap: 16px;
}

#modal-orders-list .order-card {
  background: #faf8f7;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

#modal-orders-list .order-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Responsive modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-body {
    padding: 20px;
  }
}

/* Expand checkout modal to reduce scrolling */
#checkout-modal .modal-content {
  max-height: 92vh;
}

#checkout-modal .modal-body {
  max-height: calc(92vh - 80px);
}

/* Reduce top whitespace for status modal spinner */
#status-modal .modal-body {
  padding-top: 12px;
}

#status-modal .status-card {
  margin: 12px auto 16px;
}

/* Small completed orders count */
.completed-count {
  color: #28a745;
  font-size: 11px;
  font-weight: 500;
  margin-left: 4px
}

/* Line under customer name in notifications to show completed orders */
.customer-completed {
  margin-top: 2px;
  font-size: 11px;
  color: #1f7a33
}


/* New: Notification bell button and list panel (image-style) */
.notif-bell {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1100;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #dc3545;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  padding: 4px 6px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

.notif-list-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  border: 1px solid #eee;
  overflow: hidden;
}

.notif-list-header {
  padding: 16px 16px 8px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.notif-list-header h4 {
  margin: 0;
  font-size: 18px;
}

.notif-empty {
  padding: 20px;
  color: #8c8a8a;
  text-align: center;
}

.notif-list {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.notif-order {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  background: #f8f9fa;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}

/* When an order was approved by the other account, tint green at 30% opacity */
.notif-order.approved-by-other {
  background: rgba(40, 167, 69, 0.3);
}

/* When an order was dismissed by the other account, tint red at 30% opacity */
.notif-order.dismissed-by-other {
  background: rgba(220, 53, 69, 0.3);
}

.notif-order:hover {
  background: #f1f3f5;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

/* Keep tinted background on hover/active when state is red/green */
.notif-order.approved-by-other:hover,
.notif-order.approved-by-other:active {
  background: rgba(40, 167, 69, 0.3);
}

.notif-order.dismissed-by-other:hover,
.notif-order.dismissed-by-other:active {
  background: rgba(220, 53, 69, 0.3);
}

.notif-order-title {
  font-weight: 600;
  color: #1d1c1c;
}

.notif-order-sub {
  color: #6c757d;
  font-size: 12px;
}

.notif-order-amount {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-weight: 700;
  color: #1d1c1c;
  text-align: right;
}

.notif-note-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #a15c00;
}

.notif-note-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-left: 6px;
  color: #a15c00;
}

.notif-order.has-note {
  border-left: 3px solid #a15c00;
  padding-left: 10px;
}

.notif-order-time {
  color: #6c757d;
  font-size: 11px;
  text-align: right;
}

.note-reminder {
  border: 1px solid #f1c27d;
  background: #fff7e6;
  color: #a15c00;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.note-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff7e6;
  border: 1px solid #f1c27d;
  color: #a15c00;
  font-size: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.note-action-btn:hover {
  background: #f8e4c6;
  transform: translateY(-1px);
}

.note-action-btn.shake {
  animation: shake 0.4s;
}

.note-action-btn .note-action-icon {
  pointer-events: none;
}

.order-action-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 120px;
}

.order-action-group .note-reminder {
  margin-bottom: 0;
}

.notif-view-all {
  display: block;
  text-align: center;
  color: #3b5bdb;
  font-weight: 600;
  padding: 12px;
  border-top: 1px solid #f0f0f0;
  text-decoration: none;
  cursor: pointer;
}

.notif-view-all:hover {
  text-decoration: underline;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  color: #6c757d;
}

.order-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.order-detail-table th,
.order-detail-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.order-detail-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}

.order-detail-actions .note-action-btn {
  margin-right: auto;
}

.item-note-trigger {
  border-radius: 999px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  border: 1px solid rgba(220, 53, 69, 0.45);
  background: linear-gradient(135deg, rgba(255, 227, 231, 0.95), rgba(255, 241, 243, 0.95));
  color: #b02a37;
  box-shadow: 0 6px 16px rgba(220, 53, 69, 0.18);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.item-note-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(220, 53, 69, 0.24);
}

.item-note-trigger:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

.item-note-trigger.note-confirmed {
  background: linear-gradient(135deg, rgba(209, 245, 225, 0.95), rgba(232, 249, 238, 0.95));
  color: #1f7a33;
  border-color: rgba(40, 167, 69, 0.45);
  box-shadow: 0 6px 16px rgba(40, 167, 69, 0.18);
}

.item-note-trigger.note-confirmed:hover {
  box-shadow: 0 10px 22px rgba(40, 167, 69, 0.24);
}

.item-note-trigger.note-confirmed:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-3px);
  }

  75% {
    transform: translateX(3px);
  }
}

@keyframes note-shake {

  0%,
  100% {
    transform: translateX(0);
  }

  10% {
    transform: translateX(-3px);
  }

  20% {
    transform: translateX(3px);
  }

  30% {
    transform: translateX(-3px);
  }

  40% {
    transform: translateX(3px);
  }
}

.note-shake {
  animation: note-shake 0.2s ease-in-out 0s 10;
}

.feedback-launcher {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4e342e, #1f1b19);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.feedback-launcher:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}

.feedback-launcher .feedback-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback-launcher .feedback-label {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
}

@media (max-width:640px) {
  .feedback-launcher {
    right: 12px;
    bottom: 14px;
    padding: 11px 13px;
    gap: 6px;
  }

  .feedback-launcher .feedback-label {
    font-size: 13px;
  }
}

/* Floating profile button */
.profile-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  left: auto;
  z-index: 1100;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Hard override to avoid any older rules pushing it left */
body .profile-btn {
  right: 16px !important;
  left: auto !important;
}

/* Floating auth (when logged out) */
.floating-auth .btn {
  padding: 8px 12px
}

/* Greeting banner on home (top-left) */
.greeting-banner {
  background: transparent;
  border: 0;
  box-shadow: none
}

/* User orders list */
#user-orders-list {
  display: grid;
  gap: 12px
}

.user-order {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px
}

.user-order .meta {
  font-size: 12px;
  color: var(--muted)
}

.user-order .title {
  font-weight: 600;
  color: #1d1c1c
}

.status-pill {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600
}

.status-pill.pending {
  background: #fff3cd;
  color: #856404
}

.status-pill.confirmed {
  background: #e8f5e9;
  color: #2e7d32
}

.status-pill.ready {
  background: #d4edda;
  color: #155724
}

.status-pill.completed {
  background: #d1ecf1;
  color: #0c5460
}

.status-pill.dismissed {
  background: #f8d7da;
  color: #721c24
}

@media (max-width:600px) {
  .profile-btn {
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px
  }
}

/* Manager: menu grid cards (3 per row) */
.menu-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 12px;
}

.menu-item {
  background: #fff !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  transition: box-shadow 0.2s ease !important;
  /* Force removal of any inline styles */
  gap: 0 !important;
  align-items: stretch !important;
  padding: 0 !important;
}

.menu-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.menu-item .item-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.menu-item .item-image-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f5f5f5;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  flex-shrink: 0;
}

.menu-item .item-content {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.menu-item .item-name {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin: 0 0 8px 0;
}

.menu-item .item-desc {
  font-size: 14px;
  color: #666;
  margin: 0 0 16px 0;
  flex: 1;
  line-height: 1.4;
}

.menu-item .item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.menu-item .item-price {
  font-size: 18px;
  font-weight: 700;
  color: #28a745;
}

.menu-item .item-actions {
  display: flex;
  gap: 8px;
}

.menu-item .btn-icon {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.menu-item .btn-icon:hover {
  background: #e9ecef;
  transform: translateY(-1px);
}

.menu-item .btn-icon.edit:hover {
  background: #e3f2fd;
  color: #1976d2;
}

.menu-item .btn-icon.delete:hover {
  background: #ffebee;
  color: #d32f2f;
}

.menu-item .availability-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  margin-top: auto;
}

.menu-item .availability-label {
  font-size: 14px;
  font-weight: 500;
  color: #495057;
}

.menu-item .toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: #ccc;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s;
}

.menu-item .toggle-switch.active {
  background: #28a745;
}

.menu-item .toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.menu-item .toggle-switch.active::after {
  transform: translateX(20px);
}

@media(max-width:980px) {
  .menu-items {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media(max-width:640px) {
  .menu-items {
    grid-template-columns: 1fr
  }
}

/* Home helper texts spacing */
#view-home .hint {
  margin-top: 80px !important
}

#view-home .tiny {
  margin-top: 28px !important
}

.menu-card {
  align-items: stretch;
}

/* Admin monitor tab */
.monitor-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; background: #fff; border: 1px solid #e7e4e2; border-radius: 14px; padding: 14px 16px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05); }
.monitor-filter { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.monitor-filter label { font-weight: 600; color: var(--coffee); font-size: 13px; }
.monitor-filter select, .monitor-filter input { padding: 9px 10px; border: 1px solid #dcd7d4; border-radius: 8px; background: #faf8f7; font-size: 14px; }
.monitor-custom-range { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.monitor-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.monitor-body { display: flex; flex-direction: column; gap: 16px; }
.monitor-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.monitor-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 14px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05); display: flex; flex-direction: column; gap: 6px; }
.monitor-card .label { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.5px; }
.monitor-card .value { font-weight: 700; font-size: 22px; }
.monitor-card .meta { font-size: 12px; color: #5f5d5d; }
.metric-good { color: #1b5e20; }
.metric-warn { color: #b26a00; }
.metric-bad { color: #b02a37; }
.metric-muted { color: var(--muted); }
.monitor-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .monitor-grid { grid-template-columns: 1fr; } }
.monitor-table-card { background: #fff; border: 1px solid #eee; border-radius: 12px; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06); padding: 14px; }
.monitor-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.monitor-table-wrap { overflow-x: auto; }
.monitor-table { width: 100%; border-collapse: collapse; }
.monitor-table th, .monitor-table td { padding: 10px 8px; text-align: left; border-bottom: 1px solid #f0edea; font-size: 13px; }
.monitor-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
.monitor-table tr:hover { background: #f9f6f4; }
.monitor-table tr.active { background: #efe9e5; }
.monitor-side { display: grid; gap: 12px; }
.monitor-panel { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 12px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05); }
.monitor-panel h4 { margin: 0 0 8px 0; color: var(--coffee); }
.monitor-empty { text-align: center; color: var(--muted); padding: 12px; font-size: 14px; }
.monitor-loading { text-align: center; padding: 16px; }
.monitor-error { color: #b02a37; }
.monitor-bucket { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.monitor-bucket-bar { flex: 1; height: 8px; background: #f2eeeb; border-radius: 999px; overflow: hidden; position: relative; }
.monitor-bucket-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #5d4037, #8d6e63); }
.monitor-bucket label { font-weight: 600; font-size: 13px; }
.monitor-order { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #eee; }
.monitor-order:last-child { border-bottom: none; }
.monitor-order .order-meta { display: flex; flex-direction: column; gap: 4px; }
.monitor-recent-orders-list { display: flex; flex-direction: column; gap: 10px; }
.monitor-see-all-btn { margin-top: 10px; width: 100%; }
.monitor-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #f5f2ef; color: #4a3b35; font-size: 12px; }
.monitor-chip.time { font-weight: 700; }
.monitor-chip.status { text-transform: uppercase; font-weight: 700; }
.monitor-feedback-pill { background: #f6f0ff; color: #5c3b7a; padding: 8px 10px; border-radius: 10px; margin: 6px 0; font-size: 13px; }
.monitor-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.monitor-panel-header h4 { margin: 0; }
.monitor-panel-header .btn-link { background: transparent; border: none; color: #5D4037; font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.monitor-panel-header .btn-link:hover { background: #f2eeeb; }
.monitor-panel-header .btn-link[disabled] { opacity: 0.5; cursor: not-allowed; }
.monitor-feedback-modal-list { display: flex; flex-direction: column; }
.monitor-feedback-modal-list .feedback-row { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid #f1ece9; }
.monitor-feedback-modal-list .feedback-row:last-child { border-bottom: none; }
.monitor-feedback-modal-list .meta { font-size: 12px; color: var(--muted); }
.monitor-feedback-modal-list .title { font-weight: 600; color: #2d2624; }
.monitor-feedback-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.monitor-feedback-pagination .btn { min-width: 96px; }
.monitor-pill { padding: 4px 8px; border-radius: 8px; background: #efe9e5; font-size: 12px; color: #4a3b35; }
.monitor-star { color: #e6a700; font-weight: 700; }
.monitor-orders-modal-list { display: flex; flex-direction: column; gap: 10px; }
.monitor-order-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04); cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.monitor-order-card:hover { border-color: #d8d0cc; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08); }
.monitor-order-card-info { display: flex; flex-direction: column; gap: 4px; }
.monitor-order-card-title { font-weight: 700; color: #2d2624; }
.monitor-order-card-meta { font-size: 12px; color: #6c757d; }
.monitor-order-card-status { font-size: 12px; color: #4a3b35; }
.monitor-order-card-status.metric-bad { color: #b02a37; }
.monitor-order-card-metrics { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; min-width: 120px; }
.monitor-order-total { font-size: 13px; font-weight: 600; color: #2d2624; }
.monitor-order-chips { display: flex; gap: 8px; align-items: center; }
.monitor-orders-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.monitor-orders-page-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.monitor-page-btn { border: 1px solid #dcd7d4; background: #faf8f7; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.monitor-page-btn.active { background: #5d4037; color: #fff; border-color: #5d4037; }
.monitor-page-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.monitor-page-ellipsis { color: #8c8a8a; padding: 0 4px; }
.monitor-order-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.monitor-order-items { display: flex; flex-direction: column; gap: 8px; }
.monitor-order-item-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid #f0edea; border-radius: 8px; background: #faf8f7; font-size: 13px; }
.monitor-order-totals { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: #faf8f7; border: 1px solid #f0edea; border-radius: 8px; margin: 10px 0; }
.monitor-order-totals div { display: flex; justify-content: space-between; font-size: 13px; color: #2d2624; }
.monitor-order-totals .total-row { font-weight: 700; }
.monitor-order-detail-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.monitor-order-detail-actions .btn { min-width: 90px; }
.monitor-orders-modal-list { display: flex; flex-direction: column; gap: 10px; }
.monitor-order-card { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04); cursor: pointer; }
.monitor-order-card:hover { border-color: #d8d0cc; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06); }
.monitor-order-card .order-title { font-weight: 700; color: #2d2624; }
.monitor-order-card .order-metrics { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; min-width: 170px; }
.monitor-orders-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.monitor-orders-page-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.monitor-page-btn { border: 1px solid #dcd7d4; background: #faf8f7; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.monitor-page-btn.active { background: #5d4037; color: #fff; border-color: #5d4037; }
.monitor-page-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.monitor-page-ellipsis { color: #8c8a8a; padding: 0 4px; }
.monitor-order-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.monitor-order-items { display: flex; flex-direction: column; gap: 8px; }
.monitor-order-item-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid #f0edea; border-radius: 8px; background: #faf8f7; }
.saved-menus-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#saved-menus-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.saved-menu-card {
  background: #fff;
  border: 1px solid #e5e0da;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.saved-menu-toggle {
  width: 100%;
  border: none;
  background: none;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
}

.saved-menu-toggle-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.saved-menu-toggle strong {
  font-size: 16px;
  letter-spacing: 0.01em;
}

.saved-menu-meta {
  font-size: 13px;
  color: #6c757d;
}

.saved-menu-toggle-indicator {
  font-size: 13px;
  color: #6c757d;
}

.saved-menu-items {
  padding: 0 16px 16px;
  border-top: 1px solid #f0edea;
  display: none;
}

.saved-menu-items.is-open {
  display: block;
}

.saved-menu-category {
  margin-top: 12px;
}

.saved-menu-category-header {
  font-size: 16px;
  font-weight: 700;
  color: #5d4037;
  margin-bottom: 8px;
}

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

.saved-menu-detail-card {
  border: 1px solid #f1ece7;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.saved-menu-detail-image {
  width: 100%;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  background: #f4f4f4;
}

.saved-menu-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.saved-menu-detail-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 60px;
}

.saved-menu-detail-name {
  font-weight: 600;
  color: #2d2624;
  font-size: 14px;
}

.saved-menu-detail-desc {
  margin: 0;
  font-size: 12px;
  color: #6c757d;
}

.saved-menu-detail-price {
  font-weight: 700;
  color: #5d4037;
  margin-top: auto;
}

.saved-menu-items-extra {
  margin-top: 6px;
  color: #6c757d;
}

@media (max-width: 640px) {
  .saved-menu-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .saved-menu-detail-image {
    height: 120px;
  }
}

@media (max-width: 640px) {
  .saved-menu-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .saved-menu-item img {
    width: 100%;
    height: auto;
  }
}
