:root {
  --bg: #0d1017;
  --panel: #131927;
  --muted: #9db0d0;
  --primary: #5cf0c7;
  --primary-strong: #2de2a1;
  --font: "Space Grotesk", "Segoe UI Semibold", "Helvetica Neue", sans-serif;
  --fz-base: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: radial-gradient(circle at 20% 20%, rgba(92, 240, 199, 0.08), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(45, 226, 161, 0.2), transparent 35%),
    var(--bg);
  font-family: var(--font);
  font-size: var(--fz-base);
  /* Ensure base size */
  color: #e6ecff;
  gap: 10px;
  overflow-x: hidden;
  /* Prevent horizontal scrolling */
}

/* Prevent zoom on inputs for iOS */
input,
select,
textarea {
  font-size: 16px !important;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

body.category-mode .content {
  display: none;
}

body.category-mode #categorySection {
  display: block;
}

body.chart-mode .content {
  display: none;
}

body.chart-mode #chartSection {
  display: block;
}

body.pos-mode .content,
body.pos-mode #chartSection,
body.pos-mode #categorySection {
  display: none !important;
}

.print-area {
  position: absolute;
  left: -9999px;
  top: -9999px;
  display: block;
  padding: 0;
  margin: 0;
  color: #000;
  font-family: "Courier New", monospace;
  background: transparent;
  width: auto;
  font-size: 18px;
  text-align: center;
  font-weight: 700;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.print-area * {
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  -webkit-print-color-adjust: inherit;
  print-color-adjust: inherit;
}

.print-area .ticket-wrapper {
  display: block;
  text-align: center;
  width: 320px;
  margin: 0 auto;
}

.print-area h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.print-area .ticket-logo {
  width: 200px;
  max-width: 240px;
  height: auto;
  display: block;
  margin: 0 auto 6px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: grayscale(100%) contrast(420%) brightness(30%) saturate(300%);
  mix-blend-mode: multiply;
}

.print-area .ticket-date {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #000;
}

.print-area .muted {
  color: #000;
  font-weight: 700;
}

.print-area .ticket-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  font-size: 18px;
  margin: 2px 0;
}

.print-area .ticket-line-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.print-area .ticket-unit {
  font-size: 18px;
  font-weight: 700;
  color: #000;
}

.print-area .ticket-total {
  font-weight: 800;
  margin-top: 8px;
  font-size: 22px;
  letter-spacing: 0.5px;
  color: #000;
}

.print-area .ticket-change {
  margin-top: 4px;
  color: #000;
}

.print-area .ticket-info-large,
.print-area .ticket-header-large {
  font-size: 20px;
  font-weight: 800;
  color: #000;
  margin: 4px 0;
}

.print-area .ticket-method {
  font-size: 18px;
  font-weight: 800;
  color: #000;
}

@media print {
  @page {
    margin: 0;
  }

  body {
    margin: 0;
    padding: 0;
  }

  body * {
    visibility: hidden;
  }

  #posPrintArea,
  #posPrintArea * {
    visibility: visible;
  }

  #posPrintArea {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    display: block;
    padding: 0;
    margin: 0 auto;
    width: auto;
  }
}

body.pos-mode .topbar {
  display: none;
}

body.pos-mode #posApp {
  display: block;
  background: #f7f7f7;
}

body.price-checker-only {
  background: #f9fafc;
  color: #0d1117;
}

body.price-checker-only .topbar {
  background: #0d1117;
  color: #e6ecff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0.5px;
  position: relative;
}

.chatbot-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(92, 240, 199, 0.35), rgba(45, 226, 161, 0.12));
  color: #0b1220;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(92, 240, 199, 0.85);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.2), inset 0 0 18px rgba(92, 240, 199, 0.35),
    0 0 16px rgba(92, 240, 199, 0.6);
  backdrop-filter: blur(14px) saturate(120%);
  z-index: 1200;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-teaser {
  position: fixed;
  right: 96px;
  bottom: 32px;
  max-width: min(280px, 70vw);
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(92, 240, 199, 0.5);
  color: #0f172a;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18), 0 0 18px rgba(92, 240, 199, 0.35);
  backdrop-filter: blur(10px);
  z-index: 1190;
}

.chatbot-teaser::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: 14px;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.9);
  border-right: 1px solid rgba(92, 240, 199, 0.5);
  border-bottom: 1px solid rgba(92, 240, 199, 0.5);
  transform: rotate(45deg);
}

.site-footer {
  margin-top: 28px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.78);
  border-top: 1px solid rgba(92, 240, 199, 0.3);
  backdrop-filter: blur(8px);
}

.footer-content {
  width: min(1100px, 94vw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.footer-meta {
  display: grid;
  gap: 4px;
  color: #0f172a;
  font-size: 13px;
}

.footer-social {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

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

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 10px;
  padding: 5px;
  border-radius: 50%;
  transition: transform 0.2s ease, background-color 0.2s;
}

.theme-toggle:hover {
  transform: scale(1.1);
  background-color: rgba(255, 255, 255, 0.1);
}

/* Light Theme Variables */
:root[data-theme="light"] {
  --bg-dark: #ffffff;
  /* Reverted to white */
  --bg-card: #ffffff;
  --text-main: #1a1a1a;
  --text-muted: #666666;
  --border-color: #e0e0e0;
  --accent-color: #007bff;
  /* Example accent */
}

/* Adjustments for specific elements in Light Mode */
:root[data-theme="light"] body {
  background: var(--bg-dark);
  color: var(--text-main);
}

:root[data-theme="light"] .button-wrap--stores {
  background: #ff4757;
  /* Red like the button */
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 20px;
}

:root[data-theme="light"] .topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

:root[data-theme="light"] .brand-neon {
  text-shadow: none;
  color: #333;
}

:root[data-theme="light"] .overlay-card {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .store-btn.ghost {
  background: #ffffff;
  color: #333;
  border: 1px solid #ddd;
}

:root[data-theme="light"] .store-btn.ghost:hover {
  background: #f5f5f5;
}

:root[data-theme="light"] .overlay-head .overlay-time,
:root[data-theme="light"] .overlay-head .overlay-store {
  color: var(--text-main);
}

/* Live Sales Section - Light Theme */
:root[data-theme="light"] .live-sales {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  color: #1a1a1a;
}

:root[data-theme="light"] .live-head h2 {
  color: #1a1a1a;
}

:root[data-theme="light"] .live-store-filter {
  color: #666666;
}

:root[data-theme="light"] .live-store-filter select {
  background: #f8f9fa;
  border: 1px solid #ced4da;
  color: #1a1a1a;
}

:root[data-theme="light"] .ticket {
  background: #fdfdfd;
  border: 1px dashed #ced4da;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  color: #1a1a1a;
}

:root[data-theme="light"] .ticket-items {
  color: #4a4a4a;
}

:root[data-theme="light"] .ticket-total {
  color: #2de2a1;
  /* Maintain brand color but ensure contrast */
  text-shadow: none;
}

:root[data-theme="light"] .ticket-head span {
  color: #1a1a1a;
}

/* Control Panel Section - Light Theme */
:root[data-theme="light"] .store-admin {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  color: #1a1a1a;
}

:root[data-theme="light"] .store-admin::before {
  background: linear-gradient(120deg, #f8f9fa, #e9ecef);
  border: 1px solid #dee2e6;
  color: #495057;
}

:root[data-theme="light"] .store-admin-head h2 {
  color: #1a1a1a;
}

:root[data-theme="light"] .store-admin .pill {
  background: #f8f9fa;
  border: 1px solid #ced4da;
  color: #1a1a1a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

:root[data-theme="light"] .store-admin .pill:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

:root[data-theme="light"] .store-admin .accent-green {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #2e7d32;
}

:root[data-theme="light"] .store-admin .accent-green:hover {
  background: #c8e6c9;
  border-color: #81c784;
}

:root[data-theme="light"] .store-admin .accent-blue {
  background: #e3f2fd;
  border-color: #90caf9;
  color: #1565c0;
}

:root[data-theme="light"] .accent-blue:hover {
  background: rgba(80, 165, 255, 0.28);
  color: #b3dbff;
  border-color: rgba(80, 165, 255, 0.9);
  box-shadow: 0 8px 20px rgba(80, 165, 255, 0.2);
}

/* Light Theme - Sales Cards and Charts */
:root[data-theme="light"] .total-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 0 0 1px rgba(0, 0, 0, 0.05);
}

:root[data-theme="light"] .total-card::before {
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(92, 240, 199, 0.4) 25%,
      rgba(45, 226, 161, 0.4) 50%,
      rgba(92, 240, 199, 0.4) 75%,
      transparent 100%);
}

:root[data-theme="light"] .total-card::after {
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.6) 0%,
      rgba(255, 255, 255, 0.3) 50%,
      transparent 100%);
}

:root[data-theme="light"] .total-card:hover {
  border-color: rgba(92, 240, 199, 0.5);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.12),
    0 0 30px rgba(92, 240, 199, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(92, 240, 199, 0.3);
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(250, 252, 254, 1) 100%);
}

