:root {
  --ink: #f0f0f0;
  --muted: #8b92a5;
  --line: #2a2c3a;
  --paper: #090a0f;
  --panel: #12141c;
  --panel-raised: #1a1c26;
  --accent: #5e35b1;
  --accent-strong: #8e24aa;
  --neon-blue: #3b82f6;
  --neon-gold: #d4a017;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --violet: #8b5cf6;
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.6), 0 0 20px rgba(59, 130, 246, 0.1);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-raised);
  color: var(--ink);
  cursor: pointer;
  padding: 0 16px;
  transition: border-color 0.15s, background 0.15s;
}

button:hover {
  border-color: var(--accent);
  background: #1e1e16;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(23, 107, 135, 0.24);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.25rem;
  letter-spacing: 0;
}

h2 {
  font-size: 1.375rem;
  letter-spacing: 0;
}

h3 {
  font-size: 1rem;
  letter-spacing: 0;
}

h4 {
  margin: 0;
  font-size: 0.9375rem;
  letter-spacing: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(400px, 1fr) 360px;
}

.side-rail,
.cart-panel {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 20px;
}

.cart-panel {
  border-right: 0;
  border-left: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 16px;
  max-height: 100vh;
  overflow: auto;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.brand-wordmark-img {
  width: 100%;
  max-width: 220px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
}


.brand-lockup p,
.status-strip span,
label span,
.summary-grid span,
.cart-header p,
.compact-row p,
.inventory-row p,
.movement-row p,
.report-subsection p {
  color: var(--muted);
  font-size: 0.8125rem;
}

.mode-list,
.status-strip,
.mode-status,
.demo-controls {
  display: grid;
  gap: 10px;
}

.mode-button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.mode-button.is-active,
.payment-button.is-active,
.primary-action,
.checkout-button {
  background: linear-gradient(135deg, var(--neon-blue), var(--violet));
  color: #ffffff;
  border-color: var(--violet);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
  transition: all 0.2s ease;
}

.mode-button.is-active:hover,
.payment-button.is-active:hover,
.primary-action:hover,
.checkout-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
  background: linear-gradient(135deg, #4f8cf6, #9b72f5);
}

.status-strip {
  margin-top: 28px;
}

.status-strip > div,
.mode-status > div,
.summary-grid > div,
.panel-block,
.cart-card,
.receipt-panel {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  background: rgba(26, 28, 38, 0.6);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.status-strip > div,
.mode-status > div,
.summary-grid > div {
  padding: 12px;
  display: grid;
  gap: 4px;
}

.demo-controls {
  margin-top: 28px;
}

.mode-status {
  margin-top: 14px;
}

.mode-status strong {
  font-size: 0.875rem;
}

.work-area {
  min-width: 0;
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.top-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.operator-panel {
  display: grid;
  grid-template-columns: 160px 220px;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
}

input {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-raised);
  color: var(--ink);
  padding: 0 12px;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-raised);
  color: var(--ink);
  padding: 10px 12px;
}

select {
  min-height: 46px;
}

textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.45;
}

.live-status {
  min-height: 28px;
  padding: 6px 10px;
  border-left: 4px solid var(--accent);
  background: #eaf4f7;
  color: var(--accent-strong);
}

.view {
  display: none;
}

.view.is-visible {
  display: grid;
  gap: 16px;
}

.section-heading,
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.quick-actions,
.category-row,
.receipt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.panel-block {
  padding: 14px;
  display: grid;
  gap: 12px;
}

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

