/* Hourglass Cafe - Odoo POS Professional Architecture */
:root {
  --bg-primary: #F4F1EA;
  --bg-secondary: #FFFFFF;
  --bg-card: #FFFFFF;
  --text-primary: #2C1810;
  --text-secondary: #5D4037;
  --text-muted: #8D6E63;
  --accent-coffee: #4E342E;
  --accent-dark: #2C1810;
  --accent-warm: #D4A373;
  --accent-cream: #FAF3E0;
  --accent-green: #2E7D32;
  --accent-amber: #E65100;
  --accent-red: #C62828;
  --accent-blue: #1565C0;
  --border-color: #E2D7CD;
  --selected-line-bg: #F5EBE1;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ================= ODOO HEADER ================= */
header {
  background: var(--accent-dark);
  color: #FFF8E7;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #3E2723;
  z-index: 100;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  font-size: 24px;
  line-height: 1;
}

.brand-text h1 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #FFF8E7;
}

.brand-text p {
  font-size: 11px;
  color: var(--accent-warm);
  font-weight: 600;
}

.nav-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px;
  border-radius: var(--radius-md);
}

.nav-btn {
  background: transparent;
  border: none;
  color: #EADBC8;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFF;
}

.nav-btn.active {
  background: var(--accent-warm);
  color: var(--accent-dark);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.cashier-badge {
  background: rgba(255, 255, 255, 0.15);
  color: #FFF;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.btn-session-control {
  background: #A93226;
  color: #FFF;
  border: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.btn-session-control:hover {
  background: #922B21;
}

.badge-online {
  background: #2E7D32;
  color: #FFF;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.badge-offline {
  background: #C62828;
  color: #FFF;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #FFF;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Master Layout */
main {
  flex: 1;
  display: flex;
  position: relative;
  height: calc(100vh - 54px);
  overflow: hidden;
}

.view-section {
  display: none;
  width: 100%;
  height: 100%;
}

.view-section.active {
  display: flex;
}

/* ================= ODOO POS TWO-PANE LAYOUT ================= */
#view-pos {
  display: none;
  width: 100%;
  height: 100%;
}

#view-pos.active {
  display: flex;
}

/* LEFT PANE: Cart & Odoo Numpad Action Pad */
.pos-left-pane {
  width: 440px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
}

/* RIGHT PANE: Omni-Search & Product Tiles Grid */
.pos-right-pane {
  flex: 1;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Search Bar & Barcode Scanner Header */
.pos-search-header {
  padding: 10px 14px;
  background: #FFF;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
  align-items: center;
}

.pos-search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.pos-search-input-wrap input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  background: #FAF8F5;
  transition: all 0.15s ease;
}

.pos-search-input-wrap input:focus {
  background: #FFF;
  border-color: var(--accent-coffee);
  box-shadow: 0 0 0 2px rgba(78, 52, 46, 0.1);
}

.search-icon-svg {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 14px;
}

/* Category Breadcrumbs / Bar */
.category-bar-wrapper {
  background: #FFF;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.category-tab-btn {
  background: #FAF8F5;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.category-tab-btn:hover {
  border-color: var(--accent-coffee);
}

.category-tab-btn.active {
  background: var(--accent-coffee);
  color: #FFF;
  border-color: var(--accent-coffee);
}

/* Product Tiles Grid */
.products-scroll-area {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
}

.odoo-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.odoo-product-tile {
  background: #FFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 168px;
  transition: all 0.18s ease;
  user-select: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(44, 24, 16, 0.05);
}

.odoo-product-tile:hover {
  border-color: var(--accent-coffee);
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(44, 24, 16, 0.12);
}

.odoo-product-tile:active {
  transform: scale(0.97);
}

.tile-img-box {
  position: relative;
  width: 100%;
  height: 92px;
  overflow: hidden;
  background: #EFEBE9;
}

.tile-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.odoo-product-tile:hover .tile-img-box img {
  transform: scale(1.06);
}

.tile-cat-badge {
  position: absolute;
  bottom: 4px;
  left: 6px;
  background: rgba(44, 24, 16, 0.85);
  color: #FFF;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  backdrop-filter: blur(2px);
}

.tile-popular-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  background: #FFB300;
  color: #3E2723;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

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

.tile-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tile-price {
  font-size: 13px;
  font-weight: 800;
  color: #2E7D32;
}

.tile-var-badge {
  font-size: 9px;
  background: #EFEBE9;
  color: #5D4037;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
}

/* ================= LEFT PANE: CART & ORDER SUMMARY ================= */
.cart-header-status {
  padding: 10px 14px;
  background: #FAF8F5;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header-status .ticket-title {
  font-size: 14px;
  font-weight: 800;
}

/* Customer Selection Bar */
.cart-customer-selector {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  background: #FFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s;
}

.cart-customer-selector:hover {
  background: #FAF3E0;
}

.customer-pill-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-coffee);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Order Line Items List */
.cart-lines-container {
  flex: 1;
  overflow-y: auto;
  background: #FFF;
}