:root[data-theme="light"] .total-card strong {
  background: linear-gradient(135deg, #1bc98e 0%, #0fa372 50%, #0d8a5f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(27, 201, 142, 0.3));
}

:root[data-theme="light"] .total-card[data-overlay="weekly"] strong {
  background: linear-gradient(135deg, #0088cc 0%, #006ba3 50%, #005580 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(0, 136, 204, 0.3));
}

:root[data-theme="light"] .total-card[data-overlay="monthly"] strong {
  background: linear-gradient(135deg, #5566ee 0%, #4455dd 50%, #3344cc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(85, 102, 238, 0.3));
}

/* Light Theme - Chart Overlays */
:root[data-theme="light"] .overlay-card {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  color: #1e293b;
}

:root[data-theme="light"] .overlay-head {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] .overlay-head h3 {
  color: #0f172a;
}

:root[data-theme="light"] .overlay-items li {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

:root[data-theme="light"] .overlay-items li:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

:root[data-theme="light"] .overlay-items li strong {
  color: #0f172a;
}

:root[data-theme="light"] .overlay-items li small {
  color: #64748b;
}

:root[data-theme="light"] .overlay-spark-wrap {
  background: linear-gradient(180deg, #e0f2fe 0%, #f0f9ff 100%);
  border: 1px solid #bae6fd;
}

:root[data-theme="light"] .close-btn {
  background: #f1f5f9;
  color: #64748b;
}

:root[data-theme="light"] .close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

:root[data-theme="light"] .spark {
  background: #f0f9ff;
  border: 1px solid #e0f2fe;
}

:root[data-theme="light"] .muted {
  color: #64748b;
}

:root[data-theme="light"] .total-meta {
  color: #94a3b8;
}

.suggestions-list {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: #1a1f2e;
  border: 1px solid rgba(92, 240, 199, 0.3);
  border-radius: 12px;
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(92, 240, 199, 0.1);
  margin-bottom: 8px;
}

.suggestions-list.hidden {
  display: none;
}

.suggestion-item {
  padding: 6px 10px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

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

.suggestion-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.suggestion-item.active {
  background: rgba(92, 240, 199, 0.15);
  border-left: 3px solid #5cf0c7;
  padding-left: 7px;
}

.suggestion-item .item-id {
  font-weight: 600;
  color: #fbbf24;
  font-size: 11px;
  min-width: 60px;
  flex-shrink: 0;
}

.suggestion-item .item-name {
  font-weight: 500;
  color: #ffffff;
  font-size: 13px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-item .item-info {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  min-width: 60px;
  text-align: right;
  flex-shrink: 0;
}

:root[data-theme="light"] .suggestions-list {
  background: white;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .suggestion-item {
  border-bottom: 1px solid #f1f5f9;
}

:root[data-theme="light"] .suggestion-item:hover {
  background: #f0f9ff;
}

:root[data-theme="light"] .suggestion-item .item-name {
  color: #0f172a;
}

:root[data-theme="light"] .suggestion-item .item-info {
  color: #64748b;
}


:root[data-theme="light"] #backToMenu {
  box-shadow: 0 4px 12px rgba(215, 38, 61, 0.15);
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(92, 240, 199, 0.6);
  background: rgba(92, 240, 199, 0.12);
  display: grid;
  place-items: center;
  color: #0f172a;
  cursor: pointer;
  box-shadow: inset 0 0 10px rgba(92, 240, 199, 0.2);
}

.social-btn img {
  width: 18px;
  height: 18px;
  display: block;
}

@media (max-width: 720px) {
  .footer-social {
    width: 100%;
    margin-left: 0;
  }
}

.chatbot-fab:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.28), inset 0 0 24px rgba(92, 240, 199, 0.5),
    0 0 22px rgba(92, 240, 199, 0.75);
}

.chatbot-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: min(380px, 92vw);
  background: #ffffff;
  border: 1px solid rgba(92, 240, 199, 0.2);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  display: grid;
  gap: 12px;
  padding: 14px;
  z-index: 1200;
}

.chatbot-panel.compact {
  width: min(300px, 88vw);
  padding: 10px;
  gap: 8px;
  transform: translateY(4px);
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #0f172a;
}

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

.chatbot-help {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid #000;
  background: #e2e8f0;
  color: #000;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  text-shadow: none;
}

.chatbot-help:hover {
  background: #d5dee9;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
}

#chatbotClose {
  border-color: rgba(15, 23, 42, 0.45);
  color: #0f172a;
  background: #eef2f7;
  text-shadow: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

#chatbotClose:hover {
  border-color: rgba(15, 23, 42, 0.7);
  background: #e2e8f0;
  color: #0b1220;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
}

.chatbot-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.chatbot-subtitle {
  font-size: 12px;
  color: #0f172a;
}

.chatbot-messages {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding-right: 6px;
}

.chatbot-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chatbot-actions {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.chatbot-actions .pill {
  justify-content: center;
  border-color: rgba(15, 23, 42, 0.25);
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

.chat-message-feedback {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.chat-message-feedback .pill {
  font-size: 11px;
  padding: 5px 9px;
  color: #111827;
  border-color: #111827;
}

.chat-message-feedback .pill.is-selected {
  background: rgba(46, 125, 50, 0.15);
  border-color: rgba(46, 125, 50, 0.35);
}

.chatbot-privacy {
  font-size: 11px;
  line-height: 1.4;
}

.chat-training-list {
  display: grid;
  gap: 12px;
  max-height: 60vh;
  overflow: auto;
  padding-right: 6px;
}

.chat-training-item {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.85);
}

.chat-training-item--saved {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15) inset;
}

.chat-training-meta {
  font-size: 12px;
  color: #475569;
  margin-bottom: 6px;
}

.chat-training-text {
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 8px;
}

.chat-training-edit {
  display: grid;
  gap: 6px;
}

.chat-training-edit textarea,
.chat-training-edit input {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
}

.chat-training-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.chatbot-quick-label {
  flex: 0 0 100%;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.chatbot-quick .pill {
  font-size: 12px;
  padding: 6px 10px;
  border-color: rgba(92, 240, 199, 0.55);
  color: #0f172a;
  background: rgba(92, 240, 199, 0.14);
  box-shadow: 0 0 12px rgba(92, 240, 199, 0.35), inset 0 0 10px rgba(92, 240, 199, 0.12);
}

.chatbot-bubble {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(92, 240, 199, 0.14);
  border: 1px solid rgba(92, 240, 199, 0.35);
  font-size: 15px;
  line-height: 1.45;
  color: #0f172a;
  animation: chat-pop 0.2s ease;
}

.chatbot-bubble.typing::after {
  content: "▍";
  display: inline-block;
  margin-left: 2px;
  animation: chat-caret 0.7s steps(1) infinite;
}

.chatbot-bubble.user {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.16);
  justify-self: end;
}

.chatbot-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.chatbot-input input {
  border-radius: 12px;
  border: 1px solid rgba(157, 176, 208, 0.3);
  background: #f8fafc;
  color: #0f172a;
  padding: 10px 12px;
}

.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
}

.guide-dim {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 16, 0.35);
  pointer-events: none;
}

body.guide-bright .guide-dim {
  background: rgba(5, 8, 16, 0.18);
}

.guide-spotlight {
  position: absolute;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(5, 8, 16, 0.35), 0 0 24px rgba(92, 240, 199, 0.55);
  border: 2px solid rgba(92, 240, 199, 0.95);
  transition: all 0.25s ease;
  pointer-events: none;
}

body.guide-bright .guide-spotlight {
  box-shadow: 0 0 0 9999px rgba(5, 8, 16, 0.18), 0 0 28px rgba(255, 214, 102, 0.6);
}

.guide-tooltip {
  position: fixed;
  max-width: 320px;
  background: #0f1422;
  border: 1px solid rgba(92, 240, 199, 0.2);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  animation: chat-pop 0.2s ease;
  pointer-events: auto;
  z-index: 1201;
}

.guide-text {
  font-size: 14px;
  line-height: 1.4;
}

.guide-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.guide-pulse {
  animation: guide-pulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 0 3px rgba(92, 240, 199, 0.7), 0 10px 24px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  position: relative;
  z-index: 1202;
}

.guide-highlight-strong {
  animation: guide-strong 0.9s ease-in-out infinite;
  box-shadow: 0 0 0 4px rgba(255, 214, 102, 0.95), 0 0 28px rgba(255, 214, 102, 0.75);
  border-radius: 12px;
  position: relative;
  z-index: 1205;
  filter: brightness(1.15) saturate(1.15);
  opacity: 1 !important;
}

.guide-highlight-strong.pill {
  background: linear-gradient(135deg, #ffe08a, #ffc85a) !important;
  color: #0d1117 !important;
  border: 1px solid rgba(255, 214, 102, 0.95) !important;
  box-shadow: 0 0 0 4px rgba(255, 214, 102, 0.95), 0 0 28px rgba(255, 214, 102, 0.75) !important;
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

@keyframes chat-pop {
  from {
    transform: scale(0.96);
    opacity: 0.6;
  }

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

@keyframes chat-caret {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

@keyframes guide-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(92, 240, 199, 0.35);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(92, 240, 199, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(92, 240, 199, 0);
  }
}

@keyframes guide-strong {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

@media (max-width: 720px) {
  .chatbot-panel {
    right: 12px;
    bottom: 86px;
  }

  .chatbot-fab {
    right: 16px;
    bottom: 16px;
  }
}

body.price-checker-only .topbar span:first-child {
  flex: 1;
  text-align: left;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

body.price-checker-only .topbar .brand-neon {
  flex: 1;
  text-align: right;
  font-size: 28px;
  letter-spacing: 0.8px;
}

body.price-checker-only .topbar .topbar-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 88px;
  width: auto;
  object-fit: contain;
}

.scan-form {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.scan-form input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  color: transparent;
  caret-color: transparent;
}

.product-scan-form {
  inset: -10px;
}

.price-checker-float {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 17, 23, 0.72);
  border: 1px solid rgba(92, 240, 199, 0.35);
  border-radius: 14px;
  padding: 12px 16px;
  display: grid;
  gap: 6px;
  color: #e6ecff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  min-width: 280px;
}

.total-card {
  background: linear-gradient(135deg, rgba(19, 25, 39, 0.95) 0%, rgba(15, 20, 32, 0.98) 100%);
  border: 1px solid rgba(92, 240, 199, 0.15);
  border-radius: 18px;
  padding: 20px 22px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(92, 240, 199, 0.05);
  backdrop-filter: blur(10px);
}

/* Animated gradient border effect */
.total-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(92, 240, 199, 0.6) 25%,
      rgba(45, 226, 161, 0.6) 50%,
      rgba(92, 240, 199, 0.6) 75%,
      transparent 100%);
  border-radius: 18px;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
  animation: borderShine 3s linear infinite;
  background-size: 200% 100%;
}

@keyframes borderShine {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Glassmorphism overlay */
.total-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.08) 0%,
      rgba(255, 255, 255, 0.02) 50%,
      transparent 100%);
  border-radius: 18px 18px 0 0;
  pointer-events: none;
}

.total-card:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: rgba(92, 240, 199, 0.4);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(92, 240, 199, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(92, 240, 199, 0.2);
  background: linear-gradient(135deg, rgba(19, 25, 39, 1) 0%, rgba(20, 26, 40, 1) 100%);
}

.total-card strong {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.8px;
  display: block;
  margin: 10px 0 6px;
  background: linear-gradient(135deg, #5cf0c7 0%, #2de2a1 50%, #1bc98e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 12px rgba(92, 240, 199, 0.5));
  animation: subtlePulse 3s ease-in-out infinite;
}

@keyframes subtlePulse {

  0%,
  100% {
    filter: drop-shadow(0 0 12px rgba(92, 240, 199, 0.5));
  }

  50% {
    filter: drop-shadow(0 0 18px rgba(92, 240, 199, 0.7));
  }
}

.total-card[data-overlay="weekly"] strong {
  background: linear-gradient(135deg, #00d4ff 0%, #00b3ff 50%, #0088cc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px rgba(0, 179, 255, 0.5));
  animation: subtlePulseBlue 3s ease-in-out infinite;
}

@keyframes subtlePulseBlue {

  0%,
  100% {
    filter: drop-shadow(0 0 12px rgba(0, 179, 255, 0.5));
  }

  50% {
    filter: drop-shadow(0 0 18px rgba(0, 212, 255, 0.7));
  }
}

.total-card[data-overlay="monthly"] strong {
  background: linear-gradient(135deg, #8b9aff 0%, #6a7bff 50%, #5566ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px rgba(106, 123, 255, 0.5));
  animation: subtlePulsePurple 3s ease-in-out infinite;
}

@keyframes subtlePulsePurple {

  0%,
  100% {
    filter: drop-shadow(0 0 12px rgba(106, 123, 255, 0.5));
  }

  50% {
    filter: drop-shadow(0 0 18px rgba(139, 154, 255, 0.7));
  }
}

.price-float-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
  align-items: center;
}

body.price-checker-only .content {
  padding: 0 10px 32px;
}

body.price-checker-mode .content,
body.price-checker-mode #chartSection,
body.price-checker-mode #categorySection,
body.price-checker-mode #posApp {
  display: none !important;
}

body.price-checker-mode .overlay {
  display: none !important;
}

body.price-checker-mode #priceCheckerSection {
  display: block;
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 12px 0 32px;
}

.topbar {
  padding: 30px 32px;
  font-weight: 850;
  letter-spacing: 0.7px;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.button-wrap {
  display: flex;
  gap: 16px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  margin-top: 8px;
}

.button-wrap--stores {
  flex-direction: column;
  align-items: center;
}

.superadmin-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 8px auto 0;
}

.store-row {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pill.superadmin-btn {
  background: linear-gradient(135deg, rgba(255, 64, 64, 0.45), rgba(255, 0, 0, 0.8));
  border: 1px solid rgba(255, 92, 92, 0.9);
  color: #f8fafc;
  text-shadow: none;
  box-shadow: 0 0 18px rgba(255, 64, 64, 0.6), 0 0 36px rgba(255, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-size: 18px;
  padding: 12px 24px;
  min-width: 180px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(16px) saturate(140%);
}

.pill.superadmin-btn:hover {
  color: #f8fafc;
  border-color: rgba(255, 140, 140, 0.95);
  background: linear-gradient(135deg, rgba(255, 96, 96, 0.55), rgba(255, 0, 0, 0.9));
  box-shadow: 0 0 22px rgba(255, 96, 96, 0.75), 0 0 44px rgba(255, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.store-connector {
  position: relative;
  width: 100%;
  height: 38px;
  margin-bottom: -22px;
}

.store-connector::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  background: rgba(255, 96, 96, 0.55);
  box-shadow: 0 0 10px rgba(255, 96, 96, 0.45);
  transform: translateX(-50%);
}

.store-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  padding-top: 16px;
}

.store-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 96, 96, 0.5);
  box-shadow: 0 0 10px rgba(255, 96, 96, 0.35);
}

.store-btn {
  position: relative;
}

.store-btn::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  width: 2px;
  height: 16px;
  background: rgba(255, 96, 96, 0.5);
  box-shadow: 0 0 10px rgba(255, 96, 96, 0.35);
  transform: translateX(-50%);
}

