@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

:root {
  --brand: #ef7821;
  --brand-dark: #C96840;
  --brand-light: #FDF0EB;
  --bg: #F4F4F8;
  --card: #FFFFFF;
  --text: #1C1C1E;
  --text-sub: #6B6B72;
  --border: #E8E8ED;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: calc(72px + var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 12px)));
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER ─────────────────────────────────────────────── */
.header {
  background: var(--brand);
  padding: calc(18px + var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px))) 18px 20px;
}

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

.logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 26px;
  color: #fff;
  letter-spacing: -0.5px;
}

.header-logo {
  height: 30px;
  width: auto;
  display: block;
}

.header-greeting {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 600;
  margin-top: 3px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  position: relative;
  transition: background .15s;
  color: white;
}

.icon-btn:active {
  background: rgba(255, 255, 255, 0.28);
}

.badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #fff;
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.badge.on {
  display: flex;
}

/* ── CATEGORIES ─────────────────────────────────────────── */
.cats {
  background: var(--card);
  padding: 10px 0 10px 16px;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}

.cats::-webkit-scrollbar {
  display: none;
}

.cat {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-sub);
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}

.cat.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.cats .cat:last-child {
  margin-right: 16px;
}

#weightChips .cat {
  padding: 5px 13px;
  font-size: 12px;
}

/* ── SECTION TITLE ──────────────────────────────────────── */
.section-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 17px;
  padding: 14px 16px 8px;
  color: var(--text);
}

/* ── PRODUCT CARD ───────────────────────────────────────── */
.product-card {
  background: var(--card);
  margin: 0 0 8px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: opacity .15s;
}

.product-card:active {
  opacity: .82;
}

.product-card.unavailable {
  opacity: .42;
  pointer-events: none;
}

.prod-img {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
}

.prod-info {
  flex: 1;
  min-width: 0;
}

.prod-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 3px;
  line-height: 1.35;
}

.prod-desc {
  font-size: 11.5px;
  color: var(--text-sub);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 7px;
}

.flavor-bars {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 7px;
}

.f-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.f-label {
  font-size: 9.5px;
  color: var(--text-sub);
  width: 60px;
  flex-shrink: 0;
}

.f-track {
  flex: 1;
  height: 3.5px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.f-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: width .4s ease;
}

.prod-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prod-price {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 16px;
  color: var(--brand);
}

.unavail-label {
  font-size: 11px;
  color: #999;
  font-weight: 700;
  font-style: italic;
}

.add-btn {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s;
}

.add-btn:active {
  background: var(--brand-dark);
}

.qty-ctrl {
  display: flex;
  align-items: center;
  background: var(--brand);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-ctrl.inactive {
  background: #eee;
}

.qty-ctrl.inactive .qty-btn {
  color: #aaa;
}

.qty-ctrl.inactive .qty-num {
  color: #333;
}

.qty-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-num {
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 13px;
  min-width: 18px;
  text-align: center;
}

/* ── BOTTOM NAV ─────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  padding-bottom: calc(12px + var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 0 8px;
  gap: 3px;
  border: none;
  background: none;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: color .18s;
}

.nav-item.active {
  color: var(--brand);
}

.nav-icon {
  font-size: 20px;
  line-height: 1;
}

/* ── PAGES ──────────────────────────────────────────────── */
.page {
  display: none;
}

.page.active {
  display: block;
}

/* ── CART ───────────────────────────────────────────────── */
.cart-item {
  background: var(--card);
  margin: 0 0 1px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.cart-item-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  background: var(--brand-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item-body {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.cart-item-price {
  font-weight: 700;
  font-size: 13px;
  color: var(--brand);
  margin-top: 2px;
}

/* grind tag */
.grind-tag {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  margin-top: 2px;
}

/* ── DELIVERY SECTION ───────────────────────────────────── */
.section-card {
  background: var(--card);
  margin: 8px 0 0;
  padding: 14px 16px;
}

.sc-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 10px;
}

.delivery-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.del-tab {
  flex: 1;
  padding: 9px 6px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  color: var(--text-sub);
  transition: all .18s;
}

.del-tab.active {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand);
}

.form-input {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  outline: none;
  background: white;
  color: var(--text);
  margin-bottom: 8px;
  transition: border-color .18s;
}

.form-input:focus {
  border-color: var(--brand);
}

.form-input::placeholder {
  color: #b0b0b8;
}

.form-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 4px;
  display: block;
}

/* Recent delivery places */
.recent-places {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.recent-chip {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: all .15s;
  white-space: nowrap;
}

.recent-chip:active {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand);
}

/* ── НП Автокомпліт ─────────────────────────────────────── */
.np-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  z-index: 200;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.np-dropdown:empty { display: none; }
.np-dd-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.4;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.np-dd-item:last-child { border-bottom: none; border-radius: 0 0 12px 12px; }
.np-dd-item:hover, .np-dd-item:active { background: var(--brand-light); color: var(--brand); }
.np-dd-empty { color: var(--text-sub); cursor: default; font-size: 13px; }

/* ── CART TOTAL ─────────────────────────────────────────── */
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--card);
  margin-top: 8px;
  border-top: 2px solid var(--border);
}