.product-card {
  min-height: 154px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

.product-card strong {
  font-size: 1.125rem;
}

.price-row,
.cart-line-top,
.cart-line-bottom,
.totals-box div,
.receipt-line,
.receipt-total {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.stock-pill {
  border-radius: 999px;
  padding: 3px 8px;
  background: #ecf7f1;
  color: var(--green);
  font-size: 0.75rem;
}

.stock-pill.low {
  background: #fff7df;
  color: var(--amber);
}

.stock-pill.out {
  background: #fdecea;
  color: var(--red);
}

.product-form,
.setup-grid,
.setup-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.guided-setup {
  border-color: rgba(23, 107, 135, 0.42);
}

.guided-setup.is-complete .setup-form {
  display: none;
}

.setup-state {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--accent-strong);
  background: #eaf4f7;
  font-weight: 700;
}

.helper-text {
  color: var(--muted);
  font-size: 0.875rem;
}

.csv-import,
.daily-close,
.needs-attention,
.owner-dashboard,
.operator-onboarding,
.demo-release,
.data-safety,
.install-local-app,
.spoken-guidance,
.release-readiness,
.accessibility-release,
.business-reporting,
.export-centre,
.stock-intelligence,
.admin-summary,
.close-history,
.cash-discrepancy-history,
.stock-movement-report {
  gap: 14px;
}

.report-subsection {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.warning-box {
  border: 1px solid var(--amber);
  border-radius: 8px;
  background: #fff7df;
  color: var(--ink);
  padding: 12px;
}

.warning-box ul {
  margin: 8px 0 0;
  padding-left: 22px;
}

.toggle-row {
  grid-template-columns: 24px 1fr;
  align-items: center;
  align-self: end;
}

.toggle-row input {
  min-height: 22px;
}

.inventory-table,
.orders-list {
  display: grid;
  gap: 10px;
}

.inventory-row,
.order-row,
.compact-row {
  display: grid;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.inventory-row {
  grid-template-columns: 1.4fr 0.6fr 0.5fr 0.4fr 1fr;
}

.order-row {
  grid-template-columns: 1fr auto auto auto;
}

.compact-row {
  grid-template-columns: 1fr auto;
}

.attention-row,
.stock-row,
.movement-row {
  display: grid;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.attention-row {
  grid-template-columns: 1fr auto;
}

.attention-row.high {
  border-color: var(--red);
}

.attention-row.medium,
.stock-row.needs-stock {
  border-color: var(--amber);
}

.stock-row {
  grid-template-columns: 1fr auto auto auto;
}

.movement-row {
  grid-template-columns: 1.4fr auto auto auto;
}

.movement-row.needs-stock {
  border-color: var(--amber);
}

.backup-reminder {
  border-left: 4px solid var(--accent);
  background: #eaf4f7;
  color: var(--accent-strong);
  padding: 10px 12px;
}

.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.onboarding-grid article,
.check-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.onboarding-grid article {
  display: grid;
  gap: 6px;
}

.onboarding-grid p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

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

.check-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 10px;
}

.check-row strong {
  color: var(--green);
}

.check-row.needs-review strong {
  color: var(--amber);
}

.danger-zone {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--red);
  border-radius: 8px;
  padding: 12px;
}

.danger-action {
  border-color: var(--red);
  color: var(--red);
  font-weight: 800;
}

.demo-release {
  border-color: rgba(36, 115, 95, 0.46);
}

.app-shell.demo-mode .mode-status > div:first-child {
  border-color: var(--green);
}

.app-shell.live-mode .mode-status > div:first-child {
  border-color: var(--accent);
}

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

.close-extra-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1.3fr);
  gap: 14px;
}

.summary-text {
  white-space: pre-wrap;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
}

.is-inactive {
  opacity: 0.62;
}

.warning-text {
  color: var(--amber);
}

