/* ═══════════════════════════════════════════════════════════════
   ISKCON Montreal Boutique — POS Stylesheet
   Uses mandir design tokens from css/tokens.css
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Boutique-specific overrides (not in mandir tokens.css) ── */
:root {
  --c-boutique-strong: #3d2f8a;   /* cart header, complete-sale btn (dark purple) */
  --c-boutique-dark:   #2a1f6b;   /* hover on above */
  --transition:        0.18s ease;
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--f-sans);
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-size: var(--f-md);
  line-height: 1.5;
}

/* ════════════════════════════════════════
   HEADER
   ════════════════════════════════════════ */
#app-header {
  background: linear-gradient(135deg, var(--c-boutique-strong) 0%, var(--c-boutique-dark) 100%);
  color: var(--c-surface);
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.header-brand h1 {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.header-subtitle {
  font-size: 0.72rem;
  font-weight: 300;
  opacity: 0.82;
  letter-spacing: 1.2px;
  margin-top: 2px;
}

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

/* ════════════════════════════════════════
   BUTTON SYSTEM
   ════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: none;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: var(--f-sm);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 44px;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(0.96); }

.btn-saffron {
  background: var(--c-accent);
  color: var(--c-surface);
}
.btn-saffron:hover { background: var(--c-accent-h); }

.btn-outline-white {
  background: transparent;
  color: var(--c-surface);
  border: 1.5px solid rgba(255,255,255,0.45);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.7); }

.btn-ghost-white {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(255,255,255,0.25);
}
.btn-ghost-white:hover { background: rgba(255,255,255,0.10); color: var(--c-surface); }

.btn-outline-dark {
  background: transparent;
  color: var(--c-text-dim);
  border: 1.5px solid var(--c-border);
}
.btn-outline-dark:hover { border-color: var(--c-accent); color: var(--c-accent-h); }

.btn-ghost-dark {
  background: transparent;
  color: var(--c-text-dim);
  border: 1.5px solid var(--c-border);
}
.btn-ghost-dark:hover { background: var(--c-neutral-hover); }

.btn-danger {
  background: var(--c-err);
  color: var(--c-surface);
}
.btn-danger:hover { background: #c94c4c; }

/* ════════════════════════════════════════
   MAIN LAYOUT
   ════════════════════════════════════════ */
#app-main {
  flex: 1;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px;
}

/* ── Cashier: two-column layout ── */
.cashier-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  align-items: start;
}

/* ════════════════════════════════════════
   CATALOG SECTION
   ════════════════════════════════════════ */
.catalog-section { min-width: 0; }

.catalog-notice {
  background: var(--c-warn-bg);
  color: var(--c-warn-text);
  border: 1px solid var(--c-warn-border);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  font-size: var(--f-xs);
  margin-bottom: 12px;
}

/* Controls */
.catalog-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.search-input {
  width: 100%;
  padding: 11px 16px;
  border: 2px solid var(--c-border);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 0.92rem;
  background: var(--c-surface);
  color: var(--c-text);
  min-height: 44px;
  transition: border-color var(--transition);
}
.search-input:focus { outline: none; border-color: var(--c-accent); }
.search-input::placeholder { color: var(--c-text-dim); }

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  padding: 6px 14px;
  border: 1.5px solid var(--c-border);
  border-radius: 20px;
  background: var(--c-surface);
  color: var(--c-text-dim);
  font-family: inherit;
  font-size: var(--f-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 34px;
}
.filter-btn:hover { border-color: var(--c-accent); color: var(--c-accent-h); }
.filter-btn.active {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: var(--c-surface);
  font-weight: 700;
}

/* Product Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.grid-status {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--c-text-dim);
  font-size: 0.95rem;
}
.grid-status.error { color: var(--c-err); }

/* Product Card */
.product-card {
  background: var(--c-surface);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  border: 2px solid transparent;
  user-select: none;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  border-color: var(--c-accent);
}
.product-card:active { transform: translateY(0); box-shadow: var(--sh-sm); }
.product-card.flash { border-color: var(--c-accent); background: var(--c-accent-active); }

.product-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--c-neutral-hover);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-img-fallback {
  font-size: 2rem;
  opacity: 0.35;
  pointer-events: none;
}