.pill {
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e6ecff;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

.pill:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 6px 18px rgba(92, 240, 199, 0.18);
}

.chatbot-header-actions .chatbot-help {
  border-color: #000;
  color: #000;
  background: #e2e8f0;
}

.chatbot-header-actions .chatbot-help:hover {
  border-color: #000;
  color: #000;
  background: #d5dee9;
}

.pill .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.brand-neon {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(92, 240, 199, 0.75), 0 0 18px rgba(45, 226, 161, 0.4);
  font-size: 14px;
}

.topbar .topbar-pos-btn {
  font-size: 12px;
  padding: 8px 10px;
}

.topbar .topbar-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.hidden {
  display: none !important;
}

.store-admin {
  position: relative;
  width: min(960px, 94vw);
  margin: 8px auto 0;
  padding: 22px 20px 16px;
  background: linear-gradient(135deg, rgba(20, 32, 50, 0.96), rgba(12, 22, 32, 0.9));
  border: 1px solid rgba(92, 240, 199, 0.18);
  border-radius: 18px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.38);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.store-admin::before {
  content: "Panel de control";
  position: absolute;
  top: -12px;
  left: 18px;
  padding: 6px 12px;
  background: linear-gradient(120deg, rgba(92, 240, 199, 0.22), rgba(92, 240, 199, 0.08));
  border: 1px solid rgba(92, 240, 199, 0.35);
  border-radius: 10px;
  color: #a7ffe7;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.store-admin.hidden {
  display: none;
}

.store-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.store-admin-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.store-admin-meta--head {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.store-admin-head h2 {
  margin: 0;
  font-size: 18px;
}

#backToMenu {
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 12px;
  font-weight: 800;
  margin-top: -42px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 95, 109, 0.45), rgba(215, 38, 61, 0.45));
  color: #fff;
  border: 1px solid rgba(215, 38, 61, 0.85);
  box-shadow: 0 6px 16px rgba(215, 38, 61, 0.2);
}

.store-admin-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.store-admin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
}

.store-admin-actions .pill {
  width: 100%;
  justify-content: center;
  padding: 9px 12px;
  font-size: 13px;
}

.accent-green {
  background: rgba(92, 240, 199, 0.12);
  border-color: rgba(92, 240, 199, 0.6);
  color: #5cf0c7;
}

.accent-green:hover {
  background: rgba(92, 240, 199, 0.18);
  color: #5cf0c7;
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(92, 240, 199, 0.18);
}

.accent-blue {
  background: rgba(80, 165, 255, 0.2);
  border-color: rgba(80, 165, 255, 0.75);
  color: #99d0ff;
}

.accent-blue:hover {
  background: rgba(80, 165, 255, 0.28);
  color: #b3dbff;
  border-color: rgba(80, 165, 255, 0.9);
  box-shadow: 0 8px 20px rgba(80, 165, 255, 0.2);
}

.accent-blue-solid {
  background: linear-gradient(135deg, #2b78ff, #1b57d8);
  border-color: rgba(38, 106, 229, 0.9);
  color: #f5f9ff;
}

.accent-blue-solid:hover {
  background: linear-gradient(135deg, #3a86ff, #215fdd);
  border-color: rgba(58, 134, 255, 0.9);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(58, 134, 255, 0.3);
}

.accent-yellow {
  background: rgba(255, 205, 86, 0.18);
  border-color: rgba(255, 205, 86, 0.7);
  color: #ffe48a;
}

.accent-yellow:hover {
  background: rgba(255, 205, 86, 0.26);
  color: #fff3bd;
  border-color: rgba(255, 205, 86, 0.9);
  box-shadow: 0 6px 18px rgba(255, 205, 86, 0.25);
}

.store-admin-actions.collapsed {
  display: grid;
}

#actionsToggle {
  display: none;
}

.sales-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.total-card {
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid rgba(92, 240, 199, 0.35);
  background: rgba(92, 240, 199, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
}

.total-card strong {
  font-size: 26px;
  color: var(--primary);
}

.total-meta {
  color: var(--muted);
  font-size: 13px;
}

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

.spark {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  justify-self: end;
  cursor: pointer;
  margin-left: auto;
}

.pill.solid {
  background: linear-gradient(135deg, #4aa5ff, #1d7fe6);
  color: #f8fcff;
  border: none;
  box-shadow: 0 8px 20px rgba(30, 127, 230, 0.24);
}

#branchSettingsBtn {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(45, 226, 161, 0.22);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.live-sales {
  width: min(920px, 92vw);
  margin: 0 auto 32px;
  padding: 20px;
  background: rgba(19, 25, 39, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.live-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.live-head-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.live-store-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  font-size: 12px;
  color: var(--muted, rgba(255, 255, 255, 0.6));
}

.live-store-filter select {
  min-width: 140px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-main, #fff);
  font-size: 13px;
  font-weight: 500;
}

.live-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.2px;
}

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

.ticket-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(19, 25, 39, 0.9);
  border: 1px dashed rgba(92, 240, 199, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-weight: 700;
  color: #e6ecff;
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 6px;
}

.ticket-items {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 13px;
}

.ticket-total {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
  font-weight: 700;
  color: var(--primary);
}

.report-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.report-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 50vh;
  overflow: auto;
  padding-right: 4px;
}

.report-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #e6ecff;
}

.report-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.report-meta strong {
  font-size: 14px;
}

.report-item .muted {
  color: #ffffff;
}

.report-item strong,
.report-meta span {
  color: #ffffff;
}

.report-list .qty-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(92, 240, 199, 0.18);
  color: #0d1117;
  font-weight: 800;
  border: 1px solid rgba(92, 240, 199, 0.35);
}

.invoice-table-wrap {
  max-height: 60vh;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
}

.invoice-table th,
.invoice-table td {
  padding: 10px 12px;
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #0d1117;
  white-space: nowrap;
}

@media (max-width: 640px) {

  .invoice-table th,
  .invoice-table td {
    white-space: normal;
    min-width: 100px;
    /* Prevent too much squashing */
    padding: 8px;
    font-size: 12px;
  }
}

.invoice-table thead {
  background: linear-gradient(135deg, #f2f6ff, #e7ecf7);
  font-weight: 800;
}

.invoice-table tbody tr:nth-child(odd) {
  background: rgba(0, 0, 0, 0.03);
}

.invoice-table tfoot td {
  font-weight: 800;
  background: rgba(92, 240, 199, 0.08);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 10px;
  z-index: 20000;
  overflow-y: auto;
}

.overlay.force-open {
  display: grid !important;
  z-index: 20001;
}

#priceListProductsOverlay {
  z-index: 20010;
}

#posEmployeeOverlay {
  z-index: 20020;
}

.overlay.hidden {
  display: none !important;
}

.overlay-card {
  position: relative;
  width: min(520px, 95vw);
  background: linear-gradient(135deg, #ffffff, #f5f8ff);
  border: 1px solid rgba(92, 240, 199, 0.35);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #0d1117;
  max-height: fit-content;
  margin: auto;
}

.close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.06);
  color: #0d1117;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.close-btn:hover {
  background: #0d1117;
  color: #ffffff;
  border-color: #0d1117;
  transform: scale(1.1);
}

@media (min-width: 1024px) {
  .overlay-card.wide {
    width: 650px !important;
  }
}

.overlay-card.wide {
  width: min(1000px, 96vw);
  gap: 16px;
}

.branch-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: min(980px, 95vw);
  background: #fff;
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.branch-node {
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(13, 17, 23, 0.08);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.branch-title {
  font-weight: 700;
  font-size: 15px;
  color: #0d1117;
}

.branch-subtitle {
  font-size: 12px;
}

.branch-drop {
  min-height: 70px;
  border-radius: 12px;
  border: 1px dashed rgba(13, 17, 23, 0.2);
  padding: 10px;
  display: grid;
  gap: 8px;
  background: rgba(13, 17, 23, 0.03);
}

.branch-drop.drag-over {
  border-color: rgba(45, 226, 161, 0.9);
  background: rgba(92, 240, 199, 0.18);
}

.branch-employee {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #0d1117;
}

.branch-employee::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2de2a1;
  display: inline-block;
}

.branch-employee-card {
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #0d1117;
  background: #ffffff;
  border: 1px solid rgba(13, 17, 23, 0.1);
  cursor: grab;
  box-shadow: 0 6px 14px rgba(13, 17, 23, 0.08);
}

.branch-employee-card.dragging {
  opacity: 0.6;
  cursor: grabbing;
}

.branch-add-btn {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  color: #0d1117;
  background: rgba(92, 240, 199, 0.35);
  border-color: rgba(45, 226, 161, 0.9);
}

.branch-add-btn:hover {
  color: #0d1117;
  background: rgba(92, 240, 199, 0.55);
  border-color: rgba(45, 226, 161, 1);
}

.branch-last-added {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #1a3f2f;
}

.branch-map-status {
  text-align: center;
  font-size: 13px;
}