.cart-card,
.receipt-panel {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.cart-items {
  min-height: 180px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.cart-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-controls button {
  width: 42px;
  padding: 0;
}

.totals-box {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  display: grid;
  gap: 8px;
}

.grand-total {
  padding-top: 8px;
  font-size: 1.5rem;
}

.checkout-controls {
  display: grid;
  gap: 10px;
}

.payment-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.cash-box {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.cash-box.is-visible {
  display: grid;
}

.cash-box strong,
.checkout-button {
  font-size: 1.25rem;
  font-weight: 800;
}

.checkout-button {
  min-height: 58px;
}

.receipt-content {
  min-height: 160px;
  display: grid;
  gap: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.receipt-heading {
  display: grid;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 2px;
}

.receipt-total {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 1.125rem;
}

.empty-state {
  min-height: 112px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  color: var(--muted);
}

.large-text {
  font-size: 1.125rem;
}

.large-text button,
.large-text input,
.large-text select {
  min-height: 52px;
}

.large-text h1 {
  font-size: 1.375rem;
}

.large-text h2 {
  font-size: 1.625rem;
}

.high-contrast {
  --ink: #000000;
  --muted: #303030;
  --line: #000000;
  --paper: #ffffff;
  --panel: #ffffff;
  --accent: #005fcc;
  --accent-strong: #003f88;
  --shadow: none;
}

.trial-mode .mode-status > div:first-child {
  border-color: var(--green);
  background: #eef7f3;
}

.safety-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.safety-grid strong {
  min-height: 64px;
  display: grid;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 6px solid var(--green);
  border-radius: 8px;
  padding: 12px;
  background: #f6fbf8;
  line-height: 1.35;
}

.shadow-safety .helper-text,
.fast-trial-logging .helper-text {
  max-width: 760px;
}

.trial-notes .primary-action {
  margin: 10px 0 12px;
}

.simple-mode .brand-lockup p,
.simple-mode .status-strip,
.simple-mode .product-card > span,
.simple-mode .operator-panel {
  display: none;
}

@media (max-width: 1300px) {
  .app-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .cart-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: none;
  }
}

@media (max-width: 1024px) {
  .app-shell {
    display: block;
    padding-bottom: 70px; /* Space for bottom nav */
  }

  .side-rail {
    display: contents; /* Allows child elements like mode-list to be positioned independently */
  }

  .mode-list {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--panel);
    border-top: 1px solid var(--line);
    display: flex;
    overflow-x: auto;
    padding: 10px;
    z-index: 9999;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.5);
  }

  .mode-button {
    flex: 1 0 auto;
    text-align: center;
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .side-rail .brand-lockup,
  .side-rail .status-strip,
  .side-rail .mode-status,
  .side-rail .demo-controls {
    padding: 20px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
  }

  .top-bar {
    position: sticky;
    top: 0;
    z-index: 9998;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    padding: 10px 20px;
  }

  .work-area,
  .cart-panel {
    border: 0;
  }

  .cart-panel,
  .top-bar,
  .operator-panel,
  .two-column,
  .product-form,
  .setup-form,
  .setup-grid,
  .close-extra-grid,
  .safety-grid,
  .stock-row,
  .movement-row,
  .onboarding-grid,
  .danger-zone {
    grid-template-columns: 1fr;
  }

  .mode-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-row,
  .order-row,
  .attention-row {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: flex-start;
  }
}

@media print {
  body {
    background: #fff;
  }

  button,
  input,
  select,
  textarea,
  .side-rail,
  .top-bar,
  .live-status,
  .checkout-controls,
  .cart-card,
  .demo-controls,
  .mode-status,
  .quick-actions,
  .guided-setup,
  .csv-import,
  .export-centre {
    display: none !important;
  }

  .app-shell,
  .work-area,
  .cart-panel,
  .view.is-visible,
  .receipt-panel {
    display: block;
    min-height: auto;
    max-height: none;
    overflow: visible;
    border: 0;
    padding: 0;
  }

  .view {
    display: none !important;
  }

  .view.is-visible {
    display: block !important;
  }

  .summary-grid,
  .two-column,
  .orders-list,
  .receipt-content {
    display: grid;
    gap: 8px;
  }

  .panel-block,
  .receipt-panel,
  .summary-grid > div,
  .compact-row,
  .order-row {
    border: 1px solid #000;
    border-radius: 0;
    box-shadow: none;
    break-inside: avoid;
  }
}

@media (max-width: 520px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .cart-header,
  .price-row,
  .cart-line-bottom {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-color-scheme: light) {
  :root:not(.high-contrast) {
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --paper: #f8fafc;
    --panel: #ffffff;
    --panel-raised: #f1f5f9;
  }
}

/* AI Bubble */
/* ==================== GARY AI AUTONOMOUS RETAIL COPILOT ==================== */
.ai-bubble.gary-ai-copilot {
  position: fixed;
  bottom: 24px;
  right: 24px;
  top: auto;
  width: 360px;
  max-width: calc(100vw - 32px);
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(12, 14, 18, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 24px rgba(245, 158, 11, 0.15);
  z-index: 10000;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.ai-bubble.gary-ai-copilot:hover {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.8), 0 0 32px rgba(245, 158, 11, 0.25);
}

.gary-copilot-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}
.gary-avatar-badge {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  flex-shrink: 0;
}
.gary-avatar-icon {
  font-size: 1.2rem;
  color: #0d0d08;
  font-weight: 900;
}
.gary-pulse-beacon {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #0c0e12;
  box-shadow: 0 0 6px #10b981;
  animation: pulse-beacon 2s infinite;
}
@keyframes pulse-beacon {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}
.gary-copilot-title-block {
  flex: 1;
  min-width: 0;
}
.gary-copilot-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #f59e0b;
  letter-spacing: 0.02em;
}
.gary-copilot-tagline {
  display: block;
  font-size: 0.7rem;
  color: var(--muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-bubble-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}
.gary-btn-voice {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 8px;
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
  color: #f59e0b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.gary-btn-voice:hover {
  background: rgba(245, 158, 11, 0.3);
  transform: scale(1.05);
}
.gary-btn-voice.is-listening {
  background: var(--danger, #ef4444);
  color: #fff;
  border-color: #ef4444;
  animation: pulse-recording 1.5s infinite;
}

.gary-btn-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  width: 2rem;
  height: 2rem;
  font-size: 0.75rem;
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.gary-btn-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ai-bubble-content {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}
.gary-ai-message {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #f1f5f9;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 140px;
  overflow-y: auto;
}

.gary-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gary-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.gary-chip:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: #f59e0b;
}

.gary-input-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.gary-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #fff;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.gary-input:focus {
  outline: none;
  border-color: #f59e0b;
}
.gary-send-btn {
  background: #f59e0b;
  border: none;
  border-radius: 8px;
  color: #0d0d08;
  font-weight: 900;
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.gary-send-btn:hover {
  background: #fbbf24;
  transform: scale(1.05);
}

.gary-ai-reopen {
  position: fixed;
  bottom: 20px;
  right: 20px;
  height: 40px;
  padding: 0 14px;
  border-radius: 20px;
  background: rgba(12, 14, 18, 0.95);
  border: 1px solid rgba(245, 158, 11, 0.6);
  color: #f59e0b;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(245, 158, 11, 0.2);
  cursor: pointer;
  z-index: 1000;
  transition: all 0.2s;
}
.gary-ai-reopen:hover {
  transform: translateY(-2px);
  border-color: #f59e0b;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8), 0 0 24px rgba(245, 158, 11, 0.4);
}
.gary-reopen-icon {
  font-size: 1rem;
}

/* Gary Z-Report & Settings Cards */
.gary-ai-briefing-panel, .gary-ai-upgrade-panel {
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.03) 0%, rgba(18, 20, 28, 0.8) 100%) !important;
}
.gary-heading-block {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gary-badge-pill {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.gary-badge-pill.gold {
  background: #f59e0b;
  color: #0d0d08;
}
.gary-action-btn {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.gary-action-btn:hover {
  background: rgba(245, 158, 11, 0.3);
  color: #fff;
}
.gary-commentary-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre-line;
}
.gary-eval-loading {
  color: var(--muted, #94a3b8);
  font-style: italic;
  margin: 0;
}

.back-home-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.back-home-btn:hover {
  background: rgba(212,160,23,0.1);
}

/* ==========================================================================
   AMC AUTOPOS CLOSED-NETWORK HUB & SATELLITE MESH STYLING
   ========================================================================== */
.network-mesh-panel {
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.7) 0%, rgba(30, 41, 59, 0.5) 100%) !important;
}

.network-heading-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.network-badge-pill {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
}

.network-status-badge {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}
.network-status-badge.hub-active {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.5);
}
.network-status-badge.satellite-active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.5);
}