.cart-total-label {
  font-weight: 600;
  color: var(--text-sub);
  font-size: 14px;
}

.cart-total-val {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 22px;
  color: var(--brand);
}

.checkout-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 10px 16px 0;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 15px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: background .18s;
  text-align: center;
}

.checkout-btn:active {
  background: var(--brand-dark);
}

.checkout-btn:disabled {
  opacity: .5;
  pointer-events: none;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: calc(100svh - 140px);
  padding: 80px 24px 24px;
  text-align: center;
  gap: 10px;
}

.cart-empty > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cart-empty-icon {
  font-size: 60px;
}

.fdb-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.fdb-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: width .4s ease;
}

.cart-empty h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 19px;
}

.cart-empty p {
  color: var(--text-sub);
  font-size: 13px;
}

/* ── HISTORY ────────────────────────────────────────────── */
.order-card {
  background: var(--card);
  margin: 0 0 8px;
  padding: 14px 16px;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.order-num {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 14px;
}

.order-date {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
}

.st-pending {
  background: #FFF3CD;
  color: #856404;
}

.st-done {
  background: #D1FAE5;
  color: #065F46;
}

.st-cancel {
  background: #FEE2E2;
  color: #991B1B;
}

.order-products {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-total-val {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--brand);
}

/* ── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--card);
  border-radius: 22px 22px 0 0;
  width: 100%;
  padding: 0 20px 28px;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.4, 0, .2, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-handle {
  width: 38px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 14px auto 18px;
}

.modal-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 20px;
  margin-bottom: 7px;
}

.modal-desc {
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Ensure rich HTML content from API is formatted well */
.modal-desc p {
  margin-bottom: 8px;
}

.modal-desc img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
}

.modal-flavors {
  margin-bottom: 18px;
}

.mf-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.mf-label {
  font-size: 12px;
  color: var(--text-sub);
  width: 80px;
  flex-shrink: 0;
}

.mf-track {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.mf-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 3px;
}

/* Grind selector */
.grind-section {
  margin-bottom: 18px;
}

.grind-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 8px;
}

.grind-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.grind-opt {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 8px;
  text-align: center;
  cursor: pointer;
  transition: all .18s;
  background: var(--bg);
}

.grind-opt.selected {
  border-color: var(--brand);
  background: var(--brand-light);
}

.grind-opt-icon {
  font-size: 20px;
}

.grind-opt-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 11.5px;
  margin-top: 3px;
  color: var(--text);
}

