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

/* â”€â”€ Theme CSS variables â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
  --t-sidebar-from: #4A1515;
  --t-sidebar-to:   #6B2020;
  --t-header-from:  #4A1515;
  --t-header-to:    #6B2020;
  --t-deep:         #4A1515;
  --t-shadow:       rgba(74,21,21,0.20);
  --t-tint:         rgba(74,21,21,0.08);
}

/* Midnight Blue */
body.theme-blue {
  --t-sidebar-from: #1a3a5c;
  --t-sidebar-to:   #1e4d7a;
  --t-header-from:  #1a3a5c;
  --t-header-to:    #1e4d7a;
  --t-deep:         #1a3a5c;
  --t-shadow:       rgba(26,58,92,0.20);
  --t-tint:         rgba(26,58,92,0.08);
}

/* Emerald */
body.theme-green {
  --t-sidebar-from: #1a4d35;
  --t-sidebar-to:   #2d6b4a;
  --t-header-from:  #1a4d35;
  --t-header-to:    #2d6b4a;
  --t-deep:         #1a4d35;
  --t-shadow:       rgba(26,77,53,0.20);
  --t-tint:         rgba(26,77,53,0.08);
}

/* Royal Plum */
body.theme-plum {
  --t-sidebar-from: #3b1f5e;
  --t-sidebar-to:   #5c3382;
  --t-header-from:  #3b1f5e;
  --t-header-to:    #5c3382;
  --t-deep:         #3b1f5e;
  --t-shadow:       rgba(59,31,94,0.20);
  --t-tint:         rgba(59,31,94,0.08);
}