.hub-connection-card,
.satellite-connection-card,
.network-quota-card,
.connected-tills-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px;
}

.hub-info-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hub-field-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #94a3b8);
  margin-bottom: 4px;
}

.hub-status-active {
  display: inline-block;
  color: #10b981;
  font-weight: 700;
  font-size: 0.85rem;
}

.hub-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 16px;
}

.qr-mockup {
  background: #ffffff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.qr-code-graphic {
  width: 140px;
  height: 140px;
  background: repeating-conic-gradient(#000000 0% 25%, #ffffff 0% 50%) 50% / 20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #000000;
  position: relative;
}

.qr-label {
  background: #000000;
  color: #ffffff;
  font-size: 0.55rem;
  font-weight: 900;
  text-align: center;
  padding: 4px;
  border-radius: 3px;
  max-width: 100px;
}

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

.quota-badge-pill {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.quota-meter-bar-container {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}

.quota-meter-bar {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.add-placeholder-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-top: 14px;
}

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

.terminal-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.terminal-item.hub-item {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.05);
}

.terminal-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.06em;
}

.satellite-status-badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}
.satellite-status-badge.connected {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.offline-buffer-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: #cbd5e1;
}

/* Shift Handoff & Till Reconciliation */
.btn-shift-handoff {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid #3b82f6;
  color: #60a5fa;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0 12px;
  min-height: 38px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-shift-handoff:hover {
  background: #1e3a8a;
  color: #fff;
  border-color: #60a5fa;
}

.shift-dialog {
  background: #0f172a;
  color: #f1f5f9;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 24px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}
.shift-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}
.shift-summary-box {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.shift-summary-box p {
  margin: 4px 0;
}
.discrepancy-banner {
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  margin: 12px 0;
  text-align: center;
}
.discrepancy-banner.balanced {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #34d399;
}
.discrepancy-banner.shortage {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #f87171;
}
.discrepancy-banner.surplus {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid #3b82f6;
  color: #60a5fa;
}