.grind-opt.selected .grind-opt-name {
  color: var(--brand);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.modal-price {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 24px;
  color: var(--brand);
}

.modal-add-btn {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: background .18s;
}

.modal-add-btn:active {
  background: var(--brand-dark);
}

.modal-qty-ctrl {
  display: flex;
  align-items: stretch;
  background: var(--brand-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.modal-qty-ctrl .qty-btn {
  color: var(--brand);
  font-size: 20px;
  width: 36px;
  height: auto;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.modal-qty-input {
  width: 34px;
  text-align: center;
  border: none;
  background: transparent;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--brand);
  padding: 0;
  -moz-appearance: textfield;
}

.modal-qty-input::-webkit-outer-spin-button,
.modal-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.add-btn--has {
  background: var(--brand-light);
  color: var(--brand);
}

/* ── LOGIN ──────────────────────────────────────────────── */
#loginPage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
  gap: 18px;
}

.login-logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 52px;
  color: var(--brand);
  letter-spacing: -2px;
}

.login-sub {
  color: var(--text-sub);
  font-size: 15px;
  font-weight: 600;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.login-error {
  color: #DC2626;
  font-size: 13px;
  font-weight: 600;
  min-height: 16px;
}

.login-btn {
  width: 100%;
  padding: 15px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: background .18s;
}

.login-btn:active {
  background: var(--brand-dark);
}

.login-note {
  font-size: 11.5px;
  color: var(--text-sub);
  line-height: 1.5;
}

/* ── TOAST ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 82px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #1C1C1E;
  color: #fff;
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transition: all .28s;
  z-index: 999;
  white-space: nowrap;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── SPINNER ─────────────────────────────────────────────── */
.spinner-wrap {
  display: flex;
  justify-content: center;
  padding: 48px 0;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-sub);
}

.empty-state .es-icon {
  font-size: 52px;
  margin-bottom: 10px;
}

.empty-state p {
  font-weight: 600;
  font-size: 14px;
}

/* textarea */
textarea.form-input {
  resize: none;
  height: 72px;
  line-height: 1.5;
}

/* ── ORDER DETAIL MODAL ─────────────────────────────────── */
.od-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.od-overlay.od-open {
  opacity: 1;
  pointer-events: auto;
}

.od-sheet {
  background: var(--bg);
  width: 100%;
  max-height: 88vh;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
}

.od-overlay.od-open .od-sheet {
  transform: translateY(0);
}

.od-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--divider);
}

.od-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 18px;
}

.od-sub {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}

.od-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-sub);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.od-body {
  overflow-y: auto;
  flex: 1;
  padding: 16px 20px 32px;
}

.od-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.od-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.od-table th {
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  color: var(--text-sub);
  padding: 4px 6px;
  border-bottom: 1px solid var(--divider);
}

.od-table td {
  padding: 7px 6px;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}

.od-table td:nth-child(2),
.od-table td:nth-child(3) {
  white-space: nowrap;
  text-align: right;
}

.od-table th:nth-child(2),
.od-table th:nth-child(3) {
  text-align: right;
}

.od-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px solid var(--divider);
  font-weight: 700;
  font-size: 15px;
}

.od-total-val {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  color: var(--brand);
}

.od-addr {
  font-size: 13px;
  color: var(--text-sub);
  margin: 0;
}

.od-doc-btn {
  display: block;
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--brand);
  color: var(--brand);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}

.od-doc-btn:hover {
  background: rgba(224, 123, 84, .08);
}

.od-doc-btn:disabled {
  opacity: .5;
}

/* ── PRODUCT CARD QTY BADGE ─────────────────────────────── */
.card-qty-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
  z-index: 1;
}

/* ── REPEAT ORDER ────────────────────────────────────────── */
.od-repeat-wrap {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  padding: 12px 0 4px;
  margin-top: 20px;
}

.od-repeat-btn {
  display: block;
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  letter-spacing: .01em;
  box-shadow: 0 4px 14px rgba(224, 123, 84, .40);
  transition: opacity .15s, transform .1s;
}

.od-repeat-btn:hover {
  opacity: .90;
  transform: translateY(-1px);
}

.od-repeat-btn:active {
  opacity: .80;
  transform: translateY(0);
}

.od-repeat-btn:disabled {
  opacity: .45;
  box-shadow: none;
}

.od-repeat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--divider);
}

.od-repeat-row:last-of-type {
  border-bottom: none;
}

.od-repeat-name {
  font-size: 13px;
  flex: 1;
  line-height: 1.4;
}

.od-grind-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--card);
  border: 1.5px solid var(--divider);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  max-width: 150px;
}

/* ── TTN DELIVERY NUMBER ─────────────────────────────────── */
.od-ttn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: 10px;
  padding: 10px 14px;
}

.od-ttn-val {
  font-family: 'Courier New', monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  flex: 1;
  user-select: all;
}

.od-ttn-copy {
  background: none;
  border: 1.5px solid var(--brand);
  color: var(--brand);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}

.od-ttn-copy:hover {
  background: rgba(224, 123, 84, .08);
}

/* ── ORDER DELIVERY CHIP on history cards ─────────────────── */
.order-delivery-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: rgba(224, 123, 84, .10);
  border-radius: 20px;
  padding: 3px 10px;
  margin: 4px 0 6px;
}