body.branch-mode {
  background: radial-gradient(circle at 20% 20%, rgba(92, 240, 199, 0.16), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(74, 165, 255, 0.18), transparent 45%),
    #f6f8fc;
  color: #0d1117;
}

.branch-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: rgba(13, 17, 23, 0.92);
  color: #e6ecff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.branch-topbar-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.75;
}

.branch-topbar-store {
  display: block;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.branch-shell {
  width: min(1100px, 92vw);
  margin: 24px auto 48px;
  display: grid;
  gap: 18px;
}

.branch-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(236, 244, 255, 0.9));
  border: 1px solid rgba(13, 17, 23, 0.08);
  box-shadow: 0 16px 36px rgba(13, 17, 23, 0.12);
}

.branch-hero h1 {
  margin: 6px 0 0;
  font-size: 28px;
  color: #0d1117;
}

.branch-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

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

.branch-card {
  padding: 16px 18px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(13, 17, 23, 0.08);
  box-shadow: 0 14px 30px rgba(13, 17, 23, 0.1);
  display: grid;
  gap: 6px;
}

.branch-card strong {
  font-size: 22px;
  color: #0d1117;
}

.branch-meta {
  font-size: 12px;
  color: #5c6575;
}

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

.branch-panel {
  border-radius: 18px;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid rgba(13, 17, 23, 0.08);
  box-shadow: 0 16px 36px rgba(13, 17, 23, 0.1);
  display: grid;
  gap: 12px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #0d1117;
}

.ticket-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ticket-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(13, 17, 23, 0.08);
  background: linear-gradient(135deg, #f7f9ff, #edf2ff);
  font-weight: 700;
  color: #0d1117;
}

.ticket-item .muted {
  font-size: 12px;
}

.product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(13, 17, 23, 0.08);
  background: rgba(92, 240, 199, 0.12);
  color: #0d1117;
  font-weight: 700;
}

.chip-group {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip.active {
  background: rgba(13, 17, 23, 0.85);
  color: #e6ecff;
  border-color: rgba(13, 17, 23, 0.85);
}

.branch-switch-list {
  display: grid;
  gap: 8px;
}

.branch-switch-item {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(13, 17, 23, 0.08);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  cursor: pointer;
  color: #0d1117;
}

.branch-switch-item:hover {
  background: rgba(92, 240, 199, 0.2);
  border-color: rgba(92, 240, 199, 0.6);
}

.mini-login {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(13, 17, 23, 0.08);
  background: rgba(13, 17, 23, 0.03);
}

.mini-login label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #0d1117;
}

.mini-login input {
  border: 1px solid rgba(13, 17, 23, 0.15);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
}

.mini-login-msg {
  font-size: 12px;
  color: #5c6575;
}

.pill.pill-blue {
  background: linear-gradient(135deg, rgba(74, 165, 255, 0.28), rgba(29, 127, 230, 0.38));
  border: 1px solid rgba(29, 127, 230, 0.8);
  color: #0d1117;
}

.pill.pill-green {
  background: linear-gradient(135deg, rgba(92, 240, 199, 0.3), rgba(45, 226, 161, 0.4));
  border: 1px solid rgba(45, 226, 161, 0.9);
  color: #0d1117;
}

@media (max-width: 840px) {
  .branch-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .branch-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.points-info {
  display: grid;
  gap: 10px;
}

.points-info-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.points-info-list li {
  margin-bottom: 6px;
}

.points-value-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  align-items: end;
}

.points-value-card strong {
  font-size: 14px;
}

#pointsValueCurrent {
  font-size: 15px;
  font-weight: 700;
  color: #2de2a1;
}

@media (max-width: 720px) {
  .points-value-card {
    grid-template-columns: 1fr;
  }
}

#inventoryOverlay .overlay-card {
  max-height: calc(100vh - 40px);
  overflow: auto;
}

#inventoryOverlay .overlay-head {
  align-items: flex-start;
}

.inventory-head-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#priceListOverlay .overlay-card {
  max-height: calc(100vh - 40px);
  overflow: auto;
}

#reportCreateOverlay .overlay-card {
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.settings-grid.two-col {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.settings-col {
  display: grid;
  gap: 10px;
  grid-auto-rows: 1fr;
}

.settings-col .settings-btn {
  width: 100%;
  min-height: 56px;
}

#productCreateBtn,
#stockEntryBtn {
  background: linear-gradient(135deg, rgba(92, 240, 199, 0.18), rgba(92, 240, 199, 0.26));
  border: 2px solid rgba(92, 240, 199, 0.85);
  color: #0d1117;
  box-shadow: none;
}

#inventoryBtn,
#providerBtn {
  background: linear-gradient(135deg, rgba(74, 165, 255, 0.2), rgba(29, 127, 230, 0.3));
  border: 2px solid rgba(29, 127, 230, 0.9);
  color: #0d1117;
  box-shadow: none;
}

#staffBtn,
#staffReportsBtn {
  background: linear-gradient(135deg, rgba(203, 212, 226, 0.26), rgba(177, 191, 212, 0.32));
  border: 2px solid rgba(120, 141, 175, 0.9);
  color: #0d1117;
  box-shadow: none;
}

#priceListBtn,
#classificationBtn {
  background: linear-gradient(135deg, rgba(255, 205, 86, 0.24), rgba(255, 205, 86, 0.34));
  border: 2px solid rgba(255, 205, 86, 0.9);
  color: #0d1117;
  box-shadow: none;
}

#classificationPointsBtn {
  background: linear-gradient(135deg, rgba(255, 120, 120, 0.28), rgba(255, 80, 120, 0.36));
  border: 2px solid rgba(255, 90, 120, 0.95);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(255, 90, 120, 0.25);
}

#classificationPointsBtn:hover {
  border-color: rgba(255, 90, 120, 1);
  box-shadow: 0 12px 26px rgba(255, 90, 120, 0.35);
}

#classificationPointsBadge {
  background: linear-gradient(135deg, rgba(255, 198, 74, 0.9), rgba(255, 132, 54, 0.9));
  border: 2px solid rgba(255, 150, 60, 0.95);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(255, 150, 60, 0.35);
}

#classificationPointsBadge:hover {
  border-color: rgba(255, 150, 60, 1);
  box-shadow: 0 12px 26px rgba(255, 150, 60, 0.45);
}

#classificationPointsBadge .coin {
  color: #ffd166;
}

#categoryOverlay {
  z-index: 22;
}

.settings-btn {
  justify-content: center;
  font-weight: 700;
  background: linear-gradient(135deg, #eef3ff, #dce8ff);
  color: #0d1117;
  border: 1px solid rgba(13, 17, 23, 0.08);
  min-height: 48px;
}

.settings-btn:hover {
  border-color: rgba(0, 0, 0, 0.2);
}

.settings-hint {
  margin: 0;
  font-size: 12px;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.form-field.checkbox-field {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

.form-field.checkbox-field input[type="checkbox"] {
  margin: 0;
}

.form-field span {
  color: #4c5568;
  font-weight: 700;
}

.form-field input,
.form-field textarea {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font);
  background: rgba(255, 255, 255, 0.9);
  color: #0d1117;
  outline: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--primary-strong);
  box-shadow: 0 10px 24px rgba(45, 226, 161, 0.2);
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  grid-column: 1 / -1;
}

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

.form-actions .pill.ghost {
  background: rgba(0, 0, 0, 0.08);
  color: #0d1117;
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.form-actions .pill.ghost:hover {
  background: rgba(0, 0, 0, 0.14);
  border-color: rgba(0, 0, 0, 0.35);
}

.stock-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  position: relative;
}

.stock-badge {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(92, 240, 199, 0.14);
  border: 1px solid rgba(92, 240, 199, 0.6);
  color: #0d1117;
  font-weight: 800;
  white-space: nowrap;
  min-width: 120px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.stock-name {
  color: var(--primary);
  font-weight: 800;
  white-space: nowrap;
}

.stock-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin-top: 6px;
  background: #ffffff;
  color: #0d1117;
  border: 1px solid #cfd3da;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  max-height: 240px;
  overflow: auto;
  z-index: 3;
}

.stock-search-results.hidden {
  display: none;
}

.stock-search-results .stock-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eef1f5;
  font-weight: 700;
}

.stock-search-results .stock-result-item:last-child {
  border-bottom: none;
}

.stock-search-results .stock-result-item:hover {
  background: rgba(92, 240, 199, 0.12);
}

.stock-search-results .stock-result-name {
  display: grid;
  gap: 2px;
}

.stock-search-results .stock-result-name small {
  color: #4c5568;
  font-weight: 700;
}

.stock-search-results .stock-result-meta {
  text-align: right;
  display: grid;
  gap: 2px;
  min-width: 120px;
  justify-items: end;
}

.stock-search-results .stock-result-meta span {
  font-size: 12px;
  color: #4c5568;
}

.product-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  margin: 0;
}

.alert.success {
  background: rgba(45, 226, 161, 0.12);
  border: 1px solid rgba(45, 226, 161, 0.25);
  color: #0d8b64;
}

.alert.error {
  background: rgba(192, 57, 43, 0.12);
  border: 1px solid rgba(192, 57, 43, 0.35);
  color: #8b1e12;
}

.product-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.product-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13.5px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
}

.product-table th,
.product-table td {
  padding: 10px 12px;
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: #0d1117;
  line-height: 1.35;
  font-family: var(--font);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-table thead {
  background: linear-gradient(135deg, #f2f6ff, #e7ecf7);
  color: #0d1117;
  font-weight: 700;
}

.product-table tbody tr:last-child td {
  border-bottom: none;
}

.product-table tbody tr:nth-child(odd) {
  background: rgba(0, 0, 0, 0.05);
}

.product-table tbody tr:hover {
  background: rgba(92, 240, 199, 0.08);
  transition: background 0.15s ease;
}

.product-table td {
  min-height: 34px;
}

.product-card {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.product-card strong {
  display: block;
  font-size: 15px;
  color: #0d1117;
}

.product-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #4c5568;
  font-size: 13px;
  margin-top: 4px;
}

.inventory-list {
  max-height: 65vh;
  overflow: auto;
  padding-right: 4px;
}

.price-list-table {
  max-height: 60vh;
  overflow: auto;
}

#priceListTableWrap .product-table {
  table-layout: auto;
}

#priceListTableWrap .product-table th:nth-child(1),
#priceListTableWrap .product-table td:nth-child(1) {
  min-width: 140px;
}

#priceListTableWrap .product-table th:nth-child(2),
#priceListTableWrap .product-table td:nth-child(2) {
  min-width: 320px;
}

#priceListTableWrap .product-table th:nth-child(3),
#priceListTableWrap .product-table td:nth-child(3) {
  min-width: 190px;
}

#priceListTableWrap .product-table th:nth-child(4),
#priceListTableWrap .product-table td:nth-child(4) {
  min-width: 110px;
}

#priceListTableWrap .product-table td {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

#priceListTableWrap .product-table td:nth-child(4) {
  font-weight: 700;
  color: #0d1117;
}

#priceListTableWrap .product-table td:nth-child(5),
#priceListTableWrap .product-table td:nth-child(6),
#priceListTableWrap .product-table td:nth-child(7),
#priceListTableWrap .product-table td:nth-child(8) {
  text-align: right;
  white-space: nowrap;
}