.order-line-row {
  padding: 8px 14px;
  border-bottom: 1px solid #F0EAE1;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.1s ease;
}

.order-line-row:hover {
  background: #FAF8F5;
}

.order-line-row.selected {
  background: var(--selected-line-bg);
  border-left: 4px solid var(--accent-coffee);
}

.line-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
}

.line-details {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.line-mods {
  font-size: 10px;
  color: #8D6E63;
  padding-left: 8px;
}

/* Cart Subtotals Bar */
.cart-subtotals-bar {
  padding: 8px 14px;
  background: #FAF8F5;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.cart-subtotals-bar .row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.cart-subtotals-bar .total-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 900;
  color: var(--accent-dark);
  margin-top: 4px;
}

/* ================= ODOO VIRTUAL NUMPAD ACTION PAD ================= */
.odoo-actionpad-wrapper {
  background: #FAF8F5;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border-color);
}

.odoo-numpad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.numpad-key {
  height: 44px;
  background: #FFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: all 0.1s ease;
}

.numpad-key:active {
  background: var(--accent-cream);
  transform: scale(0.96);
}

/* Mode Keys (Qty, % Disc, Price) */
.numpad-mode-key {
  background: #EFEBE9;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.numpad-mode-key.active {
  background: var(--accent-coffee);
  color: #FFF;
  border-color: var(--accent-coffee);
}

.numpad-key-delete {
  background: #FFEBEE;
  color: #C62828;
}

/* Bottom Action Row: [ Refund ] and [ >> PAYMENT ] */
.odoo-bottom-actions {
  display: flex;
  gap: 6px;
}

.btn-action-refund {
  flex: 1;
  height: 48px;
  background: #FFF;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-action-refund.active {
  background: #C62828;
  color: #FFF;
  border-color: #C62828;
}

.btn-action-payment {
  flex: 2;
  height: 48px;
  background: #2E7D32;
  color: #FFF;
  border: none;
  font-size: 15px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(46, 125, 50, 0.3);
}

.btn-action-payment:hover {
  background: #1B5E20;
}

/* ================= ODOO SPLIT PAYMENT SCREEN ================= */
#modal-odoo-payment .modal-window {
  max-width: 680px;
  width: 95%;
}