.product-body {
  padding: 9px 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.product-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.3;
}

.product-donation {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-boutique-strong);
}

.product-category {
  font-size: 0.67rem;
  color: var(--c-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 500;
}

/* ════════════════════════════════════════
   CART PANEL
   ════════════════════════════════════════ */
.cart-panel {
  background: var(--c-surface);
  border-radius: var(--r-md);
  box-shadow: var(--sh-md);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 74px;
  max-height: calc(100dvh - 90px);
  overflow: hidden;
}

/* Cart Header */
.cart-header {
  background: var(--c-boutique-strong);
  color: var(--c-surface);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cart-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.btn-clear-cart {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--r-sm);
  padding: 5px 10px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-clear-cart:hover { background: rgba(255,255,255,0.22); color: var(--c-surface); }

/* Cart Items List */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  min-height: 80px;
  max-height: 310px;
}

.cart-empty-msg {
  text-align: center;
  padding: 28px 12px;
  color: var(--c-text-dim);
  font-size: 0.82rem;
  line-height: 1.6;
}

/* Individual cart item */
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 4px;
  padding: 9px 6px;
  border-bottom: 1px solid var(--c-border);
  align-items: center;
}
.cart-item:last-child { border-bottom: none; }

.ci-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-text);
  grid-column: 1;
  grid-row: 1;
  line-height: 1.3;
}

.ci-price {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
}

.ci-price-symbol {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-boutique-strong);
  line-height: 1;
}

.ci-price-input {
  width: 58px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--c-boutique-strong);
  font-family: inherit;
  background: transparent;
  border: none;
  border-bottom: 1px dashed transparent;
  text-align: right;
  padding: 1px 2px;
  outline: none;
  -moz-appearance: textfield;
}
.ci-price-input::-webkit-outer-spin-button,
.ci-price-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.ci-price-input:hover  { border-bottom-color: var(--c-border); }
.ci-price-input:focus  { border-bottom-color: var(--c-accent); border-bottom-style: solid; }

/* Visual cue when price is below suggested */
.ci-price--discounted .ci-price-symbol,
.ci-price--discounted .ci-price-input {
  color: var(--c-accent-h);
}

.ci-controls {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ci-remove {
  grid-column: 2;
  grid-row: 2;
  background: none;
  border: none;
  color: var(--text-xlight);
  cursor: pointer;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all var(--transition);
}
.ci-remove { color: var(--c-err) !important; }
.ci-remove:hover { background: var(--c-err-hover); }

.qty-btn {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--c-border);
  border-radius: 5px;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all var(--transition);
  flex-shrink: 0;
}
.qty-btn:hover { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-surface); }

.qty-num {
  font-size: 0.88rem;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
  color: var(--c-text);
}

/* Cart Footer */
.cart-footer {
  padding: 12px 14px;
  background: var(--c-bg);
  border-top: 2px solid var(--c-border);
  flex-shrink: 0;
}

.suggested-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.label-suggested {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--c-text-dim);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.value-suggested {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-text);
}

.cart-divider {
  height: 0;
  border: none;
  border-top: 2px dashed var(--c-border);
  margin: 10px 0;
}

.value-donation { color: var(--c-ok); }

/* Actual Donation */
.actual-donation-block { margin-bottom: 12px; }

.actual-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--c-boutique-strong);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.actual-input-wrapper {
  display: flex;
  align-items: stretch;
  border: 2.5px solid var(--c-accent);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--c-surface);
  transition: border-color var(--transition);
}
.actual-input-wrapper:focus-within { border-color: var(--c-boutique-strong); }

.currency-prefix {
  padding: 8px 10px 8px 13px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-boutique-strong);
  background: var(--c-neutral-hover);
  border-right: 1.5px solid var(--c-border);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.actual-input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: none;
  font-family: inherit;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--c-boutique-strong);
  background: var(--c-surface);
  width: 100%;
}
.actual-input:focus { outline: none; }
.actual-input::placeholder { color: var(--c-border); font-weight: 400; }
/* Hide browser spin buttons */
.actual-input::-webkit-outer-spin-button,
.actual-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.actual-input[type=number] { -moz-appearance: textfield; }