#priceListTableWrap .product-table input.price-input {
  width: 68px;
}

#priceListTableWrap .product-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.price-list-table .price-save-btn {
  min-width: 130px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #0d1117;
  border: 1px solid rgba(13, 17, 23, 0.15);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.price-list-table {
  overflow-x: auto;
}

.price-list-table .product-table {
  min-width: 1380px;
}

.inventory-placeholder {
  padding: 12px;
}

.category-section {
  width: min(960px, 94vw);
  margin: 24px auto;
  padding: 18px 18px 22px;
  background: rgba(19, 25, 39, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.category-head {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.category-head h3 {
  margin: 2px 0 0;
  font-size: 20px;
}

.category-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#categorySectionBack {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.3;
  border-radius: 12px;
}

.category-title-line {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.category-count {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.category-title-line .muted {
  min-width: 90px;
}

#categorySectionTitle {
  flex: 1;
  text-align: center;
  margin: 0;
}

.category-title-line .category-count {
  margin-left: auto;
}

#editConfirmOverlay .overlay-card {
  width: min(400px, 90vw);
}

.overlay-message {
  margin: 4px 0 8px;
  color: #0d1117;
  font-weight: 600;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0d1117;
  font-size: 13px;
}

.checkline.wide {
  justify-content: flex-start;
  gap: 10px;
}

.notification-list {
  display: grid;
  gap: 10px;
}

#chartSection {
  width: min(960px, 94vw);
  margin: 24px auto;
  padding: 18px 18px 22px;
  background: rgba(19, 25, 39, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  display: none;
  position: relative;
  /* Ensure child absolute positioning works */
}

#chartBack {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 10;
}


:root[data-theme="light"] #chartSection {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.chart-head h3 {
  margin: 0;
  font-size: 20px;
}

.chart-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.chart-canvas-wrap {
  background: rgba(13, 17, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  position: relative;
}

:root[data-theme="light"] .chart-canvas-wrap {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.chart-canvas {
  width: 100%;
  display: block;
  max-height: 320px;
}

.chart-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.summary-card {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 26px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-card strong {
  font-size: 18px;
  color: #5cf0c7;
}

.summary-card.wide {
  grid-column: span 2;
}

/* Light Theme - Chart Summary Cards */
:root[data-theme="light"] .summary-card {
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  border: 1px solid #bae6fd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

:root[data-theme="light"] .summary-card strong {
  color: #059669;
  /* Darker green */
}

:root[data-theme="light"] .summary-card .muted {
  color: #64748b;
}

.price-checker {
  width: min(720px, 92vw);
  margin: 0 auto;
  padding: 18px 18px 22px;
  background: rgba(19, 25, 39, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.price-checker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.price-checker-head h3 {
  margin: 2px 0 0;
  font-size: 20px;
}

.price-checker-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.price-checker-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(92, 240, 199, 0.35);
  background: rgba(92, 240, 199, 0.06);
  display: grid;
  gap: 10px;
}

.price-checker-main strong {
  font-size: 18px;
}

.price-checker-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.price-checker-price {
  font-size: 26px;
  color: var(--primary);
  font-weight: 800;
}

.price-checker-stock,
.price-checker-loc {
  font-size: 18px;
  font-weight: 700;
}

.price-checker-alert {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(192, 57, 43, 0.35);
  background: rgba(192, 57, 43, 0.12);
  color: #f2b8b0;
}

body.price-checker-only .price-checker {
  background: #ffffff;
  border: 1px solid #e0e6f0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  color: #0d1117;
}

body.price-checker-only .price-checker-card {
  background: #f6f8fc;
  border: 1px solid #dbe2ef;
  color: #0d1117;
}

body.price-checker-only .price-checker .muted {
  color: #4c5568;
}

body.price-checker-only .price-checker-alert {
  color: #8b1e12;
  background: rgba(192, 57, 43, 0.12);
  border-color: rgba(192, 57, 43, 0.35);
}

.price-checker-hero {
  display: grid;
  place-items: center;
  padding: 18px 6px;
}

.price-checker-hero-card {
  background: linear-gradient(135deg, #0d1117, #182233);
  border: 1px solid rgba(92, 240, 199, 0.35);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  text-align: center;
  color: #e6ecff;
  display: grid;
  gap: 8px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(92, 240, 199, 0.18);
  color: #5cf0c7;
  border: 1px solid rgba(92, 240, 199, 0.45);
  letter-spacing: 0.3px;
}

.hero-copy {
  margin: 0;
  font-size: 13px;
  color: #9db0d0;
}

.price-carousel {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 4 / 3;
  min-height: 820px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(92, 240, 199, 0.35);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
  background: #0d1117;
  --carousel-bg: none;
}

.price-carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.price-carousel img.active {
  opacity: 1;
}

.price-carousel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--carousel-bg);
  background-size: cover;
  background-position: center;
  filter: blur(32px);
  transform: scale(1.08);
  opacity: 0.9;
  pointer-events: none;
}

.price-checker-price {
  font-size: 32px;
}

.price-checker-stock {
  font-size: 24px;
}

.product-view {
  width: min(1080px, 98vw);
  margin: 0 auto;
  padding: 40px 0 24px;
  display: none;
}

.product-view-card {
  background: #ffffff;
  border: 1px solid #e0e6f0;
  border-radius: 18px;
  padding: 30px 26px;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.14);
  display: grid;
  gap: 24px;
  justify-items: center;
  text-align: center;
  color: #0d1117;
  position: relative;
}

.product-view-img {
  width: min(520px, 90vw);
  height: 520px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e0e6f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 12px 30px rgba(0, 0, 0, 0.25);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.product-view-info h2 {
  margin: 6px 0 4px;
  font-size: 38px;
  font-weight: 900;
}

.product-view-info span.muted {
  font-size: 18px;
  font-weight: 700;
}

.product-view-info {
  width: 100%;
  padding: 6px 0 2px;
  display: grid;
  gap: 10px;
}

.product-view-price {
  font-size: 56px;
  color: #21f0b3;
  font-weight: 900;
  text-shadow: none;
}

.staff-list {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
}

#staffShiftsList {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

#staffShiftsList li {
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(92, 240, 199, 0.18));
  border: 1px solid rgba(92, 240, 199, 0.4);
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #0d1117;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#staffShiftsList li:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

#staffShiftsList li .shift {
  color: #0d1117;
  background: rgba(92, 240, 199, 0.85);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.payroll-grid {
  align-items: start;
}

.payroll-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.payroll-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.payroll-item {
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(92, 240, 199, 0.14));
  border: 1px solid rgba(92, 240, 199, 0.35);
  border-radius: 12px;
  color: #0d1117;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.payroll-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.payroll-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.payroll-amount {
  font-weight: 900;
  color: #0fd5a4;
}

.payroll-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #0d1117;
  opacity: 0.85;
}

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

.product-view .pill {
  min-width: 140px;
}

.pos-app {
  width: 98vw;
  margin: 10px auto;
  padding: 12px 12px 16px;
  background: #ffffff;
  border: 1px solid #cfd3da;
  border-radius: 6px;
  box-shadow: none;
  color: #111;
}

.pos-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  background: #0d1117;
  color: #e6ecff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  margin: -12px -12px 18px;
  border-radius: 10px 10px 0 0;
}

.pos-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.pos-topbar-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.pos-topbar-store {
  font-size: 16px;
  color: #5cf0c7;
  display: block;
  width: 100%;
  text-align: center;
}

.pos-topbar-status {
  font-size: 16px;
  font-weight: 700;
  color: #9db0d0;
}

.pos-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.pos-head h2 {
  margin: 2px 0 0;
  color: #111;
}

.pos-head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* POS Toggle Switch */
.pos-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

.pos-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.pos-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .4s;
  border-radius: 34px;
}

.pos-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pos-switch input:checked+.pos-slider {
  background-color: #2de2a1;
}

.pos-switch input:focus+.pos-slider {
  box-shadow: 0 0 1px #2de2a1;
}

.pos-switch input:checked+.pos-slider:before {
  transform: translateX(18px);
}

.pos-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.pos-cart {
  background: #ffffff;
  border: 1px solid #cfd3da;
  border-radius: 6px;
  padding: 10px;
  box-shadow: none;
}

.pos-form-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.pos-field {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  /* Anchor for suggestions-list */
}

.pos-field label {
  font-weight: 700;
  font-size: 13px;
  color: #000;
  min-width: 70px;
}

.pos-field input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #b1b6c1;
  border-radius: 4px;
  background: #f7f7f7;
  color: #111;
}

.pos-table {
  border: 1px solid #b1b6c1;
  border-radius: 4px;
  overflow: hidden;
}

.pos-table-header {
  display: grid;
  grid-template-columns: 60px 1fr 120px 120px 140px;
  background: #e6e8ef;
  color: #111;
  font-weight: 700;
  font-size: 13px;
  border-bottom: 1px solid #b1b6c1;
}

.pos-table-header span {
  padding: 6px 8px;
  border-right: 1px solid #c7cbd5;
}

.pos-table-header span:last-child {
  border-right: none;
}

.pos-cart-list {
  max-height: 340px;
  min-height: 340px;
  overflow: auto;
  background: #ffffff;
}

.pos-cart-line {
  display: grid;
  grid-template-columns: 60px 1fr 120px 120px 140px;
  align-items: center;
  min-height: 52px;
  height: 52px;
  font-size: 13px;
  color: #000;
}

.pos-cart-line span,
.pos-cart-line strong,
.pos-cart-line .pos-qty {
  padding: 10px 12px;
  border-right: 1px solid #e0e3eb;
  font-size: 14px;
  line-height: 1.2;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-qty-input {
  width: 48px;
  text-align: center;
  padding: 0;
  font-size: 14px;
  border: none;
  background: transparent;
  outline: none;
  box-shadow: none;
  appearance: textfield;
}

.pos-cart-line span:last-child,
.pos-cart-line strong:last-child {
  border-right: none;
}

.pos-cart-line:nth-child(odd) {
  background: #eef1ff;
}

.pos-cart-line:nth-child(even) {
  background: #ffffff;
}

.pos-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pos-qty button {
  width: 28px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #8ea0b5;
  background: #eef3fb;
  color: #0a1a2c;
  cursor: pointer;
  font-weight: 700;
}

.pos-total-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  border-top: 1px solid #cfd3da;
  padding-top: 8px;
  color: #000;
  gap: 12px;
  flex-wrap: wrap;
}

.pos-change {
  font-weight: 700;
  font-size: 30px;
  margin-top: 4px;
}

.pos-total-amount {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 900;
  font-size: 44px;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.pos-total-amount strong {
  font-size: 60px;
  color: #fcec3c;
  background: #000;
  padding: 10px 14px;
  border-radius: 10px;
  display: inline-block;
}

.pos-total-band-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 260px;
}

.pos-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
  align-items: center;
}

.pos-actions .pill {
  min-width: 120px;
  font-weight: 800;
  border-radius: 10px;
  padding: 12px 14px;
  height: 40px;
}