.payment-screen-header {
  background: #FAF8F5;
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.payment-summary-box {
  display: flex;
  gap: 24px;
}

.payment-summary-col .label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.payment-summary-col .val {
  font-size: 22px;
  font-weight: 900;
  color: var(--accent-dark);
}

.payment-split-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

.payment-method-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pay-method-btn {
  background: #FFF;
  border: 1.5px solid var(--border-color);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
}

.pay-method-btn:hover {
  border-color: var(--accent-coffee);
}

.pay-method-btn.active {
  border-color: var(--accent-coffee);
  background: var(--accent-cream);
  color: var(--accent-dark);
}

.split-lines-list {
  background: #FFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  max-height: 120px;
  overflow-y: auto;
  margin-top: 8px;
}

.split-line-item {
  padding: 6px 10px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

/* Payment Quick Cash Buttons & Tender Numpad */
.pay-tender-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-cash-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.chip-btn {
  background: #FFF;
  border: 1px solid var(--border-color);
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.chip-btn:hover {
  background: var(--accent-cream);
  border-color: var(--accent-coffee);
}

.payment-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-window {
  background: #FFF;
  border-radius: var(--radius-md);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 800;
}

.btn-close {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Buttons */
.btn-primary {
  background: var(--accent-coffee);
  color: #FFF;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-validate-sale {
  background: #2E7D32;
  color: #FFF;
  border: none;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-validate-sale:hover {
  background: #1B5E20;
}

/* ================= KDS, ONLINE, ANALYTICS VIEWS ================= */
#view-kds, #view-online, #view-analytics, #view-bi {
  display: none;
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  flex-direction: column;
  gap: 16px;
}

#view-kds.active, #view-online.active, #view-analytics.active, #view-bi.active {
  display: flex;
}

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

.kds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.kds-ticket {
  background: #FFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

.kds-ticket.status-new { border-top: 4px solid #E65100; }
.kds-ticket.status-preparing { border-top: 4px solid #1976D2; }
.kds-ticket.status-ready { border-top: 4px solid #2E7D32; }

.kds-ticket-top {
  padding: 8px 12px;
  background: #FAF8F5;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kds-body {
  padding: 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kds-actions {
  padding: 8px 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 6px;
}

.btn-kds-step {
  flex: 1;
  padding: 6px;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color: #FFF;
}
.btn-kds-step.prep { background: #1976D2; }
.btn-kds-step.ready { background: #2E7D32; }
.btn-kds-step.done { background: #5D4037; }

/* KPI Row & Tables */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.kpi-card {
  background: #FFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-card .label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.kpi-card .value { font-size: 20px; font-weight: 900; color: var(--accent-dark); }
.kpi-card .subtext { font-size: 11px; color: var(--accent-green); font-weight: 600; }

.chart-card {
  background: #FFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.perf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.perf-table th {
  text-align: left;
  padding: 8px;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-secondary);
}

.perf-table td {
  padding: 8px;
  border-bottom: 1px solid #F0EAE1;
}

@media (max-width: 900px) {
  body { overflow: auto; height: auto; }
  main { height: auto; flex-direction: column; }
  #view-pos.active { flex-direction: column; }
  .pos-left-pane { width: 100%; height: auto; }
  .pos-right-pane { height: auto; }
}

/* ========================================================
   MASTER CATEGORY CLUSTER BAR & ACCESSIBILITY POLISH
======================================================== */
.master-group-bar {
  display: flex;
  gap: 6px;
  padding: 8px 14px 4px 14px;
  background: #FFF;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: thin;
}

.master-group-btn {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-cream);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.master-group-btn:hover {
  background: #EFEBE9;
  border-color: var(--accent-coffee);
}

.master-group-btn.active {
  background: var(--accent-coffee);
  color: #FFF;
  border-color: var(--accent-coffee);
  box-shadow: 0 2px 5px rgba(78, 52, 46, 0.25);
}

/* Accessibility Focus States */
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-coffee);
  outline-offset: 2px;
}

/* ========================================================
   HISTORICAL SALES EXPLORER (3-MONTH AUDIT & CSV EXPORT)
======================================================== */
.history-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.history-filter-bar {
  background: #FFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.history-preset-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-cream);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-primary);
}

.history-preset-btn:hover {
  background: #EFEBE9;
}

.history-preset-btn.active {
  background: var(--accent-dark);
  color: #FFF;
  border-color: var(--accent-dark);
}

.custom-date-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.custom-date-inputs label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.custom-date-inputs input[type="date"],
.custom-date-inputs input[type="text"],
.history-select {
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #FFF;
}

.history-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.history-trend-panel {
  background: #FFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
}

.trend-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.trend-bars-container {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 90px;
  padding-top: 10px;
  overflow-x: auto;
}

.trend-bar-col {
  flex: 1;
  min-width: 12px;
  max-width: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.trend-bar-fill {
  width: 100%;
  background: var(--accent-coffee);
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
  position: relative;
}

.trend-bar-fill:hover {
  background: #A1887F;
}

.trend-bar-col .bar-label {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
}

.history-table-container {
  background: #FFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-x: auto;
  max-height: 400px;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.history-table th {
  position: sticky;
  top: 0;
  background: #F5EFEB;
  text-align: left;
  padding: 10px;
  border-bottom: 2px solid var(--border-color);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.history-table td {
  padding: 10px;
  border-bottom: 1px solid #F0EAE1;
  vertical-align: middle;
}

.history-table tr:hover {
  background: #FAF8F5;
}

.history-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ========================================================
   GEMINI & ANTIGRAVITY AI BUSINESS STRATEGIST
======================================================== */
.ai-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 14px;
  padding: 16px;
  overflow-y: auto;
}

.ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-avatar-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4E342E, #8D6E63);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #FFF;
  box-shadow: 0 4px 10px rgba(78, 52, 46, 0.2);
}

.ai-status-pill {
  font-size: 10px;
  background: #E8F5E9;
  color: #2E7D32;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #C8E6C9;
}

.ai-decision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.ai-decision-card {
  background: #FFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(44, 24, 16, 0.03);
}

.ai-card-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-coffee);
  letter-spacing: 0.5px;
}

.ai-decision-card h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.ai-decision-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.ai-action-tip {
  margin-top: auto;
  background: #FFF8E1;
  border-left: 3px solid #FFB300;
  padding: 8px 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 11px;
  color: #5D4037;
}

.ai-chat-wrapper {
  background: #FFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  min-height: 380px;
  box-shadow: 0 2px 8px rgba(44, 24, 16, 0.04);
}

.ai-chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #FAF8F5;
}

.ai-prompt-chips {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: thin;
}

.ai-chip {
  padding: 5px 12px;
  border-radius: 16px;
  border: 1px solid #D7CCC8;
  background: #EFEBE9;
  font-size: 11px;
  font-weight: 600;
  color: #4E342E;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.ai-chip:hover {
  background: #D7CCC8;
}

.ai-messages-scroll {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  max-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.ai-bubble.user {
  align-self: flex-end;
  background: var(--accent-coffee);
  color: #FFF;
  border-bottom-right-radius: 2px;
}

.ai-bubble.assistant {
  align-self: flex-start;
  background: #FAF8F5;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-bottom-left-radius: 2px;
}

.ai-bubble.assistant h3, .ai-bubble.assistant h4 {
  margin: 6px 0 4px 0;
  font-size: 14px;
  color: #3E2723;
}

.ai-bubble.assistant ul, .ai-bubble.assistant ol {
  margin: 4px 0 6px 18px;
}

.ai-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-color);
  background: #FFF;
}

.ai-input-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
}

/* ================= ZERO-QUANTITY FADE AWAY ANIMATION ================= */
.order-line-row {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.order-line-row.fade-away-remove {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  opacity: 0 !important;
  transform: translateX(-40px) scale(0.9) !important;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-bottom-width: 0 !important;
  pointer-events: none !important;
}

/* ================= HEADER & CART WAITING TIME PILLS ================= */
.header-queue-pill {
  background: rgba(255, 255, 255, 0.12);
  color: #FFF8E7;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(212, 163, 115, 0.3);
}

.queue-wait-badge {
  background: #FFF3E0;
  color: #E65100;
  border: 1px solid #FFE0B2;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  letter-spacing: 0.3px;
}

.btn-unsettled-pill {
  background: #FFF8E1;
  color: #B45309;
  border: 1px solid #FDE68A;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-unsettled-pill:hover {
  background: #FEF3C7;
  transform: translateY(-1px);
}

.customer-pill-action {
  font-size: 11px;
  font-weight: 800;
  color: #B45309;
  background: #FEF3C7;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ================= ACTION PAD BUTTONS ================= */
.btn-action-kitchen-paylater {
  flex: 1.6;
  height: 48px;
  background: #B45309;
  color: #FFF;
  border: none;
  font-size: 13px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.25);
  transition: background 0.15s;
}

.btn-action-kitchen-paylater:hover {
  background: #92400E;
}

/* ================= CUSTOMER INTAKE & LOYALTY MODAL ================= */
.barista-cue-box {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 11px;
  line-height: 1.4;
  color: #92400E;
}

.barista-cue-box .cue-icon {
  font-size: 16px;
  line-height: 1;
}

.cust-profile-found-card {
  background: #FDFBF7;
  border: 2px solid #2E7D32;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.loyalty-member-tag {
  background: #E8F5E9;
  color: #1B5E20;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.points-badge-box {
  background: #2E7D32;
  color: #FFF;
  border-radius: 6px;
  padding: 6px 12px;
  text-align: center;
}

.points-badge-box .pts-val {
  display: block;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.points-badge-box .pts-lbl {
  font-size: 9px;
  font-weight: 700;
  opacity: 0.9;
  text-transform: uppercase;
}

.cust-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #FFF;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #EADBC8;
}

.stat-item {
  text-align: center;
}

.stat-lbl {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
}

.stat-val {
  font-size: 13px;
  font-weight: 800;
}

.intake-upsell-banner {
  background: #FFF8E7;
  border-left: 3px solid #D4A373;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #8D4B00;
}

.btn-proceed-order {
  width: 100%;
  padding: 14px;
  background: #2E7D32;
  color: #FFF;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(46, 125, 50, 0.3);
  transition: background 0.15s, transform 0.1s;
}

.btn-proceed-order:hover {
  background: #1B5E20;
  transform: translateY(-1px);
}

.prompt-enroll-box {
  background: #FAF8F5;
  border: 1px solid #EADBC8;
  border-radius: 8px;
  padding: 18px;
  text-align: center;
}

.otp-verification-panel {
  background: #FFF;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
}

.sms-preview-bubble {
  background: #FAF3E0;
  border: 1px dashed #D4A373;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.chip-quick-otp {
  margin-top: 6px;
  background: #5D4037;
  color: #FFF;
  border: none;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  cursor: pointer;
}

.chip-quick-otp:hover {
  background: #3E2723;
}

/* ================= ONLINE LOYALTY & FLASH DEALS ================= */
.online-loyalty-banner {
  background: linear-gradient(135deg, #4E342E 0%, #2C1810 100%);
  color: #FFF;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.online-fresh-bakes-alert {
  background: #FFF8E7;
  border: 1px solid #FFE082;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ================= UNSETTLED ORDERS CARDS ================= */
.unsettled-ticket-card {
  background: #FFF;
  border: 1px solid #EADBC8;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.unsettled-ticket-card:hover {
  border-color: #B45309;
}

.btn-settle-ticket {
  background: #2E7D32;
  color: #FFF;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.btn-settle-ticket:hover {
  background: #1B5E20;
}

/* ================= HEADER & CART PICKUP PILLS ================= */
.btn-online-pickups-pill {
  background: linear-gradient(135deg, #4E342E 0%, #2C1810 100%);
  color: #FFF;
  border: 1px solid #D4A373;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn-online-pickups-pill:hover {
  transform: translateY(-1px);
  background: #2C1810;
}

.btn-pickups-desk-pill {
  background: #EFEBE9;
  color: #4E342E;
  border: 1px solid #BCAAA4;
  padding: 5px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-pickups-desk-pill:hover {
  background: #D7CCC8;
}

/* ================= ONLINE STOREFRONT TWO-COLUMN LAYOUT ================= */
.online-container {
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.online-hero-banner {
  background: linear-gradient(135deg, #2C1810 0%, #4E342E 100%);
  color: #FFF8E7;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.online-storefront-wrapper {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .online-storefront-wrapper {
    grid-template-columns: 1fr 340px;
    gap: 14px;
  }
}

@media (max-width: 860px) {
  .online-storefront-wrapper {
    grid-template-columns: 1fr;
  }
}

/* LEFT COLUMN: Catalog */
.online-catalog-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.online-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #FFF;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.online-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FAF8F5;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
}

.online-search-wrap input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
}

.online-category-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.online-cat-chip {
  background: #F5EBE1;
  color: #4E342E;
  border: 1px solid #D7CCC8;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.online-cat-chip:hover {
  background: #EADBC8;
}

.online-cat-chip.active {
  background: var(--accent-coffee);
  color: #FFF;
  border-color: var(--accent-coffee);
}

.online-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

/* Online Product Card */
.online-item-card {
  background: #FFF;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.online-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.online-item-img-wrap {
  width: 100%;
  height: 120px;
  background: #FAF8F5;
  position: relative;
  overflow: hidden;
}

.online-item-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.online-item-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(44, 24, 16, 0.85);
  color: #FFF;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.online-item-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.online-item-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 4px;
}

.online-item-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
  margin-bottom: 8px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.online-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #FAF8F5;
}

.online-item-price {
  font-size: 14px;
  font-weight: 900;
  color: var(--accent-coffee);
}

.btn-online-add {
  background: var(--accent-coffee);
  color: #FFF;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-online-add:hover {
  background: #3E2723;
}

.online-qty-stepper {
  display: inline-flex;
  align-items: center;
  background: #FAF8F5;
  border: 1px solid var(--accent-coffee);
  border-radius: 4px;
  overflow: hidden;
}

.btn-stepper-sub, .btn-stepper-add {
  background: var(--accent-coffee);
  color: #FFF;
  border: none;
  width: 26px;
  height: 26px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-stepper-sub:hover, .btn-stepper-add:hover {
  background: #3E2723;
}

.stepper-val {
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-coffee);
  min-width: 24px;
  text-align: center;
}

/* RIGHT COLUMN: Sticky Cart Panel */
.online-cart-column {
  position: relative;
}

.online-cart-sticky-card {
  position: sticky;
  top: 70px;
  background: #FFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.online-cart-header {
  padding: 12px 16px;
  background: #FAF8F5;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-cart-count {
  background: var(--accent-warm);
  color: #2C1810;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

.btn-clear-cart {
  background: none;
  border: none;
  color: #8D6E63;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.btn-clear-cart:hover {
  color: #C62828;
}

.online-cart-items-scroll {
  max-height: 240px;
  overflow-y: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
}

.online-cart-empty {
  text-align: center;
  padding: 28px 12px;
  color: var(--text-secondary);
}

.online-cart-line-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed #F5EBE1;
  gap: 8px;
}

.online-cart-line-item:last-child {
  border-bottom: none;
}

.online-cart-item-info {
  flex: 1;
}

.online-cart-item-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.online-cart-item-unit {
  font-size: 10px;
  color: var(--text-secondary);
}

.online-cart-calc-box {
  padding: 10px 16px;
  background: #FAF8F5;
  border-bottom: 1px solid var(--border-color);
}

.cart-calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.cart-calc-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 900;
  color: var(--accent-dark);
  border-top: 1px dashed #D4A373;
  padding-top: 6px;
  margin-top: 4px;
}

.online-checkout-form {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group-online label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 3px;
}

.online-payment-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.online-pay-choice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #FFF;
}

.online-pay-choice input[type="radio"] {
  margin-top: 2px;
  accent-color: var(--accent-coffee);
}

.online-pay-choice.active {
  border-color: var(--accent-coffee);
  background: #FAF8F5;
}

.pay-choice-content {
  flex: 1;
}

.pay-subbadge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-place-online-order {
  background: #2E7D32;
  color: #FFF;
  border: none;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 10px rgba(46,125,50,0.25);
  transition: all 0.2s ease;
}

.btn-place-online-order:hover:not(:disabled) {
  background: #1B5E20;
  box-shadow: 0 6px 14px rgba(46,125,50,0.35);
}

.btn-place-online-order:disabled {
  background: #BDBDBD;
  cursor: not-allowed;
  box-shadow: none;
}

.pickup-notice-mini {
  font-size: 10px;
  color: #8D4B00;
  background: #FFF8E7;
  padding: 6px 8px;
  border-radius: 4px;
  line-height: 1.3;
}

/* ================= SIMULATED SMARTPHONE SMS MOCKUP ================= */
.sms-received-phone-mockup {
  background: #F3F4F6;
  border: 1px solid #D1D5DB;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.sms-phone-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #4B5563;
  margin-bottom: 8px;
}

.sms-sender-tag {
  background: #E5E7EB;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 10px;
  color: #1F2937;
}

.sms-bubble-content {
  background: #E5E7EB;
  border-radius: 12px 12px 12px 2px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.45;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  word-break: break-word;
}

.sms-action-bar {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-sms-action {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease;
}

.btn-sms-action:hover {
  opacity: 0.9;
}

.btn-sms-primary {
  background: #2E7D32;
  color: #FFF;
  flex: 1;
}

.btn-sms-secondary {
  background: #4E342E;
  color: #FFF;
}

/* ================= COUNTER ONLINE PICKUP DISPATCH DESK ================= */
.pickup-ticket-card {
  background: #FFF;
  border: 1.5px solid #EADBC8;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.pickup-ticket-card.ready {
  border-color: #2E7D32;
  background: #FAFDF9;
}

.pickup-ticket-card.unpaid {
  border-color: #F59E0B;
}

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

.pickup-items-checklist {
  background: #FAF8F5;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pickup-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-main);
}

.pickup-tender-bar {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.btn-pickup-tender {
  flex: 1;
  background: #FFF;
  border: 1px solid var(--border-color);
  padding: 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.btn-pickup-tender.active {
  background: var(--accent-coffee);
  color: #FFF;
  border-color: var(--accent-coffee);
}

/* ================= CAFE OPERATIONAL HOURS & ADVANCE ORDER BANNER ================= */
.cafe-status-banner {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
}

.cafe-status-banner.cafe-status-closed {
  background: #FFF8E7;
  border: 1.5px solid #FCD34D;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
}

.cafe-status-banner.cafe-status-open {
  background: #F0FDF4;
  border: 1.5px solid #86EFAC;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.1);
}

.badge-advance-pill {
  background: linear-gradient(135deg, #B45309 0%, #78350F 100%);
  color: #FFF;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.3);
  transition: transform 0.15s ease;
  white-space: nowrap;
}

.badge-advance-pill:hover {
  transform: translateY(-1px);
}

/* ================= CLIENT AUTHENTICATION & LOGIN GATE ================= */
#client-login-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: radial-gradient(circle at 50% 25%, #3E2723 0%, #1A0F0A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  backdrop-filter: blur(8px);
}

.login-card {
  background: #FFFFFF;
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  padding: 36px 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(212, 163, 115, 0.3);
  text-align: center;
  position: relative;
  animation: loginSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-logo-ring {
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #FAF3E0 0%, #F5EBE1 100%);
  border: 3px solid var(--accent-warm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  box-shadow: 0 6px 16px rgba(212, 163, 115, 0.35);
  animation: hourglassGlow 3s infinite ease-in-out;
}

@keyframes hourglassGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 163, 115, 0.4); transform: scale(1); }
  50% { box-shadow: 0 0 0 12px rgba(212, 163, 115, 0); transform: scale(1.04); }
}

.login-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--accent-dark);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.login-tagline {
  font-size: 13px;
  color: var(--accent-coffee);
  font-weight: 600;
  margin-bottom: 6px;
}

.login-badge-staff {
  display: inline-block;
  background: #FFF8E7;
  color: #B45309;
  border: 1px solid #FCD34D;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 22px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.login-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field-group label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-wrap input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  background: #FAF8F5;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
}

.login-input-wrap input:focus {
  background: #FFFFFF;
  border-color: var(--accent-warm);
  box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.25);
}

.btn-toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
}

.login-error-alert {
  background: #FFEBEE;
  color: #C62828;
  border: 1.5px solid #FFCDD2;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.btn-login-submit {
  background: linear-gradient(135deg, #4E342E 0%, #2C1810 100%);
  color: #FFF8E7;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(44, 24, 16, 0.35);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.btn-login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(44, 24, 16, 0.45);
}

.btn-login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 10px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.btn-customer-portal {
  background: #FAF8F5;
  color: var(--accent-coffee);
  border: 1.5px dashed var(--accent-warm);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: block;
}

.btn-customer-portal:hover {
  background: #FFF8E7;
  border-color: #B45309;
  color: #78350F;
}

.login-footer-security {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Logout button in header */
.btn-logout-control {
  background: #3E2723;
  color: #FAF3E0;
  border: 1px solid #5D4037;
  border-radius: var(--radius-sm);
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-logout-control:hover {
  background: #C62828;
  border-color: #EF5350;
  color: #FFFFFF;
}

/* ================= CUSTOMER PORTAL MODE (order.hourglas.pos.com or /order) ================= */
body.customer-portal-mode .nav-tabs {
  display: none !important;
}

body.customer-portal-mode #cashier-display-badge,
body.customer-portal-mode #btn-close-session-modal,
body.customer-portal-mode #btn-header-pickups,
body.customer-portal-mode #btn-auth-logout {
  display: none !important;
}

body.customer-portal-mode #btn-customer-staff-login {
  display: flex !important;
}

.btn-staff-login-pill {
  background: #3E2723;
  color: #FAF3E0;
  border: 1.5px solid var(--accent-warm);
  border-radius: 20px;
  padding: 5px 13px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-staff-login-pill:hover {
  background: #5D4037;
  border-color: #FAF3E0;
  transform: translateY(-1px);
}