/* Dark */
body.theme-dark {
  --t-sidebar-from: #1a1a28;
  --t-sidebar-to:   #0f0f18;
  --t-header-from:  #1a1a28;
  --t-header-to:    #0f0f18;
  --t-deep:         #c0c0d0;
  --t-shadow:       rgba(0,0,0,0.50);
  --t-tint:         rgba(255,255,255,0.06);
  background: #0f0f18 !important;
}
body.theme-dark .auth-card, body.theme-dark .pos-cart-section,
body.theme-dark .item-card, body.theme-dark .tx-card, body.theme-dark .tx-receipt-card,
body.theme-dark .user-card, body.theme-dark .modal, body.theme-dark .settings-section,
body.theme-dark .stat-chip, body.theme-dark .tx-chip, body.theme-dark .pos-overlay-box,
body.theme-dark .app-dialog { background: #1e1e2e !important; border-color: rgba(255,255,255,0.08) !important; }

body.theme-dark .rp-body, body.theme-dark .rp-org-footer { background: #1e1e2e !important; border-color: rgba(255,255,255,0.08) !important; }

body.theme-dark .item-name, body.theme-dark .user-name, body.theme-dark .pos-cart-name,
body.theme-dark .tx-items, body.theme-dark .modal-title, body.theme-dark .app-dialog-title,
body.theme-dark .settings-section-title { color: #e2e2e8 !important; }

body.theme-dark .settings-section-header { background: #252535 !important; }
body.theme-dark .settings-section-header:hover,
body.theme-dark .settings-section.open .settings-section-header { background: #2a2a3e !important; }
body.theme-dark .settings-section-save { border-top-color: rgba(255,255,255,0.08) !important; }

body.theme-dark .form-input, body.theme-dark .search-input, body.theme-dark .tx-date-input {
  background: #252535 !important; border-color: rgba(255,255,255,0.12) !important; color: #e2e2e8 !important; }

body.theme-dark .form-label, body.theme-dark .pos-total-label, body.theme-dark .tx-time,
body.theme-dark .sidebar-clock-date { color: rgba(226,226,232,0.55) !important; }

body.theme-dark .pos-cart-row, body.theme-dark .item-footer { border-color: rgba(255,255,255,0.08) !important; }

body.theme-dark .btn-secondary { background: #252535 !important; color: #c0c0d0 !important; border-color: rgba(255,255,255,0.12) !important; }
body.theme-dark .btn-theme-outline { background: rgba(255,255,255,0.06) !important; color: #e2e2e8 !important; }

body.theme-dark .pos-empty, body.theme-dark .tx-empty { color: rgba(226,226,232,0.40) !important; }
body.theme-dark .popular-section { border-color: rgba(255,255,255,0.08) !important; }
body.theme-dark .popular-label   { color: rgba(226,226,232,0.50) !important; }
body.theme-dark .pos-cart-section, body.theme-dark .confirm-qr-box { background: #1e1e2e !important; }
/* Saffron */
body.theme-saffron {
  --t-sidebar-from: #7B3A00;
  --t-sidebar-to:   #C05A00;
  --t-header-from:  #7B3A00;
  --t-header-to:    #C05A00;
  --t-deep:         #7B3A00;
  --t-shadow:       rgba(123,58,0,0.20);
  --t-tint:         rgba(123,58,0,0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #F0EBE1;
  min-height: 100vh;
}

.hidden { display: none !important; }

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

/* â”€â”€ Full-page auth states â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.full-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
}

.dev-credit {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  text-align: center;
}
.dev-credit a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
}
.dev-credit a:hover { color: #fff; border-bottom-color: #fff; }

/* Sidebar dev credit */
.sidebar-dev-credit {
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  text-align: center;
  padding: 10px 12px 4px;
  line-height: 1.6;
}
.sidebar-dev-credit a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
}
.sidebar-dev-credit a:hover { color: rgba(255,255,255,0.7); }

.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 48px 36px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(74,21,21,0.12), 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid rgba(226,207,164,0.6);
}

.auth-card img { width: 80px; margin-bottom: 20px; }

.auth-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--t-deep);
  margin-bottom: 8px;
}

.auth-subtitle { font-size: 14px; color: #888; margin-bottom: 32px; }
.auth-note     { font-size: 12px; color: #bbb; margin-top: 16px; }

.auth-spinner {
  width: 40px; height: 40px;
  border: 3px solid #f0f0f0;
  border-top-color: #F47C20;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

/* â”€â”€ App shell layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#appShell {
  display: flex;
  min-height: 100vh;
}

/* â”€â”€ Sidebar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sidebar {
  width: 220px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--t-sidebar-from) 0%, var(--t-sidebar-to) 100%);
  border-right: none;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
  box-shadow: 3px 0 20px rgba(74,21,21,0.25);
}

.sidebar-logo {
  padding: 22px 18px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.sidebar-logo img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  object-fit: contain;
}

.sidebar-logo-text {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.biz-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

.biz-dot.open {
  background: #4caf50;
  box-shadow: 0 0 0 0 rgba(76,175,80,0.7);
  animation: biz-pulse 2s infinite;
}

.biz-dot.closed {
  background: #e53e3e;
  box-shadow: none;
}

@keyframes biz-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(76,175,80,0.7); }
  70%  { box-shadow: 0 0 0 6px rgba(76,175,80,0);   }
  100% { box-shadow: 0 0 0 0   rgba(76,175,80,0);   }
}

.sidebar-logo-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.50);
  font-family: inherit;
  font-weight: 400;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  background: none;
  border: none;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  width: 100%;
}

.nav-item:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.98);
}

/* Active: warm pill with orange accent */
.nav-item.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-weight: 700;
  border-left: 3px solid #F47C20;
  padding-left: 11px;
}

.nav-item-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-item-icon svg { width: 19px; height: 19px; }

.sidebar-footer {
  padding: 12px 10px 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-user-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
}

.sidebar-edit-name-btn {
  background: none; border: none; cursor: pointer;
  padding: 3px; color: rgba(255,255,255,0.35);
  border-radius: 4px; display: flex; align-items: center;
  flex-shrink: 0; transition: color 0.15s;
}
.sidebar-edit-name-btn:hover { color: rgba(255,255,255,0.80); }

.sidebar-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  margin-bottom: 4px;
  gap: 1px;
}

.sidebar-clock-time {
  font-size: 22px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

.sidebar-clock-date {
  font-size: 11px;
  color: rgba(255,255,255,0.50);
  letter-spacing: 0.3px;
}

.sidebar-user {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.1px;
}

/* â”€â”€ Business open/close toggle â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sidebar-business-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
}

.sidebar-business-btn.open {
  background: rgba(76,175,80,0.20);
  color: #81c784;
  border-color: rgba(76,175,80,0.35);
}

.sidebar-business-btn.open:hover { background: rgba(76,175,80,0.30); }

.sidebar-business-btn.closed {
  background: rgba(229,57,53,0.20);
  color: #ef9a9a;
  border-color: rgba(229,57,53,0.35);
}

.sidebar-business-btn.closed:hover { background: rgba(229,57,53,0.30); }

/* â”€â”€ Sidebar collapsible section â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sidebar-collapsible { width: 100%; }

.sidebar-collapsible-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.70);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
}

.sidebar-collapsible-header:hover { background: rgba(255,255,255,0.15); color: #fff; }

.sidebar-collapsible-header span { flex: 1; }

.sidebar-collapsible-header .chevron {
  transition: transform 0.2s;
  opacity: 0.6;
}

.sidebar-collapsible-header.open .chevron { transform: rotate(180deg); }

.sidebar-collapsible-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  padding-left: 8px;
}

.sidebar-sub-btn {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.60);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
  width: 100%;
}

.sidebar-sub-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }

.sidebar-theme-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding: 8px 14px;
}

.sidebar-theme-label {
  font-size: 11px;
  color: rgba(255,255,255,0.50);
  font-weight: 500;
  white-space: nowrap;
}

.theme-swatches {
  display: flex;
  gap: 6px;
}

.theme-swatch {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  padding: 0;
}

.theme-swatch:hover  { transform: scale(1.15); }
.theme-swatch.active { border-color: #fff; transform: scale(1.1); }


.user-blocked { opacity: 0.55; }

.user-disabled-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: #fce4ec;
  color: #c62828;
  vertical-align: middle;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.user-status-btn {
  background: none;
  border: 1.5px solid;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.user-status-btn.disable {
  border-color: #e53e3e;
  color: #e53e3e;
}

.user-status-btn.disable:hover {
  background: #e53e3e;
  color: #fff;
}

.user-status-btn.enable {
  border-color: #4caf50;
  color: #4caf50;
}

.user-status-btn.enable:hover {
  background: #4caf50;
  color: #fff;
}

.user-reset-btn {
  background: none;
  border: 1.5px solid #ede8de;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}

.user-reset-btn:hover {
  border-color: #F47C20;
  color: #F47C20;
  background: #fff8f2;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.70);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sidebar-logout:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.30);
}

/* â”€â”€ Main content area â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.app-content {
  margin-left: 220px;
  flex: 1;
  min-height: 100vh;
}

.view { display: none; }
.view.active { display: block; }

/* â”€â”€ View header bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.view-header {
  background: linear-gradient(135deg, var(--t-header-from) 0%, var(--t-header-to) 100%);
  border-top: none;
  border-bottom: none;
  padding: 14px 96px 14px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 3px 12px rgba(74,21,21,0.20);
}

.view-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

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

/* â”€â”€ Shared button styles â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn {
  padding: 9px 18px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: none;
  transition: background 0.15s, color 0.15s;
}

.btn-primary   { background: var(--t-sidebar-from); color: #fff; }
.btn-primary:hover  { background: #d96a10; }
/* Theme-aware button â€” uses the active sidebar colour */
.btn-theme          { background: var(--t-sidebar-from); color: #fff; border: none; }
.btn-theme:hover    { background: var(--t-sidebar-to);   color: #fff; }
.btn-secondary      { background: #fff; color: #555; border: 1.5px solid #ddd; }
.btn-secondary:hover { border-color: #bbb; }
.btn-danger         { background: #fff; color: #e53e3e; border: 1.5px solid #e53e3e; }
.btn-danger:hover   { background: #e53e3e; color: #fff; }

/* â”€â”€ Search input â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.search-input {
  padding: 9px 16px 9px 38px;
  border: 1.5px solid #e8e0d4;
  border-radius: 24px;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  flex: 1;
  max-width: 300px;
  background: #faf7f2
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bbb' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E")
    no-repeat 11px center / 16px;
  box-shadow: 0 1px 4px rgba(74,21,21,0.06);
}

.search-input::placeholder { color: #bbb; }

.search-input:focus {
  outline: none;
  border-color: #F47C20;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(244,124,32,0.12), 0 1px 4px rgba(74,21,21,0.06);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SELL VIEW
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.sell-body {
  width: 100%;
  padding: 28px 32px;
}

/* Sell sub-states */
.sell-state { display: none; }
.sell-state.active { display: block; }

/* Two-column POS layout */
#sell-main {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Products grid */
.pos-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  padding: 14px;
  flex: 1;
}

/* Locked while payment is in progress */
.pos-products.grid-locked {
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}

/* Cart panel: sticky sidebar on the right */
.pos-cart-panel {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pos-product-btn {
  padding: 18px 12px;
  background: #fff;
  border: 1.5px solid #e8e0d4;
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(74,21,21,0.06);
}

.pos-product-btn:hover {
  border-color: #F47C20;
  background: #fff8f2;
  box-shadow: 0 4px 16px rgba(244,124,32,0.15);
  transform: translateY(-1px);
}
.pos-product-btn:active { transform: scale(0.97); }

.pos-product-img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 6px;
  display: block;
}

.pos-product-name  { display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 4px; }
.pos-product-price { display: block; font-size: 14px; font-weight: 700; color: #F47C20; }

.pos-custom-btn { border-style: dashed; border-color: #F47C20; }
.pos-custom-btn .pos-product-name  { color: #F47C20; }
.pos-custom-btn .pos-product-price { color: #aaa; font-size: 12px; font-weight: 400; }

.pos-custom-img {
  width: 100%;
  height: 80px;
  border-radius: 6px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #fff5ec 0%, #fde8d0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  color: #F47C20;
  font-family: 'Cinzel', Georgia, serif;
  letter-spacing: -1px;
}

.pos-stock-badge {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #e53e3e;
  border-radius: 20px;
  padding: 2px 8px;
}

/* Cart panel sub-states */
.cart-state { display: none; flex-direction: column; gap: 12px; }
.cart-state.active { display: flex; }

.cart-method-amount {
  font-size: 32px;
  font-weight: 800;
  color: var(--t-deep);
  font-family: 'Cinzel', Georgia, serif;
  text-align: center;
  padding: 14px 0 6px;
}

/* Cart */
.pos-cart-section {
  background: #ffffff;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 4px 20px rgba(74,21,21,0.10);
  border: 1px solid #ede8de;
}

.pos-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.pos-cart-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--t-deep);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
/* Discount row in cart */
.pos-discount-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f1f1;
}

.pos-discount-label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #4caf50;
}

.pos-discount-amount {
  font-weight: 700;
  color: #4caf50;
  font-size: 14px;
}

.pos-discount-btn {
  width: 100%;
  padding: 8px;
  background: none;
  border: 1.5px dashed #F47C20;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #F47C20;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
  transition: background 0.15s;
}
.pos-discount-btn:hover { background: #fff8f2; }

/* Discount modal */
.discount-type-toggle {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 4px;
}

.discount-type-btn {
  flex: 1;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid #ddd;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.discount-type-btn.active {
  background: var(--t-sidebar-from);
  border-color: var(--t-deep);
  color: #fff;
}

.pos-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  color: #e53e3e;
  background: #fff5f5;
  border: 1.5px solid #fcc;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 20px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  letter-spacing: 0.2px;
}

.pos-clear-btn:hover {
  background: #e53e3e;
  border-color: #e53e3e;
  color: #fff;
}
.pos-clear-btn:hover {
  background: #ffeaea;
}
.pos-cart-items  { min-height: 40px; }

.pos-cart-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
  font-size: 15px;
  border-bottom: 1px solid #f1f1f1;
}

.pos-cart-row:last-child { border-bottom: none; }

.pos-cart-name {
  flex: 1;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.pos-cart-price {
  font-weight: 700;
  color: var(--t-deep);
  margin-right: 10px;
  font-size: 14px;
}

/* Qty +/âˆ’ control */
.cart-qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  background: #f8f4ef;
  border: 1.5px solid #ede8de;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
}

.cart-qty-btn {
  width: 28px; height: 28px;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.cart-qty-btn.minus { color: #e53e3e; }
.cart-qty-btn.minus:hover { background: #e53e3e; color: #fff; }
.cart-qty-btn.plus  { color: var(--t-deep); }
.cart-qty-btn.plus:hover  { background: var(--t-sidebar-from); color: #fff; }

.cart-qty-num {
  width: 36px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #333;
  font-family: inherit;
  border: none;
  background: transparent;
  outline: none;
  padding: 0;
  -moz-appearance: textfield;
}
.cart-qty-num::-webkit-inner-spin-button,
.cart-qty-num::-webkit-outer-spin-button { -webkit-appearance: none; }
.cart-qty-num:focus {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(244,124,32,0.25);
}

.cart-remove-btn {
  width: 28px; height: 28px;
  border: none;
  background: transparent;
  color: #ccc;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  margin-left: 4px;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}

.cart-remove-btn:hover {
  color: #e53e3e;
  background: #fff0f0;
}
.pos-delete-btn {
  width: 26px;
  height: 26px;
  background: #f7f7f7;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.pos-delete-btn:hover {
  background: #ffe0e0;
  color: #e53e3e;
}

.pos-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  margin-top: 12px;
  border-top: 2px solid #eee;
}

.pos-total-label {
  font-size: 15px;
  font-weight: 700;
  color: #444;
}
.pos-total-amount {
  font-size: 30px;
  font-weight: 800;
  color: #F47C20;
  font-family: 'Cinzel', Georgia, serif;
}

.pos-charge-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, var(--t-sidebar-from) 0%, var(--t-sidebar-to) 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 16px var(--t-shadow);
  letter-spacing: 0.3px;
}

.pos-charge-btn:hover:not(:disabled) {
  opacity: 0.92;
  box-shadow: 0 6px 24px var(--t-shadow);
  transform: translateY(-1px);
}
.pos-charge-btn:active:not(:disabled) {
  transform: scale(0.98);
}
.pos-charge-btn:disabled { opacity: 0.40; cursor: not-allowed; box-shadow: none; }

.pos-empty       { font-size: 13px; color: #bbb; text-align: center; padding: 16px 0; }

.pos-closed-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #e53e3e;
  background: #fff5f5;
  border: 1.5px solid #fcc;
  border-radius: 12px;
}
.pos-items-error { font-size: 13px; color: #e53e3e; text-align: center; padding: 12px 0 4px; }

/* QR state */
.qr-state-wrap { text-align: center; padding: 20px 0; }

.qr-state-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--t-deep);
  margin-bottom: 4px;
}

.qr-state-subtitle { font-size: 14px; color: #888; margin-bottom: 24px; }

#qrBox {
  display: inline-block;
  padding: 16px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 18px rgba(0,0,0,0.10);
  margin-bottom: 22px;
}

.qr-amount { font-size: 30px; font-weight: 700; color: var(--t-deep); margin-bottom: 16px; }

.pos-waiting {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  color: #888;
  margin-bottom: 20px;
}

.pos-spinner {
  width: 18px; height: 18px;
  border: 2px solid #eee;
  border-top-color: #F47C20;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.pos-cancel-btn {
  padding: 10px 28px;
  background: #fff;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.pos-cancel-btn:hover { border-color: #e53e3e; color: #e53e3e; }

/* Confirm state */
.confirm-state-wrap { text-align: center; padding: 32px 0; }

.pos-checkmark-svg { width: 80px; height: 80px; }

.pos-checkmark-circle {
  stroke: #4caf50; stroke-width: 2.5; fill: none;
  stroke-dasharray: 166; stroke-dashoffset: 166;
  animation: draw-circle 0.6s cubic-bezier(0.65,0,0.45,1) 0.1s forwards;
}

.pos-checkmark-check {
  stroke: #4caf50; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; fill: none;
  stroke-dasharray: 48; stroke-dashoffset: 48;
  animation: draw-check 0.35s cubic-bezier(0.65,0,0.45,1) 0.75s forwards;
}

@keyframes draw-circle { to { stroke-dashoffset: 0; } }
@keyframes draw-check  { to { stroke-dashoffset: 0; } }

.confirm-amount { font-size: 34px; font-weight: 700; color: #4caf50; margin: 16px 0 8px; }
.confirm-msg    { font-size: 15px; color: #666; margin-bottom: 12px; }

.confirm-qr-wrap { margin: 8px 0 4px; }
.confirm-qr-label {
  font-size: 12px; color: #aaa; font-weight: 500;
  margin-bottom: 10px;
}
/* qrcodejs renders an <img alt="URL"> — hide all alt text inside QR containers */
#confirmQRCode img, #qrContainer img, #mobileQRCode img,
#txQRCode img, #confirmQRCode img, [id$="QRCode"] img { font-size: 0 !important; color: transparent !important; }

.confirm-qr-box {
  display: inline-flex;
  padding: 10px;
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #ede8de;
  box-shadow: 0 2px 8px rgba(74,21,21,0.08);
}

.pos-new-sale-btn {
  padding: 14px 40px;
  background: var(--t-sidebar-from);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.pos-new-sale-btn:hover { background: var(--t-sidebar-to); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   INVENTORY VIEW
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.inventory-body { padding: 24px 28px; max-width: 1100px; }

/* Stats */
.stats-bar { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }

.stat-chip {
  background: #fff;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  color: #555;
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-chip strong { font-size: 18px; color: var(--t-deep); }

/* Item cards */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.item-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s;
}

.item-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.12); }
.item-card.inactive { opacity: 0.55; }

.item-image { width: 100%; height: 140px; object-fit: contain; display: block; background: #faf7f2; padding: 4px; }

.item-image-placeholder {
  width: 100%; height: 140px;
  background: linear-gradient(135deg, #f8f8f8 0%, #ece9e6 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: #ddd;
}

.item-body  { padding: 14px 14px 10px; flex: 1; }
.item-name  { font-size: 15px; font-weight: 700; color: #222; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.item-price { font-size: 14px; font-weight: 600; color: #F47C20; }

.item-tax-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.stock-controls { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.stock-label    { font-size: 12px; font-weight: 600; color: #aaa; text-transform: uppercase; letter-spacing: 0.4px; flex: 1; }

.stock-adj {
  width: 28px; height: 28px;
  border: 1.5px solid #ddd; border-radius: 6px;
  background: #fff; font-size: 16px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s; flex-shrink: 0;
}

.stock-adj:hover { border-color: #F47C20; color: #F47C20; }

.stock-input {
  width: 65px; text-align: center;
  border: 1.5px solid #ddd; border-radius: 6px;
  padding: 4px 6px; font-size: 15px; font-weight: 700;
  color: #333; font-family: inherit; outline: none;
}

.stock-input:focus { border-color: #F47C20; }
.stock-input.out   { color: #e53e3e; }

.item-footer {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #f0f0f0;
}

.toggle-wrap  { display: flex; align-items: center; gap: 6px; flex: 1; cursor: pointer; }
.toggle-wrap input[type="checkbox"] { display: none; }

.toggle-track {
  width: 34px; height: 18px;
  background: #ddd; border-radius: 20px;
  position: relative; transition: background 0.2s; flex-shrink: 0;
}

.toggle-track::after {
  content: ''; position: absolute;
  width: 14px; height: 14px;
  background: #fff; border-radius: 50%;
  top: 2px; left: 2px;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input[type="checkbox"]:checked + .toggle-track          { background: #4caf50; }
input[type="checkbox"]:checked + .toggle-track::after   { left: 18px; }

.toggle-label { font-size: 12px; color: #888; }

.item-action-btn { background: none; border: none; cursor: pointer; padding: 4px 8px; border-radius: 5px; font-size: 13px; transition: background 0.15s; }
.item-action-btn.edit:hover { background: #f0f0f0; }
.item-action-btn.del  { color: #e53e3e; }
.item-action-btn.del:hover  { background: #fff0f0; }

.empty-state { text-align: center; padding: 64px 24px; color: #bbb; grid-column: 1/-1; }
.empty-state p { font-size: 15px; margin-bottom: 20px; }

/* Read-only stock view for non-admins */
.stock-readonly {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.stock-level-badge {
  font-size: 16px;
  font-weight: 800;
  min-width: 36px;
  text-align: center;
  padding: 3px 8px;
  border-radius: 8px;
}

.stock-level-badge.ok  { background: #e8f5e9; color: #2e7d32; }
.stock-level-badge.low { background: #fff3e0; color: #e65100; }
.stock-level-badge.out { background: #fce4ec; color: #c62828; }

.stock-status-text {
  font-size: 11px;
  color: #aaa;
  font-weight: 500;
}

.readonly-footer {
  background: #faf7f2;
  border-top: 1px solid #f0ebe1;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MODALS
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 16px;
}

.modal {
  background: #fff; border-radius: 12px;
  padding: 28px 28px 24px;
  width: 100%; max-width: 440px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}

.modal-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 18px; font-weight: 700;
  color: var(--t-deep); margin-bottom: 20px;
}

.form-group  { margin-bottom: 16px; }
.form-label  { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; }
.form-input  { width: 100%; border: 1.5px solid #ddd; border-radius: 7px; padding: 10px 12px; font-size: 15px; font-family: inherit; outline: none; transition: border-color 0.15s; }
.form-input:focus { border-color: #F47C20; }
.form-row    { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.form-check  { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid #ddd; border-radius: 7px; cursor: pointer; }
.form-check input { width: 16px; height: 16px; accent-color: #F47C20; cursor: pointer; }
.form-check span  { font-size: 14px; color: #333; }

.image-upload-area {
  border: 2px dashed #ddd; border-radius: 8px;
  padding: 20px; text-align: center; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.image-upload-area:hover { border-color: #F47C20; background: #fffaf7; }
.image-upload-area input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.image-upload-icon { font-size: 28px; margin-bottom: 6px; }
.image-upload-text { font-size: 13px; color: #888; }
.image-upload-hint { font-size: 11px; color: #bbb; margin-top: 4px; }

.image-preview-wrap { margin-top: 12px; position: relative; display: inline-block; }

.image-preview {
  width: 120px; height: 120px;
  object-fit: cover; border-radius: 8px;
  border: 2px solid #F47C20; display: block;
}

.image-remove-btn {
  position: absolute; top: -8px; right: -8px;
  width: 24px; height: 24px;
  background: #e53e3e; color: #fff; border: none;
  border-radius: 50%; cursor: pointer; font-size: 14px;
  line-height: 24px; text-align: center; padding: 0;
}

.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; padding: 12px; }

.confirm-modal { max-width: 360px; text-align: center; }
.confirm-modal p { font-size: 15px; color: #555; margin-bottom: 20px; }

/* Custom amount overlay */
.pos-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}

.pos-overlay-box {
  background: #fff; border-radius: 12px;
  padding: 28px 24px; width: 300px; text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.pos-overlay-box h3 { font-size: 18px; font-weight: 700; color: var(--t-deep); margin-bottom: 16px; }

.pos-custom-input-wrap {
  position: relative;
  border: 1.5px solid #F47C20;
  border-radius: 8px;
  margin-bottom: 20px;
  background: #fff;
}

.pos-currency {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 700;
  color: #F47C20;
  pointer-events: none;
}

.pos-custom-input-wrap input {
  width: 100%;
  border: none;
  outline: none;
  padding: 14px 14px 14px 36px;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  font-family: inherit;
  border-radius: 8px;
  background: transparent;
}

.pos-overlay-actions { display: flex; gap: 10px; }
.pos-overlay-actions button { flex: 1; padding: 12px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.pos-overlay-cancel  { background: #fff; border: 1.5px solid #ddd; color: #888; }
.pos-overlay-confirm { background: #F47C20; border: 1.5px solid #F47C20; color: #fff; }
.pos-overlay-confirm:hover { background: #d96a10; }

/* â”€â”€ Toast â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #333; color: #fff;
  padding: 12px 20px; border-radius: 8px;
  font-size: 14px; z-index: 1000;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.toast.show    { opacity: 1; transform: translateY(0); }
.toast.success { background: #4caf50; }
.toast.error   { background: #e53e3e; }
.toast.info    { background: #e65100; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   USERS VIEW
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SETTINGS VIEW
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.subscriptions-body {
  padding: 24px 28px;
  max-width: 800px;
  overflow-y: auto;
  flex: 1;
}
@media (max-width: 768px) { .subscriptions-body { padding: 16px; } }

.settings-body {
  padding: 24px 28px;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Accordion card ───────────────────────────────── */
.settings-section {
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid #ede8de;
  box-shadow: 0 2px 8px rgba(74,21,21,0.04);
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.settings-section.open {
  box-shadow: 0 4px 16px rgba(74,21,21,0.09);
}

/* Clickable header row */
.settings-section-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.settings-section-header:hover { background: #fdf7f0; }
.settings-section.open .settings-section-header { background: #fdf7f0; }

.settings-section-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--t-sidebar-from, #7b2929), var(--t-sidebar-to, #b94040));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.settings-section-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--t-deep);
  letter-spacing: 0.3px;
  flex: 1;
  margin: 0;
}

.settings-chevron {
  color: #aaa;
  flex-shrink: 0;
  transition: transform 0.25s;
}
.settings-section.open .settings-chevron { transform: rotate(180deg); }

/* Collapsible body */
.settings-section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 20px;
}
.settings-section.open .settings-section-body {
  max-height: 1200px;
  padding: 0 20px 20px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 4px;
}

.settings-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 14px 16px;
  border: 1.5px solid #ede8de;
  border-radius: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.settings-toggle-row:hover { border-color: #F47C20; background: #fff8f2; }

.settings-toggle-row input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: #F47C20;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.settings-toggle-label { display: flex; flex-direction: column; gap: 2px; }
.settings-toggle-label strong { font-size: 14px; color: #222; }
.settings-toggle-label small  { font-size: 12px; color: #aaa; }

/* Per-section save row */
.settings-section-save {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f0ebe1;
}
.settings-save-msg {
  font-size: 13px;
  color: #4caf50;
  min-height: 18px;
  flex: 1;
  margin: 0;
}

/* Legacy — keep in case referenced elsewhere */
.settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

@media (max-width: 768px) {
  .settings-body  { padding: 16px; }
  .settings-grid  { grid-template-columns: 1fr; }
  .settings-section-header { padding: 14px 16px; }
}

.users-body {
  padding: 24px 28px;
  max-width: 640px;
}

.users-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Stripe subscription cards ─────────────────── */
.sub-card {
  background: #fff;
  border: 1.5px solid #ede8de;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(74,21,21,0.04);
}
.sub-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sub-name  { font-size: 14px; font-weight: 700; color: #222; }
.sub-email { font-size: 12px; color: #888; margin-top: 2px; }
.sub-meta  { font-size: 11px; color: #aaa; margin-top: 4px; }
.sub-status {
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  border: 1px solid; white-space: nowrap;
  flex-shrink: 0; text-transform: capitalize;
}
.sub-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sub-btn {
  font-size: 12px; font-weight: 600;
  padding: 5px 14px; border-radius: 7px;
  border: 1.5px solid; cursor: pointer;
  transition: background 0.15s;
}
.sub-btn-pause  { color: #6a1b9a; border-color: #ce93d8; background: #f3e5f5; }
.sub-btn-pause:hover { background: #6a1b9a; color: #fff; }
.sub-btn-resume { color: #2e7d32; border-color: #a5d6a7; background: #e8f5e9; }
.sub-btn-resume:hover { background: #2e7d32; color: #fff; }
.sub-btn-cancel { color: #c62828; border-color: #ef9a9a; background: #ffebee; }
.sub-btn-cancel:hover { background: #c62828; color: #fff; }
body.theme-dark .sub-card { background: #1e1e2e !important; border-color: rgba(255,255,255,0.08) !important; }

.user-card {
  background: #fff;
  border: 1.5px solid #ede8de;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(74,21,21,0.05);
  transition: box-shadow 0.15s;
}

.user-card:hover { box-shadow: 0 4px 16px rgba(74,21,21,0.09); }

.user-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--t-sidebar-from), var(--t-sidebar-to));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: 'Cinzel', Georgia, serif;
}

.user-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

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

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

.user-name {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  margin-bottom: 2px;
}

.user-email {
  font-size: 13px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta {
  font-size: 11px;
  color: #bbb;
  margin-top: 2px;
}

.user-role-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.user-role-badge.admin { background: #f8f0e8; color: var(--t-deep); border: 1.5px solid #e8d8c4; }
.user-role-badge.staff { background: #f0f0f0; color: #888;    border: 1.5px solid #e0e0e0; }

@media (max-width: 768px) {
  .users-body { padding: 16px; }
}

/* â”€â”€ App Dialog â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.app-dialog-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.50);
  display: flex; align-items: center; justify-content: center;
  z-index: 600; padding: 16px;
}

.app-dialog {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px 24px;
  width: 100%; max-width: 380px;
  text-align: center;
  box-shadow: 0 12px 48px rgba(74,21,21,0.22);
  animation: dialog-pop 0.18s ease;
}

@keyframes dialog-pop {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.app-dialog-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 14px;
}

.app-dialog-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--t-deep);
  margin-bottom: 10px;
}

.app-dialog-msg {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 24px;
}

.app-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.app-dialog-btn {
  flex: 1;
  max-width: 160px;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: none;
  transition: background 0.15s, transform 0.1s;
}

.app-dialog-btn:active { transform: scale(0.97); }

.app-dialog-btn.primary   { background: #F47C20; color: #fff; }
.app-dialog-btn.primary:hover { background: #d96a10; }
.app-dialog-btn.secondary { background: #f0ebe1; color: var(--t-deep); border: 1.5px solid #e8e0d4; }
.app-dialog-btn.secondary:hover { background: #e8e0d4; }
.app-dialog-btn.danger    { background: #e53e3e; color: #fff; }
.app-dialog-btn.danger:hover { background: #c53030; }

/* â”€â”€ Inactivity warning banner â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.inactivity-banner {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--t-sidebar-from);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(74,21,21,0.35);
  white-space: nowrap;
}

.inactivity-banner button {
  background: #F47C20;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s;
}

.inactivity-banner button:hover { background: #d96a10; }

@media (max-width: 768px) {
  .inactivity-banner {
    bottom: 74px;
    left: 16px;
    right: 16px;
    transform: none;
    white-space: normal;
  }
}

/* â”€â”€ Print â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media print {
  /* Hide everything that isn't the receipt card */
  .sidebar,
  .view-header,
  .tx-left-panel,
  .tx-panel-actions,
  .tx-qr-section,
  .tx-receipt-placeholder,
  #view-sell,
  #view-inventory        { display: none !important; }

  /* Strip layout wrappers so the card renders at the top of the page */
  body, .app-content     { margin: 0 !important; padding: 0 !important; background: #fff !important; }
  .transactions-body     { display: block !important; padding: 0 !important; }
  .tx-right-panel        { display: block !important; position: static !important; padding: 0 !important; }
  #txReceiptPreview      { display: block !important; }

  /* Clean up the card itself */
  .tx-receipt-card {
    max-width: 400px;
    margin: 0 auto;
    box-shadow: none !important;
    border: 1px solid #eee !important;
  }

  /* Force background colours and gradients to print */
  .rp-header {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* â”€â”€ Mobile â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 768px) {

  /* ════════════════════════════════════════
     TOP BAR
     ════════════════════════════════════════ */
  .sidebar {
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100%; height: 56px;
    flex-direction: row;
    align-items: center;
    bottom: auto;
    border-bottom: none;
    box-shadow: 0 2px 12px rgba(74,21,21,0.25);
    overflow: visible;
    z-index: 100;
  }
  .sidebar-logo {
    padding: 10px 14px;
    border-bottom: none; border-right: none;
    flex-shrink: 0; flex: 1;
  }
  .sidebar-logo-sub { display: none; }
  .sidebar-logo-text { font-size: 15px; }
  .sidebar-clock { display: none !important; }
  .sidebar-user  { display: none; }
  .sidebar-org-info { display: none !important; }
  .sidebar-dev-credit { display: none !important; }

  /* Security + logout icon-only in top bar */
  .sidebar-footer {
    flex-direction: row;
    padding: 0 8px;
    border-top: none;
    background: transparent;
    align-items: center;
    flex-shrink: 0;
    gap: 4px;
    position: relative;
  }
  .sidebar-logout {
    padding: 7px 10px;
    border-color: rgba(255,255,255,0.25);
    min-width: 36px;
    justify-content: center;
  }
  .logout-label { display: none; }
  .sidebar-collapsible-header span,
  .sidebar-collapsible-header .chevron { display: none; }
  .sidebar-collapsible-header {
    padding: 7px 10px; border-radius: 8px;
    min-width: 36px; justify-content: center;
  }
  .sidebar-collapsible-body {
    position: absolute; top: 56px; right: 0;
    background: var(--t-sidebar-from);
    border-radius: 0 0 12px 12px;
    min-width: 210px; z-index: 300;
    padding: 8px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }

  /* ════════════════════════════════════════
     BOTTOM TAB BAR
     ════════════════════════════════════════ */
  .sidebar-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0; top: auto;
    flex-direction: row; padding: 0;
    background: linear-gradient(180deg, var(--t-sidebar-from) 0%, var(--t-sidebar-to) 100%);
    height: 62px; z-index: 50;
    justify-content: space-around;
    align-items: stretch; gap: 0;
    border-top: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 -4px 20px rgba(74,21,21,0.30);
  }
  .nav-item {
    flex: 1; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 8px 4px 10px; border-radius: 0;
    font-size: 11px; font-weight: 500; gap: 4px;
    color: rgba(255,255,255,0.55);
    border-left: none; border-bottom: none;
  }
  .nav-item:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85); }
  .nav-item.active {
    color: #fff; font-weight: 700;
    background: rgba(255,255,255,0.10);
    border-left: none; border-bottom: none;
    border-top: 2.5px solid #F47C20;
    border-radius: 0; padding-left: 4px;
  }
  .nav-item-icon svg { width: 22px; height: 22px; }

  /* ════════════════════════════════════════
     CONTENT AREA — flex column between bars
     ════════════════════════════════════════ */
  .app-content {
    position: fixed;
    top: 56px; bottom: 62px;
    left: 0; right: 0;
    margin: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 10; /* below sidebar (100) and bottom nav (50) */
  }

  /* Every active view fills the content area */
  .view { display: none; }
  .view.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    height: 100%;
  }

  /* View header — compact, single line, no wrap */
  .view-header {
    padding: 10px 14px;
    flex-wrap: nowrap;
    gap: 8px;
    flex-shrink: 0;
  }
  .view-title { font-size: 14px; font-weight: 700; white-space: nowrap; }
  .search-input { flex: 1; min-width: 0; max-width: none; }
  .view-actions { gap: 6px; margin-left: auto; flex-shrink: 0; flex-wrap: nowrap; }
  .view-actions .btn { padding: 6px 10px; font-size: 11px; }

  /* ════════════════════════════════════════
     SELL SCREEN
     ════════════════════════════════════════ */
  #view-sell .view-title { display: none; }
  #view-sell .search-input { flex: 1; }
  #view-sell .view-actions { flex-shrink: 0; }

  .sell-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
  }
  #sell-main {
    flex: 1;
    flex-direction: column;
    overflow: hidden;
    height: auto;         /* flex handles height — no fixed calc */
    align-items: stretch;
  }
  .product-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .pos-products {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px; padding: 10px;
  }
  .pos-product-btn  { padding: 10px 8px; border-radius: 10px; box-shadow: none; }
  .pos-product-img  { height: 48px; }
  .pos-product-name { font-size: 11px; margin-bottom: 2px; }
  .pos-product-price{ font-size: 12px; }
  /* Quick picks also 3 cols on mobile */
  .popular-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }

  /* Cart panel hidden — drawer takes over */
  .pos-cart-panel { display: none !important; }
  .cart-drawer-inner .pos-cart-panel {
    display: flex !important;
    flex-direction: column;
    width: 100%; position: static;
    padding: 0 16px; gap: 12px;
  }

  /* ════════════════════════════════════════
     TRANSACTIONS
     ════════════════════════════════════════ */
  #view-transactions .view-header { flex-wrap: wrap; }
  #view-transactions .view-title  { order: 1; flex: 0 0 auto; }
  #view-transactions .search-input{ order: 2; flex: 1; min-width: 80px; }
  #view-transactions .view-actions {
    order: 3; width: 100%; margin-left: 0;
    flex-wrap: wrap; gap: 6px; padding-top: 4px;
  }
  .tx-date-input { flex: 1; min-width: 110px; font-size: 12px; }
  .tx-summary-row { padding: 8px 14px; }
  .tx-chip-row    { padding: 6px 14px 8px; gap: 5px; }
  .tx-filter-chip { font-size: 11px; padding: 3px 10px; }
  #view-transactions .btn-header-outline span { display: none; }

  /* Receipt panel hidden on mobile — opens in a drawer */
  .tx-right-panel { display: none !important; }
  .transactions-body { padding: 0; }
  .tx-left-panel { width: 100%; overflow-y: auto; flex: 1; }

  /* ════════════════════════════════════════
     INVENTORY
     ════════════════════════════════════════ */
  .inventory-body { padding: 14px; overflow-y: auto; flex: 1; }
  .items-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .item-image, .item-image-placeholder { height: 110px; }

  /* ════════════════════════════════════════
     MISC
     ════════════════════════════════════════ */
  .toast { bottom: 78px; }
  .stock-controls { display: flex; align-items: center; gap: 6px; width: 100%; overflow: hidden; }
  .stock-input { flex: 1 1 auto; min-width: 0; max-width: 80px; font-size: 14px; padding: 4px 6px; }
  .stock-adj   { flex: 0 0 26px; width: 26px; height: 26px; font-size: 16px; }
}
/* â”€â”€ Payment method overlay â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.pay-method-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid #e8eaed;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
 
.pay-method-btn:hover {
  border-color: #F47C20;
  background: #fff8f2;
}
 
.pay-method-icon {
  font-size: 24px;
  flex-shrink: 0;
}
 
.pay-method-label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
 
.pay-method-label strong {
  font-size: 15px;
  color: #222;
  font-weight: 600;
}
 
.pay-method-label small {
  font-size: 12px;
  color: #999;
  font-weight: 400;
}
 
.pay-method-arrow {
  font-size: 20px;
  color: #ccc;
}
 
.cash-amount-display {
  font-size: 40px;
  font-weight: 700;
  color: #F47C20;
  font-family: 'Cinzel', Georgia, serif;
  margin: 12px 0 8px;
}

/* Inline cash calc on confirm screen */
.cash-calc-inline {
  background: #f9f6f1;
  border: 1px solid #ede8de;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cash-calc-row { display: flex; align-items: center; gap: 8px; }
.cash-calc-label { font-size: 12px; font-weight: 600; color: #888; width: 100px; flex-shrink: 0; }
.cash-calc-input-wrap {
  display: flex; align-items: center; flex: 1;
  border: 1.5px solid #ddd; border-radius: 8px; overflow: hidden; background: #fff;
}
.cash-calc-prefix {
  padding: 0 8px; font-size: 14px; font-weight: 700; color: #aaa;
  background: #f5f5f5; border-right: 1px solid #ddd;
  height: 34px; display: flex; align-items: center;
}
.cash-calc-input {
  border: none !important; border-radius: 0 !important;
  flex: 1; font-size: 15px; font-weight: 600;
  text-align: right; padding: 6px 10px;
}
.cash-calc-input:focus { outline: none; }

.cash-change-result {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; border-radius: 8px; padding: 8px 12px;
  border: 1.5px solid #e0dbd4;
}
.cash-change-label { font-size: 12px; font-weight: 600; color: #888; }
.cash-change-value { font-size: 20px; font-weight: 800; color: #2e7d32; }

.cash-denom-row { display: flex; gap: 5px; flex-wrap: wrap; }
.cash-denom-btn {
  flex: 1; min-width: 40px; padding: 6px 4px;
  border: 1.5px solid #e0dbd4; border-radius: 7px;
  background: #fff; font-size: 12px; font-weight: 600; color: #555;
  cursor: pointer; transition: background 0.12s;
}
.cash-denom-btn:hover { background: var(--t-tint); border-color: var(--t-sidebar-from); }
/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TRANSACTIONS VIEW
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Two-panel layout */
.transactions-body {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 24px 28px;
  max-width: none;
}

.tx-left-panel {
  flex: 1;
  min-width: 0;
}

.tx-right-panel {
  flex: 1;
  min-width: 0;
  position: sticky;
  top: 80px;
}

/* Selected card */
.tx-card-selected {
  background: #fff8f2 !important;
  border-color: #F47C20 !important;
  box-shadow: 0 4px 16px rgba(244,124,32,0.15) !important;
}

.tx-card { cursor: pointer; }

/* Empty placeholder */
.tx-receipt-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 24px;
  background: #fff;
  border-radius: 14px;
  border: 1.5px dashed #e8e0d4;
  text-align: center;
}

.tx-receipt-placeholder p {
  font-size: 14px;
  color: #ccc;
  line-height: 1.6;
}

/* Receipt card in panel */
.tx-receipt-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(74,21,21,0.10);
  border: 1px solid #ede8de;
  margin-bottom: 12px;
}

.rp-header {
  background: linear-gradient(135deg, #7B3A00 0%, #C05A00 100%);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rp-logo {
  width: 40px; height: 40px;
  border-radius: 7px;
  background: #fff;
  padding: 4px;
  object-fit: contain;
  flex-shrink: 0;
}

.rp-org {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 15px; font-weight: 700; color: #fff;
}

.rp-sub {
  font-size: 10px; color: rgba(255,255,255,0.50);
  text-transform: uppercase; letter-spacing: 0.8px; margin-top: 1px;
}

.rp-body { padding: 16px 18px; }

.rp-meta { margin-bottom: 12px; }

.rp-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 5px;
}

.rp-meta-row span:first-child { color: #bbb; font-weight: 500; }
.rp-meta-row span:last-child  { color: #333; font-weight: 600; }

.rp-divider     { height: 1px; background: #f0ebe1; margin: 10px 0; }
.rp-divider-dash { border: none; border-top: 1.5px dashed #e8e0d4; margin: 10px 0; }

.rp-section-label {
  font-size: 10px; font-weight: 700; color: #ccc;
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px;
}

.rp-items { margin-bottom: 4px; }

.rp-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid #f8f5f0;
  gap: 8px;
}

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

.rp-item-name  { font-size: 13px; font-weight: 600; color: #333; flex: 1; }

.rp-item-right {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}

.rp-qty        { font-size: 11px; color: #aaa; }
.rp-item-total { font-size: 13px; font-weight: 700; color: #333; }

.rp-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
}

.rp-total-label { font-size: 13px; font-weight: 700; color: var(--t-deep); }
.rp-total       { font-size: 26px; font-weight: 800; color: #F47C20; }

.rp-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.rp-discount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px dashed #e8e0d4;
  margin-bottom: 4px;
}
.rp-discount-label { font-size: 12px; color: #4caf50; font-weight: 600; }
.rp-discount-amt   { font-size: 13px; color: #4caf50; font-weight: 700; }

.rp-method { font-size: 12px; color: #888; font-weight: 500; }
.rp-paid   { font-size: 12px; font-weight: 700; }
.rp-status-paid     { color: #4caf50; }
.rp-status-pending  { color: #e65100; }
.rp-status-refunded { color: #1565c0; }

.rp-org-footer {
  background: #faf7f2;
  border-top: 1px solid #ede8de;
  padding: 14px 18px;
  text-align: center;
}
.rp-org-footer p {
  font-size: 11px;
  color: #aaa;
  line-height: 1.8;
  margin: 0;
}
.rp-org-footer p:first-child {
  font-size: 12px;
  font-weight: 600;
  color: var(--t-deep);
  margin-bottom: 4px;
}

/* Panel action buttons */
.tx-panel-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.tx-panel-actions .btn { flex: 1; }

/* QR section */
.tx-qr-section {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #ede8de;
  padding: 20px;
  text-align: center;
}

.tx-qr-label {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 14px;
  font-weight: 500;
}

.tx-qr-box {
  display: flex;
  justify-content: center;
}

.tx-date-input {
  border: 1.5px solid #ddd;
  border-radius: 7px;
  padding: 7px 11px;
  font-size: 13px;
  font-family: inherit;
  color: #333;
  outline: none;
  background: #fff;
  transition: border-color 0.15s;
}
.tx-date-input:focus { border-color: #F47C20; }

/* old transactions-body rule removed â€” replaced by two-panel layout above */

/* ── Summary row — single scrollable line ─────── */
.tx-summary-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 28px;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.5);
}
.tx-summary-row::-webkit-scrollbar { display: none; }

/* ── Chip filter row ─────────────────────────── */
.tx-chip-row {
  padding: 8px 28px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tx-chip-row::-webkit-scrollbar { display: none; }
.tx-chip-divider {
  width: 1px;
  height: 16px;
  background: #ddd;
  margin: 0 2px;
  flex-shrink: 0;
}
.tx-filter-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1.5px solid #e0dbd4;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.tx-filter-chip:hover { border-color: var(--t-sidebar-from); color: var(--t-deep); }
.tx-filter-chip.active {
  background: var(--t-sidebar-from);
  border-color: var(--t-sidebar-from);
  color: #fff;
}
body.theme-dark .tx-filter-chip {
  background: #252535 !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #aaa !important;
}
body.theme-dark .tx-filter-chip.active {
  background: var(--t-sidebar-from) !important;
  color: #fff !important;
}

/* Transactions body now starts directly with the two-panel layout */
.transactions-body {
  padding-top: 16px;
}

/* Legacy — kept for any remaining references */
.tx-summary-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Transaction filter bar */
.tx-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 10px;
}
.tx-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.tx-filter-label {
  font-size: 11px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 42px;
  flex-shrink: 0;
}
.tx-filter-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  border: 1.5px solid #e0dbd4;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tx-filter-chip:hover { border-color: var(--t-sidebar-from); color: var(--t-deep); }
.tx-filter-chip.active {
  background: var(--t-sidebar-from);
  border-color: var(--t-sidebar-from);
  color: #fff;
}
body.theme-dark .tx-filter-bar { background: rgba(255,255,255,0.04) !important; border-color: rgba(255,255,255,0.08) !important; }
body.theme-dark .tx-filter-chip { background: #252535 !important; border-color: rgba(255,255,255,0.12) !important; color: #aaa !important; }

.tx-chip {
  background: #fff;
  border: 1.5px solid #ede8de;
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 120px;
  box-shadow: 0 2px 8px rgba(74,21,21,0.05);
}

.tx-chip-total {
  border-color: #F47C20;
  background: linear-gradient(135deg, #fff8f2 0%, #fff 100%);
}

.tx-chip-label {
  font-size: 11px;
  color: #aaa;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.tx-chip-value {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.tx-chip-total .tx-chip-value { color: #F47C20; }

.tx-chip-pending {
  border-color: #fb8c00;
  background: linear-gradient(135deg, #fff8e1 0%, #fff 100%);
}
.tx-chip-pending .tx-chip-value { color: #e65100; }

.tx-chip-refunded {
  border-color: #1565c0;
  background: linear-gradient(135deg, #e3f2fd 0%, #fff 100%);
}
.tx-chip-refunded .tx-chip-value { color: #1565c0; }

/* Transaction cards */
.tx-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tx-card {
  background: #fff;
  border: 1.5px solid #ede8de;
  border-left: 4px solid #ddd;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: box-shadow 0.15s, transform 0.1s;
}

.tx-card:hover {
  box-shadow: 0 4px 16px rgba(74,21,21,0.09);
  transform: translateY(-1px);
}

/* Payment method accent colours on left border */
.tx-card-card     { border-left-color: #4A90D9; }
.tx-card-cash     { border-left-color: #4caf50; }
.tx-card-external { border-left-color: #9B59B6; }

/* Left column */
.tx-card-left {
  flex: 1;
  min-width: 0;
}

.tx-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.tx-method-icon { font-size: 16px; flex-shrink: 0; }

.tx-time {
  font-size: 13px;
  color: #888;
  font-weight: 600;
}

.tx-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tx-badge-paid     { background: #e8f5e9; color: #2e7d32; }
.tx-badge-pending  { background: #fff8e1; color: #e65100; }
.tx-badge-refunded { background: #e3f2fd; color: #1565c0; }
.tx-badge-other    { background: #fafafa; color: #888; }

/* Pending transaction card */
.tx-card-pending {
  border-left: 3px solid #fb8c00;
  background: #fffdf7;
}
body.theme-dark .tx-card-pending { background: #1e1a10 !important; border-left-color: #fb8c00; }

/* Sync with Stripe button */
.tx-sync-btn {
  display: flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1.5px solid #fb8c00;
  background: #fff8e1;
  color: #e65100;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.tx-sync-btn:hover { background: #fb8c00; color: #fff; }
.tx-sync-btn:disabled { opacity: 0.6; cursor: default; }
body.theme-dark .tx-sync-btn { background: rgba(251,140,0,0.12) !important; color: #ffb74d !important; border-color: rgba(251,140,0,0.4) !important; }

.tx-items {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Meta row: staff tag + card chip + short ID + sync — all inline */
.tx-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.tx-staff-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--t-deep);
  background: #f8f0e8;
  border: 1px solid #e8d8c4;
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}

.tx-card-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #666;
  background: #f5f5f5;
  border-radius: 20px;
  padding: 2px 7px;
  white-space: nowrap;
}

.tx-short-id {
  font-size: 10px;
  color: #ccc;
  font-family: monospace;
  letter-spacing: 0.3px;
}

/* Legacy tx-id — keep for any remaining references */
.tx-id {
  font-size: 11px;
  color: #bbb;
  margin-top: 4px;
  font-family: monospace;
}

/* Right column */
.tx-card-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.tx-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--t-deep);
  white-space: nowrap;
}

/* â”€â”€ Mobile QR overlay â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* ── Mobile cart FAB + drawer ────────────────────── */
/* ── Cash Calculator FAB ─────────────────────────── */
.calc-fab {
  position: fixed;
  bottom: 24px; left: 240px; /* sidebar 220px + 20px margin = inside content area */
  z-index: 400;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--t-sidebar-from);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 12px rgba(0,0,0,0.2);
  transition: transform 0.15s, box-shadow 0.15s;
  opacity: 0.85;
}
.calc-fab:hover { opacity: 1; transform: scale(1.08); box-shadow: 0 5px 18px rgba(0,0,0,0.28); }

/* ── Cash Calculator Modal ───────────────────────── */
.calc-modal { max-width: 340px; width: 94%; }
.calc-body  { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.calc-row   { display: flex; align-items: center; gap: 10px; }
.calc-label { width: 110px; font-size: 13px; font-weight: 600; color: #555; flex-shrink: 0; }
.calc-input-wrap { display: flex; align-items: center; flex: 1; border: 1.5px solid #ddd; border-radius: 8px; overflow: hidden; }
.calc-prefix { padding: 0 10px; font-size: 15px; font-weight: 700; color: #aaa; background: #f9f9f9; border-right: 1px solid #ddd; height: 38px; display: flex; align-items: center; }
.calc-input  { border: none !important; border-radius: 0 !important; flex: 1; font-size: 16px; font-weight: 600; text-align: right; padding: 8px 12px; }
.calc-input:focus { outline: none; }

.calc-denoms { display: flex; gap: 6px; flex-wrap: wrap; }
.calc-denom-btn {
  flex: 1; min-width: 48px;
  padding: 7px 4px;
  border: 1.5px solid #e0dbd4;
  border-radius: 8px;
  background: #fff;
  font-size: 13px; font-weight: 600; color: #555;
  cursor: pointer;
  transition: background 0.12s;
}
.calc-denom-btn:hover { background: var(--t-tint); border-color: var(--t-sidebar-from); color: var(--t-deep); }

.calc-change-box {
  background: #f5f0e8;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.calc-change-box.calc-ok    { background: #e8f5e9; }
.calc-change-box.calc-short { background: #fff3e0; }
.calc-change-label { font-size: 13px; font-weight: 600; color: #888; }
.calc-change-amount { font-size: 26px; font-weight: 800; color: #333; }
.calc-ok    .calc-change-amount { color: #2e7d32; }
.calc-short .calc-change-amount { color: #e65100; }

/* On mobile, calc fab sits above bottom nav on left side */
@media (max-width: 768px) {
  .calc-fab { bottom: 74px; left: 16px; width: 44px; height: 44px; }
}

.cart-fab {
  display: none; /* shown via media query */
  position: fixed;
  bottom: 74px; right: 16px; /* above the bottom nav bar */
  z-index: 400;
  align-items: center;
  gap: 8px;
  background: var(--t-sidebar-from);
  color: #fff;
  border: none;
  border-radius: 32px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cart-fab:active { transform: scale(0.96); }
.cart-fab-badge {
  background: #fff;
  color: var(--t-sidebar-from);
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 11px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cart-fab-total { font-size: 15px; }

.cart-drawer-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 410;
}
.cart-drawer-backdrop.visible { display: block; }

.cart-drawer {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 420;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.18);
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
}
.cart-drawer.open { transform: translateY(0); }
.cart-drawer-topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px 4px;
  position: relative;
}
.cart-drawer-handle {
  width: 40px; height: 4px;
  background: #ddd; border-radius: 2px;
}
.cart-drawer-close {
  position: absolute;
  right: 12px; top: 8px;
  width: 32px; height: 32px;
  border: none; background: #f0ebe1;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #666;
}
.cart-drawer-close:hover { background: #e0d8cc; color: #222; }
.cart-drawer-inner { padding: 4px 0 32px; }
body.theme-dark .cart-drawer { background: #1e1e2e !important; }

@media (max-width: 768px) {
  .cart-fab { display: flex; }
  .cart-drawer { display: block; }
  /* Hide the normal cart panel on mobile — drawer takes over */
  .pos-cart-panel { display: none; }
}

/* ── (existing) mobile QR overlay ───────────────── */
.mobile-qr-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.mobile-qr-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.30);
}

.mobile-qr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--t-deep);
  font-family: 'Cinzel', Georgia, serif;
}

.mobile-qr-close {
  background: #f0ebe1;
  border: none;
  border-radius: 50%;
  width: 28px; height: 28px;
  font-size: 14px;
  cursor: pointer;
  color: #888;
  display: flex; align-items: center; justify-content: center;
}

.mobile-qr-hint {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 20px;
}

.mobile-qr-box {
  display: flex;
  justify-content: center;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #ede8de;
}

/* Mobile-only receipt link on each tx-card */
.tx-mobile-receipt-btn {
  display: none;
}

.tx-mobile-qr-btn {
  display: none;
}

.tx-receipt-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1.5px solid #ede8de;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  padding: 5px 10px;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}

.tx-receipt-btn:hover {
  border-color: #F47C20;
  color: #F47C20;
  background: #fff8f2;
}

.tx-empty {
  text-align: center;
  padding: 60px 24px;
  color: #bbb;
  font-size: 15px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .transactions-body { padding: 16px; flex-direction: column; }
  .tx-left-panel  { width: 100%; }
  .tx-right-panel { display: none; }

  /* Show receipt button on each card â€” replaces the hidden right panel */
  .tx-mobile-receipt-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 5px 12px;
    background: #fff;
    border: 1.5px solid #ede8de;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--t-deep);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
  }

  .tx-mobile-receipt-btn:active {
    background: #fff8f2;
    border-color: #F47C20;
    color: #F47C20;
  }

  .tx-mobile-qr-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 5px 12px;
    background: var(--t-sidebar-from);
    border: none;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
  }

  .tx-mobile-qr-btn:active { background: var(--t-sidebar-to); }

  .tx-card { padding: 12px 14px; }
  .tx-card-right { gap: 6px; }
  .tx-amount { font-size: 18px; }
  .tx-items { font-size: 12px; }

  .tx-chip {
    min-width: 120px;
    padding: 10px 14px;
  }

  .tx-chip-value { font-size: 18px; }
}
/* â”€â”€ Fullscreen button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sidebar-fullscreen-btn { display:flex; align-items:center; gap:8px; padding:9px 14px; border-radius:7px; border:1px solid rgba(255,255,255,0.12); background:rgba(255,255,255,0.06); color:rgba(255,255,255,0.60); font-size:13px; font-weight:500; font-family:inherit; cursor:pointer; transition:background 0.15s, color 0.15s; width:100%; text-align:left; }
.sidebar-fullscreen-btn:hover { background:rgba(255,255,255,0.12); color:#fff; }

/* â”€â”€ Fullscreen FAB (top-right) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fs-fab {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 1000;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.80);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  backdrop-filter: blur(4px);
}
.fs-fab:hover { background: rgba(255,255,255,0.28); color: #fff; }

/* â”€â”€ Fullscreen button in sidebar logo â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sidebar-logo { position: relative; }
.fs-fab {
  margin-left: auto;
  background: rgba(255,255,255,0.12);
  border: none;
  border-radius: 6px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.70);
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.fs-fab:hover { background: rgba(255,255,255,0.25); color: #fff; }

.fs-fab svg { transition: transform 0.2s; }

/* â”€â”€ Sidebar toolbar (refresh + fullscreen) â”€â”€â”€â”€â”€â”€â”€ */
.sidebar-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-toolbar.hidden { display: none !important; }

.sidebar-tool-btn {
  width: 30px; height: 30px;
  border: none;
  border-radius: 7px;
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.70);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.sidebar-tool-btn:hover { background: rgba(255,255,255,0.22); color: #fff; }

/* â”€â”€ Floating toolbar top-right â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.float-toolbar {
  position: fixed;
  top: 10px;
  right: 14px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 6px;
}
.float-toolbar.hidden { display: none !important; }
.float-tool-btn {
  width: 32px; height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s, color 0.15s;
}
.float-tool-btn:hover { background: rgba(255,255,255,0.32); color: #fff; }

@media (max-width: 768px) {
  /* Float toolbar overlaps mobile top bar — hide it entirely.
     Refresh is accessible via pull-to-refresh or bottom nav tap.
     Fullscreen is not meaningful on mobile. */
  .float-toolbar { display: none !important; }
}

/* â”€â”€ Add Item FAB â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.add-item-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--t-sidebar-from);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--t-shadow);
  z-index: 150;
  transition: transform 0.15s, box-shadow 0.15s;
}
.add-item-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px var(--t-shadow);
}
.add-item-fab:active { transform: scale(0.96); }
.add-item-fab.hidden { display: none !important; }

/* ── Business open/close toggle ─────────────────── */
.sidebar-biz-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 0.15s;
  gap: 10px;
}
.sidebar-biz-toggle:hover { background: rgba(255,255,255,0.12); }
.sidebar-biz-toggle.hidden { display: none !important; }

.sidebar-biz-label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.70);
  flex: 1;
}

.sidebar-biz-track {
  width: 36px; height: 20px;
  border-radius: 20px;
  background: rgba(255,255,255,0.20);
  position: relative;
  transition: background 0.25s;
  flex-shrink: 0;
}
.sidebar-biz-track::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 2px; left: 2px;
  transition: left 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.sidebar-biz-track.on {
  background: #4caf50;
}
.sidebar-biz-track.on::after {
  left: 18px;
}

.btn-theme-outline {
  background: var(--t-tint);
  color: var(--t-deep);
  border: 1.5px solid var(--t-sidebar-from);
}
.btn-theme-outline:hover {
  background: var(--t-sidebar-from);
  color: #fff;
}

.btn-danger-outline {
  background: #fff5f5;
  color: #c53030;
  border: 1.5px solid #feb2b2;
}
.btn-danger-outline:hover { background: #c53030; color: #fff; border-color: #c53030; }
body.theme-dark .btn-danger-outline { background: rgba(197,48,48,0.12) !important; color: #fc8181 !important; border-color: rgba(197,48,48,0.35) !important; }

/* ── Collapsible sidebar ─────────────────────────── */
.sidebar {
  transition: width 0.25s ease;
}

.sidebar-collapse-btn {
  margin-left: auto;
  background: rgba(255,255,255,0.10);
  border: none;
  border-radius: 6px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.70);
  transition: background 0.15s, color 0.15s, transform 0.25s;
  flex-shrink: 0;
}
.sidebar-collapse-btn:hover { background: rgba(255,255,255,0.22); color: #fff; }

body.sidebar-collapsed .sidebar { width: 64px; }
body.sidebar-collapsed .app-content { margin-left: 64px; }
body.sidebar-collapsed .calc-fab    { left: 84px; } /* 64px sidebar + 20px */

/* Logo click-to-collapse hint */
.sidebar-logo:hover { background: rgba(255,255,255,0.07); }
.sidebar-logo { transition: background 0.15s; border-radius: 8px; }

/* Centre logo image when collapsed */
body.sidebar-collapsed .sidebar-logo {
  justify-content: center;
  padding: 12px 8px;
}

/* Hide text elements when collapsed */
body.sidebar-collapsed .sidebar-logo-text,
body.sidebar-collapsed .sidebar-logo-sub,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .sidebar-clock,
body.sidebar-collapsed .sidebar-user-row,
body.sidebar-collapsed .sidebar-collapsible,
body.sidebar-collapsed .sidebar-fullscreen-btn,
body.sidebar-collapsed .sidebar-logout span,
body.sidebar-collapsed .sidebar-toolbar,
body.sidebar-collapsed .sidebar-theme-row,
body.sidebar-collapsed .sidebar-biz-toggle .sidebar-biz-label {
  display: none !important;
}

/* Centre icons when collapsed */
body.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 12px;
}

body.sidebar-collapsed .nav-item.active {
  border-left: 3px solid #F47C20;
  padding-left: 9px;
}

body.sidebar-collapsed .sidebar-logo {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px 10px;
  gap: 8px;
}

/* Keep logo image, hide text div only */
body.sidebar-collapsed .sidebar-logo > div {
  display: none !important;
}

body.sidebar-collapsed .sidebar-logo > img {
  width: 36px;
  height: 36px;
}

body.sidebar-collapsed .sidebar-collapse-btn {
  transform: rotate(180deg);
  margin-left: 0;
}

/* Tooltip on hover for collapsed nav items */
body.sidebar-collapsed .nav-item {
  position: relative;
}

body.sidebar-collapsed .nav-item::after {
  content: attr(data-view);
  position: absolute;
  left: 68px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.80);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 200;
  text-transform: capitalize;
}

body.sidebar-collapsed .nav-item:hover::after {
  opacity: 1;
}

/* Logout icon only when collapsed */
body.sidebar-collapsed .sidebar-footer {
  padding: 8px 10px;
}

body.sidebar-collapsed .sidebar-logout {
  padding: 9px;
  justify-content: center;
}

/* Hide logout text */
body.sidebar-collapsed .sidebar-logout .logout-label { display: none !important; }

/* Hide business toggle label, keep track */
body.sidebar-collapsed .sidebar-biz-toggle {
  justify-content: center;
  padding: 8px;
}

/* Hide org info in collapsed state */
body.sidebar-collapsed .sidebar-org-info  { display: none !important; }
body.sidebar-collapsed .sidebar-dev-credit { display: none !important; }

/* Hide sidebar-user block in collapsed state */
body.sidebar-collapsed .sidebar-user { display: none !important; }

/* ── Nav badges ─────────────────────────────────── */
.nav-badge {
  min-width: 18px; height: 18px;
  background: #e53e3e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
  margin-left: auto;
  flex-shrink: 0;
  line-height: 1;
}
.nav-badge-warn  { background: #F47C20; }
.nav-badge-green { background: #4caf50; }
.nav-badge.hidden { display: none !important; }

/* Collapsed sidebar: position badge absolutely */
body.sidebar-collapsed .nav-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 14px; height: 14px;
  font-size: 9px;
}

/* ── Popular items section ──────────────────────── */
.popular-section {
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid #ede8de;
}

.popular-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--t-deep);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
  opacity: 0.7;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

/* ── Offline banner ─────────────────────────────── */
.offline-banner {
  position: fixed;
  top: 0;
  left: 220px;
  right: 0;
  z-index: 300;
  background: #e53e3e;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(229,62,62,0.40);
  animation: slideDown 0.3s ease;
}
.offline-banner.hidden { display: none !important; }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
body.sidebar-collapsed .offline-banner { left: 64px; }
@media (max-width: 768px) { .offline-banner { left: 0; top: 56px; } }

/* ── Tx view tabs ────────────────────────────────── */
.tx-view-toggle { display:flex; gap:2px; background:rgba(255,255,255,0.15); border-radius:8px; padding:2px; }
.tx-tab { padding:5px 14px; border:none; border-radius:6px; font-size:12px; font-weight:600; font-family:inherit; cursor:pointer; color:rgba(255,255,255,0.70); background:transparent; transition:background 0.15s,color 0.15s; }
.tx-tab.active { background:#fff; color:var(--t-deep); }

/* ── Report panel ────────────────────────────────── */
.report-body { padding:24px 28px; }
.report-hero { text-align:center; padding:28px 0 20px; }
.report-hero-amount { font-family:"Cinzel",Georgia,serif; font-size:42px; font-weight:800; color:var(--t-deep); }
.report-hero-label  { font-size:14px; color:#888; margin-top:4px; }
.report-tax-line    { text-align:center; font-size:12px; color:#888; margin-bottom:20px; }
.report-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.report-card { background:#fff; border:1.5px solid #ede8de; border-radius:12px; padding:18px 20px; box-shadow:0 2px 8px rgba(74,21,21,0.05); }
.report-card-title { font-size:11px; font-weight:700; color:#aaa; text-transform:uppercase; letter-spacing:0.7px; margin-bottom:12px; }
.report-row { display:flex; justify-content:space-between; font-size:13px; padding:6px 0; border-bottom:1px solid #f0ebe1; }
.report-row:last-child { border-bottom:none; }
.report-row span:last-child { font-weight:700; color:var(--t-deep); }
@media(max-width:768px){.report-grid{grid-template-columns:1fr;} .report-body{padding:16px;}}

.report-actions { padding: 20px 0 8px; display: flex; justify-content: flex-end; }

/* ── Audit log ──────────────────────────────────── */
.audit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f0ebe1;
  font-size: 13px;
}
.audit-row:last-child { border-bottom: none; }
.audit-badge {
  font-size: 10px; font-weight: 700; padding: 3px 8px;
  border-radius: 20px; text-transform: uppercase;
  letter-spacing: 0.4px; flex-shrink: 0;
}
.audit-info { flex: 1; min-width: 0; }
.audit-user { font-weight: 600; color: #333; display: block; }
.audit-detail { font-size: 11px; color: #aaa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.audit-time  { font-size: 11px; color: #bbb; white-space: nowrap; flex-shrink: 0; }

.btn-header-outline {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.90);
  border: 1.5px solid rgba(255,255,255,0.30);
}
.btn-header-outline:hover {
  background: rgba(255,255,255,0.22);
  color: #fff;
  border-color: rgba(255,255,255,0.50);
}

/* ── Product area wrapper (chips above grid) ─────── */
.product-area {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
  overflow-y: auto;
}

/* ── Category filter & management ──────────────── */
.cat-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(4px);
  position: sticky;
  top: 0;
  z-index: 2;
}
.cat-chip {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid #ede8de;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.cat-chip:hover { border-color: var(--t-sidebar-from); color: var(--t-deep); }
.cat-chip.active { background: var(--t-sidebar-from); color: #fff; border-color: var(--t-sidebar-from); }

.cat-manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #faf7f2;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
}

/* ── User activity dot ──────────────────────────── */
.user-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.user-activity-dot {
  position: absolute;
  bottom: 0; right: 0;
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid #fff;
}

.user-activity-dot.active { background: #4caf50; }
.user-activity-dot.recent { background: #F47C20; }

/* Disabled / banned user card */
.user-card.user-disabled {
  opacity: 0.65;
  border-color: #e8d5d5;
  background: #fdf5f5;
}
body.theme-dark .user-card.user-disabled { background: #2a1e1e !important; border-color: rgba(220,80,80,0.2) !important; }

.user-banned-badge {
  position: absolute;
  bottom: -4px; right: -4px;
  background: #e53e3e;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 2px 5px;
  border-radius: 20px;
  border: 2px solid #fff;
  white-space: nowrap;
}

/* Disable / Enable action buttons */
.user-reset-btn.btn-disable { color: #e53e3e; border-color: #fcc; }
.user-reset-btn.btn-disable:hover { background: #fff0f0; }
.user-reset-btn.btn-enable  { color: #2e7d32; border-color: #c8e6c9; }
.user-reset-btn.btn-enable:hover  { background: #f0fff1; }