/* Payment Method Toggle */
.payment-method-block {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.payment-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--c-text-dim);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.payment-toggle {
  display: flex;
  border: 2px solid var(--c-border);
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.payment-btn {
  padding: 8px 16px;
  border: none;
  background: var(--c-surface);
  color: var(--c-text-dim);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 38px;
  white-space: nowrap;
}
.payment-btn + .payment-btn { border-left: 2px solid var(--c-border); }
.payment-btn:hover { background: var(--c-neutral-hover); color: var(--c-text); }
.payment-btn.active {
  background: var(--c-boutique-strong);
  color: var(--c-surface);
}

/* Complete Sale Button */
.btn-complete-sale {
  width: 100%;
  padding: 15px;
  background: var(--c-boutique-strong);
  color: var(--c-surface);
  border: none;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 54px;
  transition: all var(--transition);
}
.btn-complete-sale:hover { background: var(--c-accent); }
.btn-complete-sale:active { transform: scale(0.98); }

/* ════════════════════════════════════════
   ADMIN MODE
   ════════════════════════════════════════ */
.admin-mode { max-width: 820px; }

.admin-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.admin-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-boutique-strong);
  padding-bottom: 14px;
  border-bottom: 2px solid var(--c-border);
  margin-bottom: 16px;
}

.admin-card {
  background: var(--c-surface);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  padding: 20px 22px;
  margin-bottom: 14px;
}

.admin-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.admin-hint {
  font-size: 0.83rem;
  color: var(--c-text-dim);
  margin-bottom: 8px;
}
.admin-label {
  display: block;
  font-size: 0.8rem;
  font-weight: var(--f-wt-b);
  color: var(--c-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.admin-url-input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--c-border);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--c-text);
  margin-bottom: 10px;
  min-height: 44px;
  transition: border-color var(--transition);
}
.admin-url-input:focus { outline: none; border-color: var(--c-accent); }
.admin-url-input::placeholder { color: var(--c-text-dim); }

.admin-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.conn-status {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 6px;
}
.conn-status.success { background: var(--c-ok-active); color: var(--c-ok); border: 1px solid rgba(58, 158, 110, .3); }
.conn-status.error   { background: var(--c-err-hover); color: var(--c-err); border: 1px solid rgba(226, 92, 92, .3); }
.conn-status.loading { background: var(--c-warn-bg);   color: var(--c-warn-text); border: 1px solid var(--c-warn-border); }

.sheet-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  color: var(--c-accent-h);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.sheet-link:hover { text-decoration: underline; }

.admin-steps {
  list-style: decimal;
  padding-left: 20px;
  font-size: 0.86rem;
  color: var(--c-text-dim);
  line-height: 2;
}
.admin-steps code {
  background: var(--c-neutral-hover);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.82rem;
  color: var(--c-boutique-strong);
}

/* Past reports */
.past-report-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--c-bg);
  border-radius: var(--r-sm);
  margin-bottom: 6px;
}
.past-report-row:last-child { margin-bottom: 0; }
.past-report-date { font-size: 0.85rem; font-weight: 600; color: var(--c-text); }
.past-report-meta { font-size: 0.77rem; color: var(--c-text-dim); margin-top: 2px; }
.past-report-diff { font-size: 0.9rem; font-weight: 700; }
.past-report-diff.positive { color: var(--c-ok); }
.past-report-diff.negative { color: var(--c-err); }
.past-report-diff.zero { color: var(--c-text-dim); }

.admin-danger-card {
  background: var(--c-err-hover);
  border: 1.5px solid rgba(226, 92, 92, .3);
}
.admin-danger-card h3 { color: var(--c-err); }

.danger-note {
  font-size: 0.78rem;
  color: #7F1D1D;
  margin-top: 8px;
  line-height: 1.5;
}

/* ════════════════════════════════════════
   MODAL
   ════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--c-overlay);
  backdrop-filter: blur(2px);
}

.modal-box {
  position: relative;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  width: 100%;
  max-width: 700px;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  background: var(--c-boutique-strong);
  color: var(--c-surface);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-head h2 { font-size: 1rem; font-weight: 700; letter-spacing: 0.5px; }

.btn-icon-close {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--c-surface);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-icon-close:hover { background: rgba(255,255,255,0.22); }

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

.modal-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--c-border);
  background: var(--c-bg);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── Database modal ── */