.pos-actions .pill.solid {
  background: linear-gradient(135deg, #0b875b, #0a6d45);
  color: #ffffff;
  border: 1px solid #0a6d45;
}

.pos-actions .pill.ghost {
  background: #eef3fb;
  color: #0a1a2c;
  border: 1px solid #b1b6c1;
}

.pos-search-inline {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pos-search-inline input {
  padding: 10px 12px;
  border: 2px solid #0a1a2c;
  border-radius: 8px;
  background: #0a1a2c;
  color: #fcec3c;
  min-width: 320px;
  height: 46px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.pos-code-error {
  margin-top: 2px;
  font-size: 12px;
  color: #c0392b;
}

.stock-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stock-update {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stock-update input {
  width: 120px;
  padding: 8px;
  border: 1px solid #c7cbd5;
  border-radius: 8px;
}

.stock-update .pill {
  height: 40px;
  min-width: 140px;
  background: linear-gradient(135deg, #0b875b, #0a6d45);
  color: #ffffff;
  border: 1px solid #0a6d45;
  font-weight: 700;
}

.pos-charge-body {
  display: grid;
  gap: 10px;
}

.pos-charge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

.pos-charge-row.points-payment-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.points-info-inline {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.points-payment-row input {
  width: 100%;
}

#posPointsValueDisplay {
  font-weight: 700;
  color: var(--accent-blue, #5cb8ff);
}


.pos-charge-row label {
  min-width: 110px;
}

.pos-charge-row strong {
  font-size: 20px;
  background: #000;
  color: #fcec3c;
  padding: 10px 12px;
  border-radius: 8px;
  min-width: 160px;
  text-align: right;
}

.pos-charge-row input {
  flex: 1;
  padding: 10px 10px;
  border: 1px solid #b1b6c1;
  border-radius: 8px;
  height: 42px;
}

.pos-reprint-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.pos-reprint-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #d8dbe2;
  border-radius: 8px;
  background: #f5f6f8;
}

.pos-reprint-item strong {
  font-size: 16px;
}

.pos-reprint-meta {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: #5d6470;
  flex-wrap: wrap;
}

.pos-reprint-btn {
  border: 1px solid #0d875b;
  background: linear-gradient(135deg, #0b875b, #0a6d45);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.ticket {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.ticket:hover {
  background: var(--hover-bg);
  transform: translateY(-1px);
}

.ticket-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border: none;
  background: #ef4444;
  color: white;
  border-radius: 3px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  z-index: 10;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.3);
}

.ticket-delete-btn:hover {
  background: #dc2626;
  color: white;
  opacity: 1;
  transform: scale(1.1);
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.85);
  color: #e6ecff;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  border: 1px solid rgba(92, 240, 199, 0.35);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -120%);
  white-space: nowrap;
  z-index: 2;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  align-items: stretch;
}

.inventory-filter-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  justify-content: flex-start;
  align-self: stretch;
  width: 100%;
}

.inventory-head-actions .inventory-filter-toggle {
  margin-bottom: 0;
  justify-content: flex-end;
  align-self: flex-end;
  width: auto;
  flex-wrap: nowrap;
}

.inventory-filter-toggle .pill {
  justify-content: flex-start;
  font-weight: 700;
  padding: 10px 18px;
  font-size: 14px;
  background: linear-gradient(135deg, rgba(92, 240, 199, 0.2), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(92, 240, 199, 0.6);
  color: #d7fff3;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22), 0 0 14px rgba(92, 240, 199, 0.25);
  text-align: left;
  min-width: 200px;
}

.inventory-filter-toggle .pill.active {
  background: linear-gradient(135deg, rgba(92, 240, 199, 0.65), rgba(92, 240, 199, 0.2));
  border-color: rgba(92, 240, 199, 0.95);
  color: #0d1117;
  box-shadow: 0 10px 22px rgba(92, 240, 199, 0.35), inset 0 0 10px rgba(255, 255, 255, 0.35);
}

#inventoryCategoryToggle {
  color: #0d1117;
}

#inventoryProviderToggle {
  color: #0d1117;
}

.inventory-filter-block {
  margin-bottom: 12px;
}

.category-grid .pill {
  justify-content: center;
  font-weight: 700;
  padding: 10px 14px;
  letter-spacing: 0.2px;
  min-height: 52px;
  height: 52px;
  width: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(92, 240, 199, 0.12));
  color: #0d1117;
  border: 1px solid rgba(92, 240, 199, 0.85);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18), 0 0 12px rgba(92, 240, 199, 0.35), inset 0 0 8px rgba(92, 240, 199, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.category-grid .pill:hover {
  border-color: rgba(92, 240, 199, 1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22), 0 0 16px rgba(92, 240, 199, 0.5), inset 0 0 12px rgba(92, 240, 199, 0.35);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(92, 240, 199, 0.2));
  transform: translateY(-1px);
}

.category-grid .pill.active {
  border-color: rgba(92, 240, 199, 1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24), 0 0 18px rgba(92, 240, 199, 0.6), inset 0 0 12px rgba(92, 240, 199, 0.4);
  background: linear-gradient(135deg, rgba(92, 240, 199, 0.15), rgba(255, 255, 255, 0.9));
}

.overlay-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-right: 36px;
}

.overlay-time {
  color: #6f7c94;
  font-size: 13px;
}

.overlay-store {
  font-size: 18px;
  font-weight: 700;
}

.overlay-ticket {
  color: #0d1117;
  font-weight: 700;
}

.superadmin-glow {
  color: #ff4d4d;
  font-weight: 800;
  letter-spacing: 0.4px;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  text-shadow: 0 0 6px rgba(255, 92, 92, 0.55), 0 0 16px rgba(255, 0, 0, 0.35);
  animation: superadminPulse 2.6s ease-in-out infinite;
}

@keyframes superadminPulse {

  0%,
  100% {
    color: #ff4d4d;
    text-shadow: 0 0 6px rgba(255, 92, 92, 0.45), 0 0 16px rgba(255, 0, 0, 0.35);
  }

  50% {
    color: #ff7a7a;
    text-shadow: 0 0 10px rgba(255, 120, 120, 0.8), 0 0 24px rgba(255, 0, 0, 0.55);
  }
}

.overlay-items ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.overlay-items li {
  display: flex;
  justify-content: space-between;
  color: #4c5568;
  font-size: 14px;
}

#dailyOverlay .overlay-items,
#weeklyOverlay .overlay-items,
#monthlyOverlay .overlay-items {
  max-height: 60vh;
  overflow: auto;
  padding-right: 6px;
}

.reinvest-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  color: inherit;
  letter-spacing: 0.2px;
}

.reinvest-row span {
  color: #e6ecff;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.6px;
}

.reinvest-row strong {
  font-size: 22px;
  color: var(--primary);
  text-shadow: none;
}

.reinvest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 60vh;
  overflow: auto;
  padding-right: 6px;
}

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

.reinvest-foot .reinvest-total-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.reinvest-foot .pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #0d1117;
}

.reinvest-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #0d1117;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.overlay-spark-wrap {
  display: none;
}

.overlay-spark {
  width: 100%;
  height: auto;
  display: block;
}

.overlay-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  gap: 8px;
  margin-bottom: 6px;
  justify-items: stretch;
}

#dailyOverlay .overlay-actions {
  grid-template-columns: repeat(2, auto);
  justify-content: center;
  justify-items: center;
  width: fit-content;
  margin: 0 auto;
  gap: 8px;
}

.overlay-actions .pill {
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #0a0a0a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.35);
  letter-spacing: 0.5px;
  padding: 8px 10px;
  font-size: 13px;
}

.superadmin-actions {
  grid-template-columns: 1fr;
  gap: 12px;
}

.superadmin-actions-wrap {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 12px;
}

#superadminLogoutBtn {
  font-size: 14px;
  font-weight: 700;
  border-color: rgba(255, 99, 71, 0.6);
  color: #ff6347;
  background: rgba(255, 99, 71, 0.1);
  padding: 8px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

#superadminLogoutBtn:hover {
  background: rgba(255, 99, 71, 0.2);
  border-color: rgba(255, 99, 71, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  color: #ff4500;
}

.superadmin-actions .pill {
  border: 1px solid rgba(255, 92, 92, 0.95);
  background: linear-gradient(135deg, rgba(255, 40, 40, 0.85), rgba(220, 0, 0, 1));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(255, 64, 64, 0.45), 0 0 32px rgba(255, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  backdrop-filter: blur(12px) saturate(140%);
}

.superadmin-actions .pill:hover {
  border-color: rgba(255, 140, 140, 0.95);
  background: linear-gradient(135deg, rgba(255, 96, 96, 0.55), rgba(255, 0, 0, 0.9));
  box-shadow: 0 14px 34px rgba(255, 96, 96, 0.65), 0 0 36px rgba(255, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  color: #f8fafc;
  transform: translateY(-1px);
}

.overlay-actions .pill.active {
  border-color: rgba(150, 160, 175, 0.8);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  background: linear-gradient(135deg, rgba(210, 216, 224, 0.8), rgba(185, 193, 205, 0.85));
  color: #0a0a0a;
}

.provider-overlay {
  background: radial-gradient(circle at 20% 20%, rgba(92, 240, 199, 0.08), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.2), transparent 35%),
    rgba(4, 8, 14, 0.92);
  padding: 10px;
  overflow: auto;
}

.provider-board {
  position: relative;
  width: min(960px, 94vw);
  max-height: calc(100vh - 40px);
  background: #0c121d;
  border: 1px solid rgba(92, 240, 199, 0.35);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 32px rgba(92, 240, 199, 0.2);
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
}

.provider-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.provider-head h3 {
  margin: 4px 0 4px;
  font-size: 22px;
  letter-spacing: 0.2px;
}

.provider-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.provider-close-inline {
  position: absolute;
  top: 6px;
  right: 6px;
  border-color: rgba(92, 240, 199, 0.35);
  color: #e6ecff;
  background: rgba(12, 18, 29, 0.9);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.provider-close-inline:hover {
  border-color: #5cf0c7;
  color: #5cf0c7;
  background: rgba(12, 18, 29, 0.95);
}

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

.provider-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(92, 240, 199, 0.06));
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 16px 36px rgba(0, 0, 0, 0.35);
}

.provider-card.wide {
  grid-column: span 2;
}

.provider-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.provider-card strong {
  color: #e6ecff;
}

.provider-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.provider-list li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  position: relative;
}

.provider-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.provider-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.provider-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  color: #e6ecff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.provider-tag.phone {
  border-color: rgba(92, 240, 199, 0.4);
  background: rgba(92, 240, 199, 0.12);
  color: #5cf0c7;
}

.provider-tag.payment {
  border-color: rgba(255, 193, 79, 0.35);
  background: rgba(255, 193, 79, 0.18);
  color: #ffca60;
}