.modal-box--wide { max-width: 52rem; }

.db-body { display: flex; flex-direction: column; gap: var(--s-lg); }
.db-empty { color: var(--c-text-dim); font-size: var(--f-sm); text-align: center; padding: var(--s-xl) 0; }

.db-day { margin-bottom: var(--s-sm); }

.db-day-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: var(--s-xs);
  border-bottom: 2px solid var(--c-border);
  margin-bottom: var(--s-sm);
}
.db-day-label { font-weight: var(--f-wt-b); font-size: var(--f-md); color: var(--c-text); }
.db-day-count  { font-size: var(--f-sm); color: var(--c-text-dim); }
.db-day-info    { display: flex; align-items: baseline; gap: var(--s-sm); }
.db-day-summary { display: flex; gap: var(--s-xs); font-size: var(--f-sm); }
.db-day-total-inline    { color: var(--c-ok); font-weight: var(--f-wt-b); }
.db-day-donation-inline { color: var(--c-warn-text); font-weight: var(--f-wt-b); }
.db-day-cats { display: flex; gap: var(--s-md); flex-wrap: wrap; padding: 2px 0 6px; }
.db-day-cat  { font-size: var(--f-sm); color: var(--c-text-dim); }

.db-tx {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: var(--s-sm) var(--s-md);
  margin-bottom: var(--s-xs);
}
.db-tx-meta {
  display: flex;
  gap: var(--s-sm);
  align-items: center;
  margin-bottom: var(--s-xs);
  font-size: var(--f-sm);
  color: var(--c-text-dim);
}
.db-tx-method {
  background: var(--c-accent);
  color: #fff;
  font-size: var(--f-xs);
  font-weight: var(--f-wt-b);
  padding: 1px 8px;
  border-radius: 99px;
  letter-spacing: 0.3px;
}
.db-tx-item {
  display: flex;
  justify-content: space-between;
  font-size: var(--f-sm);
  padding: 2px 0;
}
.db-item-name { color: var(--c-text); display: flex; align-items: center; gap: var(--s-xs); }
.db-item-cat {
  font-size: var(--f-xs);
  background: var(--c-accent-hover);
  color: var(--c-accent);
  border-radius: 99px;
  padding: 0 6px;
  font-weight: var(--f-wt-b);
  white-space: nowrap;
}
.db-item-amt  { color: var(--c-text-dim); }
.db-tx-collected {
  display: flex;
  justify-content: space-between;
  font-weight: var(--f-wt-b);
  font-size: var(--f-sm);
  margin-top: var(--s-xs);
  padding-top: var(--s-xs);
  border-top: 1px solid var(--c-border);
  color: var(--c-ok);
}
.db-tx-donation {
  display: flex;
  justify-content: space-between;
  font-size: var(--f-sm);
  padding-top: 2px;
  color: var(--c-warn-text);
  font-weight: var(--f-wt-b);
}
.db-loading {
  text-align: center;
  color: var(--c-text-dim);
  padding: var(--s-xl) 0;
  font-size: var(--f-sm);
}
.db-error {
  text-align: center;
  color: var(--c-danger);
  padding: var(--s-md) 0;
  font-size: var(--f-sm);
}
.sync-status          { font-size: var(--f-sm); flex: 1; }
.sync-status--ok      { color: var(--c-ok); }
.sync-status--error   { color: var(--c-danger); }
.sync-status--syncing { color: var(--c-text-dim); }

/* Report Content */
.report-date-label {
  font-size: 0.82rem;
  color: var(--c-text-dim);
  margin-bottom: 3px;
}
.report-tx-count {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 18px;
}
.report-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-text-dim);
  margin-bottom: 10px;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 18px;
}
.report-table th {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 2px solid var(--c-boutique-strong);
  color: var(--c-boutique-strong);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.report-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
  vertical-align: middle;
}
.report-item-icon { font-size: var(--f-md); width: 28px; }
.report-table td:nth-child(1) { width: 28px; padding-right: 4px; }
.report-table td:nth-child(3) { text-align: center; }
.report-table td:nth-child(4),
.report-table th:nth-child(4) { text-align: right; }
.report-table tr:last-child td { border-bottom: none; }