.provider-tag.provider-edit {
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.provider-tag.provider-edit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.provider-edit-popup {
  position: absolute;
  z-index: 30;
  background: linear-gradient(135deg, #0d1117, #151d2b);
  border: 1px solid rgba(92, 240, 199, 0.35);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 8px;
  min-width: 240px;
  color: #e6ecff;
}

.provider-edit-popup h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #5cf0c7;
}

.provider-edit-popup input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(92, 240, 199, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #e6ecff;
  font-weight: 700;
}

.provider-edit-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.provider-edit-actions .pill {
  width: 100%;
  justify-content: center;
  padding: 8px 10px;
}

.provider-edit-actions .pill.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #e6ecff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.provider-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  border: 1px solid #ff7676;
  background: rgba(255, 118, 118, 0.2);
  color: #ffb3b3;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.provider-delete:hover {
  border-color: #ff7676;
  color: #ff9a9a;
  background: rgba(255, 118, 118, 0.15);
}

.provider-tag.delivery {
  border-color: rgba(70, 200, 255, 0.35);
  background: rgba(70, 200, 255, 0.14);
  color: #46c8ff;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(92, 240, 199, 0.15);
  color: #5cf0c7;
  border: 1px solid rgba(92, 240, 199, 0.4);
}

.chip-info {
  background: rgba(0, 184, 255, 0.12);
  color: #46c8ff;
  border-color: rgba(0, 184, 255, 0.35);
}

.chip-warning {
  background: rgba(255, 193, 79, 0.2);
  color: #ffca60;
  border-color: rgba(255, 193, 79, 0.35);
}

.chip-success {
  background: rgba(92, 240, 199, 0.18);
  color: #5cf0c7;
  border-color: rgba(92, 240, 199, 0.4);
}

.shift-morning {
  background: linear-gradient(135deg, rgba(255, 216, 111, 0.18), rgba(255, 159, 67, 0.25));
  color: #0a0a0a;
}

.shift-night {
  background: linear-gradient(135deg, rgba(106, 123, 255, 0.2), rgba(74, 81, 216, 0.28));
  color: #0a0a0a;
}

#weekAll {
  background: linear-gradient(135deg, rgba(0, 255, 208, 0.4), rgba(0, 179, 255, 0.45));
  color: #04121a;
  border-color: rgba(0, 200, 210, 0.7);
  box-shadow: 0 10px 26px rgba(0, 200, 210, 0.35);
}

.overlay-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  /* Dark theme default */
  font-size: 15px;
}

.overlay-foot strong {
  color: #5cf0c7;
  /* Dark theme default */
  font-size: 18px;
}

/* Light Theme - Overlay Foot */
:root[data-theme="light"] .overlay-foot {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  padding: 14px 20px;
  margin: 0 -20px -20px;
  border-radius: 0 0 16px 16px;
}

:root[data-theme="light"] .overlay-foot strong {
  color: #059669;
}

.report-create-foot {
  gap: 12px;
}

.report-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-actions .pill {
  white-space: nowrap;
}

#reportPrintBtn,
#reportStockPrintBtn {
  background: #ffffff;
  color: #0d1117;
  border: 2px solid #0d1117;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  opacity: 1;
  font-weight: 800;
  letter-spacing: 0.3px;
}

#reportPrintBtn:hover,
#reportStockPrintBtn:hover {
  background: #f5f5f5;
  border-color: #0b0e16;
  color: #000;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

#reportStockPrintBtn {
  text-transform: uppercase;
  min-width: 160px;
}

.staff-report-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.staff-report-info {
  display: grid;
  gap: 4px;
}

#staffReportStore {
  font-size: 22px;
  font-weight: 900;
  color: #0d1117;
  letter-spacing: 0.3px;
}

.staff-report-store-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  width: 100%;
}

#staffReportStore {
  flex-shrink: 0;
}

.staff-report-goal {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(92, 240, 199, 0.16), rgba(0, 184, 255, 0.14));
  border: 1px solid rgba(92, 240, 199, 0.4);
  color: #0d1117;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  margin-left: auto;
}

.staff-report-goal strong {
  font-size: 24px;
  color: #0a1a2c;
  font-weight: 900;
}

.staff-report-img {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  object-fit: contain;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #000;
  padding: 4px;
  transform: scale(1.12);
  display: block;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.staff-report-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.staff-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.staff-report-list {
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
}

#staffReportSuppliersList {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

#staffReportSuppliersList li {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.9);
  color: #0d1117;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.staff-ticket-list {
  margin-top: 10px;
  background: rgba(19, 25, 39, 0.08);
  border: 1px solid rgba(19, 25, 39, 0.08);
  border-radius: 12px;
  padding: 10px;
}

.staff-ticket-list .ticket {
  margin: 0;
}

#staffTicketsOverlay .staff-ticket-list {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.staff-cash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

#staffCashOverlay .overlay-card {
  background: #0d1117;
  color: #e6ecff;
  border: 1px dashed rgba(92, 240, 199, 0.6);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.5);
}

#staffCashOverlay .ticket-breakdown {
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(92, 240, 199, 0.4);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
  font-family: "Courier New", monospace;
  position: relative;
}

#staffCashOverlay .ticket-breakdown::before,
#staffCashOverlay .ticket-breakdown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  background-image: radial-gradient(circle at 10px 5px, #0d1117 6px, transparent 6px);
  background-size: 20px 10px;
}

#staffCashOverlay .ticket-breakdown::before {
  top: -10px;
}

#staffCashOverlay .ticket-breakdown::after {
  bottom: -10px;
}

#staffCashOverlay .ticket-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dotted rgba(92, 240, 199, 0.4);
  padding-bottom: 6px;
  color: #e6ecff;
}

#staffCashOverlay .ticket-line:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

#staffCashOverlay .ticket-line strong {
  color: #5cf0c7;
}

#staffCashOverlay .ticket-line.total {
  font-size: 18px;
  font-weight: 800;
}

.provider-payments-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.provider-payment-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #0d1117;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  display: grid;
  gap: 6px;
}

.provider-payment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.provider-payment-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #4c5568;
  gap: 8px;
  flex-wrap: wrap;
}

.provider-payment-img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f7f7f7;
}

.proof-btn {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 10px;
  border: 1px solid rgba(92, 240, 199, 0.6);
  background: linear-gradient(135deg, rgba(92, 240, 199, 0.14), rgba(92, 240, 199, 0.08));
  color: #0d1117;
  cursor: pointer;
}

.money-negative {
  color: #ff6b6b !important;
}

@media (max-width: 640px) {
  .content {
    padding: 10px 10px 24px;
    gap: 10px;
  }

  .button-wrap {
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    padding: 14px;
  }

  /* Force horizontal scroll for store buttons on mobile (like PC) */
  .store-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    /* Start from left to allow scrolling */
    gap: 12px;
    width: 100%;
    padding-bottom: 8px;
    /* Space for scrollbar */
    -webkit-overflow-scrolling: touch;
  }

  /* Hide scrollbar for cleaner look but keep functionality */
  .store-row::-webkit-scrollbar {
    height: 4px;
  }

  .store-row::-webkit-scrollbar-thumb {
    background: rgba(92, 240, 199, 0.3);
    border-radius: 4px;
  }

  .store-btn {
    flex: 0 0 auto;
    /* Prevent shrinking */
    width: 130px;
    /* Fixed width for better touch target */
    flex-direction: column;
    text-align: center;
    padding: 12px 8px;
    height: auto;
  }

  .store-btn .icon {
    margin-bottom: 6px;
  }

  .store-admin {
    width: 100%;
    padding: 14px;
  }

  .store-admin-head {
    flex-direction: row;
    flex-wrap: nowrap;
    /* Force single line */
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .store-admin-meta--head {
    flex: 1;
    /* Allow text to take available space */
    min-width: 0;
    /* Allow shrinking below content size */
    width: auto;
  }

  .store-admin-head h2 {
    font-size: 16px;
    /* Reduce title size on mobile to fit */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .store-admin-meta--head .muted {
    display: none;
    /* Hide subtitle on very small screens to save space */
  }

  #backToMenu {
    margin-top: 0;
    font-size: 13px;
    /* Slightly smaller for mobile */
    padding: 8px 12px;
  }

  .live-sales {
    width: 100%;
  }

  .topbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
  }

  .topbar span:first-child {
    font-size: 16px;
  }

  .topbar .brand-neon {
    font-size: 14px;
  }

  .chatbot-panel {
    left: 10px;
    right: 10px;
    width: auto;
    bottom: 86px;
    max-height: 70vh;
  }

  .chatbot-panel.compact {
    width: auto;
  }

  .chatbot-messages {
    max-height: 45vh;
  }

  .chatbot-input input {
    font-size: 16px;
  }

  .chatbot-fab {
    width: 54px;
    height: 54px;
    font-size: 22px;
  }

  .chatbot-teaser {
    display: none;
  }
}

@media (max-width: 480px) {
  .overlay-card {
    width: 95vw;
    max-height: 92vh;
    overflow: auto;
  }

  .overlay-card.wide {
    width: 95vw;
  }

  .overlay-head {
    margin-top: 12px;
    padding-right: 30px;
  }

  #dailyOverlay .overlay-actions {
    grid-template-columns: repeat(2, auto);
    width: fit-content;
  }

  .overlay-actions {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 6px;
  }

  .overlay-actions .pill {
    padding: 6px 8px;
    font-size: 12px;
  }

  .overlay-spark {
    width: 100%;
    max-width: 240px;
  }

  .total-card strong {
    font-size: 22px;
  }

  .pos-layout {
    grid-template-columns: 1fr;
  }

  .provider-card.wide {
    grid-column: span 1;
  }

  /* Staff report: responsive en móviles */
  .staff-report-meta {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .staff-report-store-line {
    flex: 1;
    flex-wrap: wrap;
    gap: 6px;
  }

  .staff-report-goal {
    margin-left: 0;
    width: 100%;
  }

  #staffReportStore {
    font-size: 20px;
  }

  .staff-report-img {
    width: 64px;
    height: 64px;
  }

  .button-wrap {
    padding: 14px;
    gap: 12px;
  }

  .pill.superadmin-btn {
    font-size: 16px;
    padding: 10px 18px;
    min-width: 160px;
  }

  .chatbot-panel {
    left: 6px;
    right: 6px;
    bottom: 76px;
    border-radius: 16px;
    padding: 12px;
  }

  .chatbot-bubble {
    font-size: 14px;
  }
}

#priceListProductsOverlay .price-save-btn {
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.2;
  border-radius: 10px;
  border: 1px solid rgba(13, 17, 23, 0.15);
  background: linear-gradient(135deg, #eef3ff, #dce8ff);
  color: #0d1117;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.price-input {
  width: 52px;
  padding: 6px 8px;
  font-size: 13px;
  border: 1px solid #b1b6c1;
  border-radius: 8px;
  background: #fff;
  color: #0d1117;
}

.price-list-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.price-list-search input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(13, 17, 23, 0.12);
  font-size: 14px;
  font-family: var(--font);
  background: rgba(255, 255, 255, 0.9);
  color: #0d1117;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.pos-offline-status {
  margin-left: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.pos-topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.pos-offline-status.is-offline {
  color: #0d1117;
  background: #ffcd6d;
  border-color: rgba(13, 17, 23, 0.15);
}

.pos-offline-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  position: relative;
}