.report-empty { text-align: center; padding: 30px; color: var(--c-text-dim); font-size: 0.9rem; }

.report-tx {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: var(--s-sm) var(--s-md);
  margin-bottom: var(--s-xs);
}
.report-tx-meta {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  font-size: var(--f-sm);
  margin-bottom: var(--s-xs);
}
.report-tx-icon     { font-size: var(--f-md); }
.report-tx-method   { font-weight: var(--f-wt-b); color: var(--c-text); }
.report-tx-time     { color: var(--c-text-dim); flex: 1; }
.report-tx-collected { font-weight: var(--f-wt-b); color: var(--c-ok); }
.report-tx-item {
  display: flex;
  justify-content: space-between;
  font-size: var(--f-sm);
  padding: 2px 0;
  color: var(--c-text);
}
.report-tx-donation {
  display: flex;
  justify-content: space-between;
  font-size: var(--f-sm);
  padding-top: 2px;
  color: var(--c-warn-text);
  font-weight: var(--f-wt-b);
}

.report-summary-box {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 0.88rem;
  color: var(--c-text-dim);
}
.summary-row.main {
  border-top: 2px solid var(--c-border);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
}
.summary-row.diff-positive { font-weight: 700; color: var(--c-ok);  font-size: 0.95rem; }
.summary-row.diff-negative { font-weight: 700; color: var(--c-err); font-size: 0.95rem; }
.summary-row.diff-zero     { font-weight: 700; color: var(--c-text-dim); font-size: 0.95rem; }
.summary-percentage {
  text-align: center;
  font-size: 0.8rem;
  color: var(--c-text-dim);
  font-style: italic;
  margin-top: 10px;
}
.payment-row { color: var(--c-text-dim); }
.payment-count { font-weight: 400; font-size: 0.78rem; color: var(--c-text-dim); }

/* ════════════════════════════════════════
   WARNING DIALOG
   ════════════════════════════════════════ */
.warning-overlay {
  position: fixed;
  inset: 0;
  background: var(--c-overlay);
  backdrop-filter: blur(2px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.warning-box {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: 24px 26px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--sh-lg);
}
.warning-box h3 { font-size: 1.05rem; color: var(--c-warn-text); margin-bottom: 10px; }
.warning-box p  { font-size: 0.88rem; color: var(--c-text-dim); line-height: 1.6; margin-bottom: 18px; }
.warning-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ════════════════════════════════════════
   TOAST
   ════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--c-surface);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  border-left: 5px solid var(--c-accent);
  z-index: 400;
  max-width: 300px;
  width: calc(100vw - 48px);
  animation: toastIn 0.3s ease forwards;
}
@keyframes toastIn {
  from { transform: translateY(20px) scale(0.95); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}
.toast-icon { font-size: 2rem; flex-shrink: 0; }
.toast-text { display: flex; flex-direction: column; gap: 2px; }
.toast-text strong { font-size: 0.95rem; color: var(--c-boutique-strong); }
.toast-text span   { font-size: 0.85rem; color: var(--c-text-dim); }

/* ════════════════════════════════════════
   UTILITIES
   ════════════════════════════════════════ */
.hidden { display: none !important; }

/* ════════════════════════════════════════
   PRINT STYLES
   ════════════════════════════════════════ */
#print-area { display: none; }

@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area {
    display: block !important;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11pt;
    color: #000;
    padding: 10mm;
  }
  .print-report { max-width: 80ch; margin: 0 auto; }
  .print-report pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Courier New', Courier, monospace;
    font-size: 10.5pt;
    line-height: 1.55;
    color: #000;
  }
}

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 960px) {
  .cashier-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  .cart-panel {
    position: static;
    max-height: none;
  }
  .cart-items { max-height: 220px; }
}

@media (max-width: 600px) {
  .header-brand h1 { font-size: 1rem; }
  .header-subtitle { display: none; }
  .header-actions .btn { padding: 7px 11px; font-size: 0.78rem; min-height: 38px; }
  #app-main { padding: 10px; }
  .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
  .product-name { font-size: 0.78rem; }
  .product-body { padding: 7px 8px 9px; }
  .btn-complete-sale { font-size: 0.9rem; }
}

@media (max-width: 380px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
}