.pos-offline-gear {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  gap: 10px;
  border: 1px solid rgba(18, 160, 82, 0.65);
  color: #ffffff;
  background: linear-gradient(135deg, rgba(22, 143, 76, 0.95), rgba(78, 214, 125, 0.95));
  box-shadow: 0 10px 20px rgba(34, 197, 94, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  white-space: nowrap;
}

.gear-sticker {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #0c161f;
  font-size: 14px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
}

.pos-offline-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(12, 18, 30, 0.98);
  border: 1px solid rgba(92, 240, 199, 0.2);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
}

.pos-offline-btn {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  border: 1px solid rgba(18, 160, 82, 0.7);
  color: #ffffff;
  background: linear-gradient(135deg, rgba(78, 214, 125, 0.98), rgba(18, 160, 82, 0.98));
  box-shadow: 0 10px 20px rgba(34, 197, 94, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.pos-offline-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(34, 197, 94, 0.36), 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}

.pos-offline-btn:focus-visible {
  outline: 2px solid rgba(78, 214, 125, 0.95);
  outline-offset: 2px;
}

/* Inventory Search */
.inventory-search-wrap {
  flex-grow: 1;
  margin: 0 1rem;
  min-width: 200px;
}

.search-input {
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(157, 176, 208, 0.2);
  background: rgba(19, 25, 39, 0.5);
  color: #fff;
  font-family: var(--font);
  font-size: 0.95rem;
  backdrop-filter: blur(10px);
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(19, 25, 39, 0.8);
  box-shadow: 0 0 15px rgba(92, 240, 199, 0.1);
}

.search-input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

/* Improve Inventory Layout */
#inventoryOverlay .overlay-card {
  width: 95%;
  max-width: 1200px;
}

/* Better Product Table Logic */
.product-table th:nth-child(2),
.product-table td:nth-child(2) {
  width: 40%;
  /* More space for Product Name */
  white-space: normal;
  /* Allow text wrapping */
}

.product-table th:nth-child(1),
.product-table td:nth-child(1) {
  width: 15%;
  /* SKU */
}

/* Aesthetic Delete Button */
.delete-icon-btn {
  background: rgba(255, 69, 58, 0.1);
  color: #ff453a;
  border: 1px solid rgba(255, 69, 58, 0.2);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 16px;
  padding: 0;
}

.delete-icon-btn:hover {
  background: #ff453a;
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 69, 58, 0.3);
  border-color: #ff453a;
}

.delete-icon-btn:active {
  transform: scale(0.95);
}

/* "Floating" Delete Button (X) */
.product-table th:last-child,
.product-table td:last-child {
  border: none !important;
  background: transparent !important;
  width: 30px !important;
  padding: 0 4px !important;
}

.delete-icon-btn {
  background: transparent;
  color: #9db0d0;
  /* Muted color by default */
  border: none;
  font-size: 24px;
  line-height: 1;
  font-weight: 300;
  width: 24px;
  height: 24px;
  opacity: 0.6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.delete-icon-btn:hover {
  background: rgba(255, 69, 58, 0.1);
  color: #ff453a;
  opacity: 1;
  transform: scale(1.1);
  box-shadow: none;
  border: 1px solid rgba(255, 69, 58, 0.2);
}

/* Adjust for 7 columns (Location added back) */
.product-table th:nth-child(2),
.product-table td:nth-child(2) {
  width: 35%;
  /* Slightly less for Name */
}

.product-table th:nth-child(1),
.product-table td:nth-child(1) {
  width: 12%;
  /* Slightly less for SKU */
}

/* Location column specific */
.product-table th:nth-child(6),
.product-table td:nth-child(6) {
  width: 12%;
  /* Give space to Location */
}

/* Revert column widths for 6 columns (Location removed) */
.product-table th:nth-child(2),
.product-table td:nth-child(2) {
  width: 45%;
  /* Maximize space for Name */
}

.product-table th:nth-child(1),
.product-table td:nth-child(1) {
  width: 15%;
  /* standard SKU */
}

/* Reset 6th column (now Delete btn) to auto/small */
.product-table th:nth-child(6),
.product-table td:nth-child(6) {
  width: auto !important;
}

/* Provider Button Info */
.category-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: auto !important;
  padding: 8px 16px !important;
  line-height: 1.2 !important;
  text-align: center;
}

.prov-contact {
  display: block;
  font-size: 0.75em;
  opacity: 0.7;
  margin-top: 2px;
  font-weight: 400;
}

/* Allow wrapping for Dynamic Column (Location/Provider) */
.product-table th:nth-child(5),
.product-table td:nth-child(5) {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word;
}

/* Revert to 5-column layout (Dynamic removed) */
.product-table th:nth-child(5),
.product-table td:nth-child(5) {
  width: auto !important;
  /* This is now the delete button column */
  /* Remove wrapping rules since it is just an icon */
  white-space: nowrap !important;
  overflow: hidden !important;
}

/* Maximize product name width since we lost a column */
.product-table th:nth-child(2),
.product-table td:nth-child(2) {
  width: 50%;
}

/* Shrink delete column specifically */
.product-table th:nth-child(5),
.product-table td:nth-child(5) {
  width: 25px !important;
  max-width: 25px !important;
  padding: 0 !important;
  text-align: center;
}

/* Low Stock Widget Styles */
.low-stock-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  max-height: 80px;
  overflow-y: auto;
}

.low-stock-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #0d1117;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(255, 69, 58, 0.08);
  /* Light red bg */
  border: 1px solid rgba(255, 69, 58, 0.15);
}

.low-stock-item strong {
  margin-right: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.low-stock-badge {
  font-size: 11px;
  font-weight: 800;
  color: #ff453a;
}

/* POS Register Buttons - Enhanced Visibility with Active State */
.pos-register-btn {
  font-size: 0.9em !important;
  font-weight: 700 !important;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.5) !important;
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.3px;
}

.pos-register-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  border-color: #60a5fa !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.4);
}

/* Active/Selected Register Button */
.pos-register-btn.solid.accent-blue-solid {
  font-weight: 800 !important;
  border: 2px solid rgba(43, 120, 255, 0.9) !important;
  background: linear-gradient(135deg, #2b78ff, #1b57d8) !important;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(43, 120, 255, 0.6) !important;
  transform: scale(0.96);
}

.pos-register-btn.solid.accent-blue-solid:hover {
  transform: scale(0.96);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 24px rgba(43, 120, 255, 0.7) !important;
}


/* --- RESPONSIVE STYLES START --- */
@media (max-width: 768px) {

  /* Global Layout */
  body {
    padding: 0;
    overflow-x: hidden;
  }

  .content {
    padding: 12px;
  }

  /* Store Selection */
  /* Store Selection - Mobile Scroll Fix */
  .store-row {
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 12px;
    padding-bottom: 8px;
    /* Space for scrollbar */
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .store-btn {
    flex: 0 0 auto;
    width: 120px;
    /* Fixed width for consistency */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    padding: 12px 8px;
    height: 90px;
    /* Taller */
    font-size: 13px;
    line-height: 1.2;
  }

  .store-btn .icon {
    margin: 0;
  }

  .store-btn .icon svg {
    width: 24px;
    height: 24px;
  }

  /* Tickets on Mobile - Larger for visibility */
  .ticket {
    padding: 12px 14px;
    font-size: 15px;
    /* Increased */
    border-radius: 10px;
  }

  .ticket-head {
    margin-bottom: 6px;
    font-size: 15px;
    /* Increased */
  }

  .ticket-items {
    font-size: 14px;
    /* Increased */
    gap: 2px;
  }

  .ticket-total {
    margin-top: 6px;
    font-size: 16px;
    /* Increased */
  }


  /* Overlays */
  .overlay-card,
  .overlay-card.wide {
    width: 95vw;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 16px;
    margin: 10px auto;
  }

  .overlay-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    padding-right: 32px;
    /* Space for close btn */
  }

  .overlay-head>div:first-child {
    width: 100%;
  }

  .overlay-head button.close-btn {
    position: absolute;
    top: -4px;
    right: -4px;
  }

  /* Actions & Grids */
  .store-admin-actions,
  .superadmin-actions,
  .settings-grid,
  .two-col,
  .provider-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .superadmin-actions-wrap .superadmin-actions {
    grid-template-columns: 1fr;
    /* Stack superadmin buttons */
  }

  /* Tables */
  .invoice-table-wrap {
    overflow-x: auto;
    display: block;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .invoice-table th,
  .invoice-table td {
    white-space: nowrap;
    padding: 8px 10px;
  }

  /* Charts */
  .chart-head {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Topbar */
  .topbar {
    padding: 12px 16px;
    font-size: 16px;
    gap: 8px;
  }

  /* Sales Totals */
  .sales-totals {
    grid-template-columns: 1fr;
    /* Stack totals cards */
  }

  /* Provider/Classification Boards */
  .provider-board {
    width: 98vw;
    height: 95vh;
    border-radius: 8px;
    overflow-y: auto;
  }

  .provider-head {
    flex-direction: column;
    height: auto;
    gap: 12px;
    padding-bottom: 12px;
  }

  /* Increase Live Sales section size on mobile */
  .live-sales {
    min-height: 85vh;
    /* Increased to 85vh */
    padding: 16px;
    margin-bottom: 100px;
  }

  /* Make the feed fill the space */
  .ticket-feed {
    min-height: 75vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    /* Increased gap */
  }
}

/* Red Accent for destructive actions - Stronger Red */
.pill.accent-red {
  color: #ff0000;
  border-color: rgba(255, 0, 0, 0.5);
  background: rgba(255, 0, 0, 0.1);
}

.pill.accent-red:hover:not(:disabled) {
  background: rgba(255, 0, 0, 0.2);
  border-color: #ff0000;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
}

.pill.solid.accent-red {
  background: #d50000;
  /* Vivid Red */
  color: white;
  border-color: #d50000;
}

.pill.solid.accent-red:hover:not(:disabled) {
  background: #b71c1c;
  /* Darker Red on Hover */
  border-color: #b71c1c;
  box-shadow: 0 0 15px rgba(213, 0, 0, 0.5);
}

.pill.accent-red:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #ffcdd2;
  /* Very light faded Red */
  border-color: #ef9a9a;
  color: #c62828;
}

.pill.solid.accent-red:disabled {
  background: #e57373;
  /* Softer red for solid */
  border-color: #e57373;
  color: rgba(255, 255, 255, 0.7);
}

/* Blue Accent for primary actions */
.pill.accent-blue {
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.1);
}

.pill.accent-blue:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.pill.solid.accent-blue {
  background: #007bff;
  /* Bright Blue */
  color: white;
  border-color: #007bff;
}

.pill.solid.accent-blue:hover:not(:disabled) {
  background: #0056b3;
  border-color: #0056b3;
  box-shadow: 0 0 15px rgba(0, 123, 255, 0.4);
}

/* Full screen overlay for desktop data views */
.overlay-card.full-screen {
  width: 95vw;
  height: 95vh;
  max-width: none;
  display: flex;
  flex-direction: column;
}

.overlay-card.full-screen .overlay-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.overlay-card.full-screen .invoice-table-wrap {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

@media (max-width: 768px) {
  .overlay-card.full-screen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
}