/* ===============================
   ROB SALES – BOOTSTRAP NAVBAR
   =============================== */

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }

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


/* HIDE ON MOBILE */
@media (max-width: 767px) {
  .hide-on-mobile {
    display: none !important;
  }
  .kpi-hint {
    display: none !important;
  }
  .legend.subtle {
    display: none !important;
  }
}

p {
  text-align: center;
}

h4,
h5 {
  margin: 0;
  color: var(--ink, #333);
}

h5 {
  color: var(--accent);
}

/* Removed: was overriding ALL button hover colors (success, danger, etc.) to brand navy */

#app-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--brand, #00093d);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#app-loader img {
  border-radius: 50%;
  width: 120px;
  animation: spin 7s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* RECORD SALE STYLES */
.section-box {
  margin-top: 1rem;
  padding: 20px;
  margin-bottom: 30px;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 14px;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 2px 6px rgba(0,0,0,0.06);
}

.filter-section input,
.filter-section select {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid var(--border, #ccc);
  border-radius: 4px;
}

/* --- CART STYLES--- */
.cart-table {
  margin: 0;
  width: 100%;
  font-size: 0.84rem;
}

.cart-table thead th {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  border-bottom: 2px solid #e2e8f0;
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
}

.cart-table tbody td {
  padding: 0.55rem 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.84rem;
  color: #1e293b;
}

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

.cart-table tbody tr:hover td {
  background: #f8fafc;
}

.cart-totals {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  padding: 0.6rem 0.75rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 0.84rem;
  color: #475569;
}

.cart-totals p {
  margin: 0;
}

.cart-totals strong {
  color: #0d1b6e;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: #0f172a;
}

.cart-subtotal {
  font-weight: 700;
  color: #0d1b6e;
}

.num-input {
  width: 72px;
  text-align: right;
  font-size: 0.84rem;
  padding: 0.3rem 0.5rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
}

.num-input:focus {
  outline: none;
  border-color: #0d1b6e;
}

.cart-actions {
  display: flex;
  justify-content: space-evenly;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* --- ADDED STYLES FOR CART AND PRODUCT SEARCH --- */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 8px;
  border-bottom: 1px solid var(--border, #e0e0e0);
}

.cart-item input[type="number"] {
  width: 60px;
}

.cart-item span {
  flex: 1;
}


/* RECENT SALES */
#recentProducts .match-pill {
  display: inline-block;
  margin: 4px 4px 4px 0;
  padding: 6px 10px;
  font-size: var(--fs-0, 0.85rem);
  border-radius: 16px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

#recentProducts .match-pill:hover {
  background-color: var(--brand-hover, #022f5b);
}

/* Dashboard Summary Container */
.dashboard-summary-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: stretch;
  min-height: 0;
  margin: 1rem auto;
  height: 100%;
  max-height: 250px;
}

.dashboard-summary-wrapper .dashboard-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  grid-auto-rows: 1fr;
  gap: 20px;
  width: auto;
  height: 100%;
  min-height: 0;
}

.dashboard-summary-wrapper .chart-card {
  flex: 1;
  min-width: 100px;
  padding: 15px;
  background: var(--bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  height: 90%;
  min-height: 0;
}

.dashboard-summary-wrapper .chart-card #salesLineChart {
  flex: 1;
  min-height: 0;
  width: 100% !important;
  position: relative;
}

.multi-row-dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: flex-start;
  min-height: 0;
  margin: 1rem auto;
  padding: 0.5rem;
}

.multi-row-dashboard .multi-row-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  grid-auto-rows: minmax(100px, auto);
  gap: 20px;
  width: 100%;
}

.multi-card {
  background: linear-gradient(
    to bottom,
    var(--bg, #ffffff),
    var(--bg-alt, #f9f9f9)
  );
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  text-align: center;
  transition: transform 0.2s ease;
  word-break: break-word;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: auto;
  min-height: 0;
  width: 90%;
}

.progress.compact {
  height: 1.5rem;
  background: var(--muted, #eee);
  border-radius: 6px;
  overflow: hidden;
}

.progress.compact .bar {
  height: 100%;
  transition: width 0.3s ease;
}

.mini-card {
  padding: 10px 12px;
  background: var(--bg, #fff);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --- Small Mobile (<=480px) --- */
@media (max-width: 480px) {
  .mini-card {
    min-height: 120px;
    padding: 8px 10px;
  }
}

/* Dashboard cards adjustments (unchanged from your existing) */
@media (max-width: 900px) {
  .dashboard-summary-wrapper {
    flex-direction: column;
    max-height: 300px;
    gap: 1rem;
  }

  .dashboard-summary-wrapper .chart-card {
    display: none;
  }

  .dashboard-summary-wrapper .dashboard-cards {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .dashboard-summary-wrapper .dashboard-cards {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
  }
}

/* TABLE CARD WRAPPER */
.card {
  background-color: var(--card-bg, #ffffff);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.card .mt-4{
  margin-bottom: 40px;
}

.flex {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.flex .card {
  flex: 1;
  min-width: 300px;
}

.container {
  min-height: calc(100vh - 130px);
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease-in-out;
  box-sizing: border-box;
  overflow: hidden;
}

.page-container {
  display: flex;
  flex-grow: 1;
  min-height: 100%;
  gap: 20px;
}


.page-anchors {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--hover-bg, #f4f4f4);
  padding: 12px 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-size: var(--fs-0, 14px);
}

.page-anchors .left-label {
  font-weight: 600;
  color: var(--ink, #333);
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-anchors .back-link {
  background-color: var(--brand, #00093d);
  color: var(--on-dark, #ffffff);
  padding: 6px 12px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease-in-out;
}

.page-anchors .back-link:hover {
  background-color: var(--brand-hover, #001060);
}


.main-content {
  flex: 1;
  background: #ffffff;
  border-radius: 12px;
  padding: 0 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 10px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.app-footer {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.04em;
  padding: 1.2rem 1rem;
  margin-top: 2rem;
  border-top: 1px solid #e9eef4;
  background: #f8fafc;
}

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

.tab-btn {
  font-size: var(--fs-1);
  max-height: 30px;
  display: inline-block;
  padding: 0.5rem;
  margin-right: 8px;
  border-radius: 1rem;
  background-color: var(--hover-bg, #e1e1e1);
  color: var(--ink, #333);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--border, #ccc);
}

.tab-btn.active {
  background-color: var(--brand, #007bff);
  color: var(--on-dark, #fff);
}


.kpi-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.stat-item {
  background: var(--bg-alt, #f8f9fa);
  padding: 12px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}


/* REGISTER ANIMATIONS */
/* ===== Multi-step Wizard ===== */
#register-form {
  position: relative;
  min-height: 350px;
  /* ensures card height stays consistent */
  overflow: hidden;
}

/* Hide steps completely by default */
.form-step {
  display: none;
  opacity: 0;
  transform: translateX(40px);
}

/* Only active step shows */
.form-step.active {
  display: block;
  animation: fadeSlide 0.4s ease forwards;
}

/* Fade + slide animation */
@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Progress bar dots */
#progress-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0 20px;
  gap: 10px;
}

.progress-step {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ccc;
  transition: background 0.3s ease, transform 0.3s ease;
}

.progress-step.active {
  background: var(--accent);
  transform: scale(1.2);
}

.alert-success {
  background-color: var(--success-bg, #d4edda);
  color: var(--success-text, #155724);
  padding: 10px;
  border-radius: 5px;
}

.alert-warning {
  background-color: var(--warning-bg, #fff3cd);
  color: var(--warning-text, #856404);
  padding: 10px;
  border-radius: 5px;
}

.alert-danger {
  background-color: var(--danger-bg, #f8d7da);
  color: var(--danger-text, #721c24);
  padding: 10px;
  border-radius: 5px;
}

#matchResults {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  max-height: 150px;
  overflow-y: auto;
  padding: 5px;
  background-color: var(--bg, #fff);
  border: 1px dashed var(--border, #ccc);
  border-radius: 6px;
}

.match-pill {
  background-color: var(--brand, #00093d);
  color: var(--on-dark, #fff);
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: var(--fs-00, 13px);
}

.match-pill:hover {
  background-color: var(--brand-hover, #022f5b);
}

.flex-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.flex-left-narrow {
  flex: 1;
  margin-top: 0.55rem;
  width: 100%;
}

.flex-right-wide {
  flex: 2;
  width: 100%;
}

/* UPDATE QTY BUTTONS */
/* ===== BUTTON SIZE VARIANTS ===== */
.btn.sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  border-radius: 0.4rem;
  font-weight: 600;
  line-height: 1;
}

.btn.xs {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.3rem;
  font-weight: 600;
  line-height: 1;
}

/* For quantity +/- buttons */
.qty-control .btn {
  padding: 0.35rem 0.6rem;
  font-size: 1rem;
  line-height: 1;
  border-radius: 0.4rem;
  min-width: 2rem;
}

/* Align the +/- and input neatly */
.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.qty-control input[type="number"] {
  width: 3rem;
  text-align: center;
  font-size: 1rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  height: 2rem;
}

.section {
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

.flex-box {
  flex: 1;
  min-width: 280px;
}

.col-left {
  text-align: left;
}

.col-center {
  text-align: center;
}

.col-right {
  text-align: right;
}

.status.paid {
  color: var(--success, green);
  font-weight: bold;
}

.status.partial {
  color: var(--accent, #ffba08);
  font-weight: bold;
}

.status.unpaid {
  color: var(--danger, red);
  font-weight: bold;
}

.gradient-divider {
  height: 6px;
  border: none;
  border-radius: 3px;
  margin-bottom: 10px;
  background-color: var(--brand, #001060);
  background-image: none;
}

.center-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 100px);
}

.form-wrapper {
  background: var(--bg, #fff);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 450px;
}

.main-content .single-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.main-content .single-main h4 {
  margin-bottom: 20px;
  font-size: 1.4rem;
  font-weight: bolder;
}

.main-content .single-main .form-group {
  width: 100%;
}

.main-content .single-main button {
  padding: 8px 20px;
}



.company-details-inline {
  font-size: var(--fs-00, 13px);
  line-height: 1.4;
  color: var(--on-dark, #fff);
}

.quick-dashboard {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--on-dark, #fff);
  padding: 0.3rem;
  border-radius: 6px;
  font-size: var(--fs-0, 14px);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-dashboard:hover {
  background-color: var(--accent, #ffba08);
  color: var(--brand, #00093d);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

/* ICONS */

.title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 8px;
  justify-content: flex-end;
}

.icon-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease,
    border-color 0.12s ease;
}

.icon-btn i {
  font-size: 16px;
}

.icon-btn:hover {
  transform: translateY(-1px);
  background: var(--bg-alt, #f7f8fa);
}

.icon-btn.active {
  border-color: var(--brand, #2a8c82);
  box-shadow: 0 0 0 3px var(--ring, rgba(42, 140, 130, 0.15));
}

/* Tab chips inside toggle sections */
.tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tab.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  /* a hair smaller than icon-btn (36px) */
  height: 34px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 9999px;
  /* pill to distinguish from icon-btn's 10px */
  background: #fff;
  color: var(--text, #111827);
  transition: transform 0.12s ease, background 0.12s ease,
    border-color 0.12s ease, box-shadow 0.12s ease;
}

.tab.chip i {
  font-size: 15px;
}

.tab.chip:hover {
  transform: translateY(-1px);
  background: var(--bg-alt, #f7f8fa);
}

.tab.chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring, rgba(42, 140, 130, 0.15));
  border-color: var(--brand, #2a8c82);
}

.tab.chip.active,
.tab.chip[aria-selected="true"] {
  background: var(--brand, #2a8c82);
  /* filled, vs icon-btn’s outlined active */
  border-color: var(--brand, #2a8c82);
  color: #fff;
  box-shadow: 0 0 0 3px var(--ring, rgba(42, 140, 130, 0.15));
}

/* keep panels tidy */
.tab-panel {
  margin-top: 8px;
}

.tab-panel[hidden] {
  display: none;
}

/* END OF ICONS */

/* VERY SMALL POS DEVICES */
@media (max-width: 400px) {
  body,
  html,
  .page-wrapper {
    padding: 0;
    margin: 0;
    width: 100%;
    height: auto;
    font-size: var(--fs-00, 13px);
  }

  .container,
  .main-content,
  .page-layout {
    padding: 0 3px;
  }


  .sidebar {
    margin-bottom: 5px;
  }

  .sidebar-menu {
    gap: 6px;
    padding: 6px;
  }

  .nav-card {
    min-width: 60px;
    padding: 4px 6px;
    font-size: var(--fs-00, 11px);
  }

  .nav-card .icon {
    font-size: var(--fs-1, 16px);
    margin-bottom: 2px;
  }

  .table th,
  .table td {
    font-size: var(--fs-00, 12px);
    padding: 4px;
  }

  .section {
    padding: 12px 0;
  }

  .cart-actions button {
    padding: 8px 10px;
    font-size: var(--fs-00, 13px);
  }

  .pos-compact {
    font-size: var(--fs-00, 12px) !important;
    padding: 4px !important;
    margin: 2px !important;
  }

  .pos-no-margin {
    margin: 0 !important;
  }

  .pos-no-padding {
    padding: 0 !important;
  }
}

/* Mobile phones (up to 600px) */
@media (max-width: 600px) {
  body,
  html,
  .page-wrapper {
    padding: 0;
    margin: 0;
    width: 100%;
    height: auto;
  }

  .container,
  .main-content,
  .page-layout {
    width: 100%;
    padding: 0 5px;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .sidebar {
    width: 100%;
    padding: 0;
    margin-bottom: 10px;
    background-color: var(--bg-alt, #f8f8f8);
    border-bottom: 1px solid var(--border, #ddd);
    height: auto;
  }

  .sidebar-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    height: auto;
  }

  .sidebar-menu::-webkit-scrollbar {
    display: none;
  }


  .nav-card .icon {
    font-size: var(--fs-1, 18px);
    margin-bottom: 4px;
  }

  .nav-card .label {
    font-size: var(--fs-00, 12px);
    line-height: 1.2;
  }

  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-responsive .table {
    min-width: 600px;
    display: block;
  }

  .table th,
  .table td {
    font-size: var(--fs-0, 14px);
    padding: 6px;
  }

  .section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 16px 0;
  }

  .cart-actions {
    gap: 20px;
    align-items: center;
  }

  .flex-row,
  .page-layout{
    flex-direction: column;
    align-items: center;
  }

  .flex .card {
    max-width: 100%;
  }

  .page-container {
    flex-direction: column;
    gap: 0;
  }

  .top-product-grid {
    align-items: center;
    flex-direction: column;
    gap: 12px;
    padding: 0 6px;
  }

  .top-product-box {
    width: 100% !important;
    max-width: 100%;
    min-width: unset;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
  }
}

/* Tablets (601px - 992px) - Mobile-like feel */
@media (min-width: 601px) and (max-width: 992px) {
  body,
  html,
  .page-wrapper {
    padding: 0;
    margin: 0;
    width: 100%;
  }

  .container,
  .main-content,
  .page-layout {
    width: 100%;
    padding: 0 10px;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .sidebar {
    width: 100%;
    padding: 0;
    margin-bottom: 15px;
    background-color: var(--bg-alt, #f8f8f8);
    border-bottom: 1px solid var(--border, #ddd);
    height: auto;
  }

  .sidebar-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-card {
    min-width: 85px;
    padding: 8px 10px;
    font-size: var(--fs-0, 13px);
  }

  .nav-card .icon {
    font-size: var(--fs-2, 20px);
  }

  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-responsive .table {
    min-width: 600px;
    display: block;
  }

  .section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 18px 0;
  }

  .flex-row,
  .page-layout,
  .filter-row {
    flex-direction: column;
    align-items: center;
  }

  .flex .card {
    max-width: 100%;
  }

  .page-container {
    flex-direction: column;
    gap: 0;
  }

  .top-product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;
    margin-top: 1rem;
  }

  .top-product-box {
    flex: 1 1 calc(50% - 1rem);
    max-width: 100%;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
    background: linear-gradient(135deg, var(--mint, #d1fae5), #a7f3d0);
    border: 1px solid #6ee7b7;
    word-break: break-word;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
}

/* REPORT FILTERS AND CARD MEDIA */
@media screen and (max-width: 768px) {
  .filter-row {
    min-width: 260px;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .filter-item {
    width: 100%;
    font-size: var(--fs-00, 13px);
  }

  .filter-item label {
    margin-bottom: 3px;
    font-weight: 500;
  }

  .filter-item input,
  .filter-item select {
    padding: 6px;
    font-size: var(--fs-00, 13px);
  }

  .filter-item button {
    width: 100%;
    padding: 8px;
    font-size: var(--fs-0, 14px);
  }

.section-box {
    margin-bottom: 15px;
    padding: 15px;
  }

  .cart-item {
    gap: 6px;
    padding: 6px;
  }

  .cart-item input[type="number"] {
    width: 50px;
  }
}

/* Responsive Fix for Smaller Screens */
@media (max-width: 768px) {
  .search-container {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input,
  .category-select {
    min-width: 100%;
    width: 100%;
  }
}

/* SEARCH SETTINGS */
.search-container {
  display: flex;
  justify-content: flex-start;
  margin: 20px 0;
  gap: 15px;
}

.search-input {
  padding: 8px 16px;
  border: 1px solid var(--border, #ddd);
  border-radius: 4px;
  min-width: 300px;
  font-size: var(--fs-1, 16px);
}

.category-select {
  padding: 8px 16px;
  border: 1px solid var(--border, #ddd);
  border-radius: 4px;
  font-size: var(--fs-1, 16px);
  min-width: 200px;
}


#page-loading {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  z-index: 9999;
  backdrop-filter: blur(1px);
}

html.is-loading #page-loading {
  display: flex;
}

html.is-loading {
  cursor: progress;
}

html.is-loading * {
  pointer-events: none !important;
}

.spinner-dots {
  --size: 36px;
  --dot: 5px;
  --speed: 0.9s;
  width: var(--size);
  height: var(--size);
  position: relative;
  color: currentColor;
}

.spinner-dots::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  --r: calc(var(--size) / 2 - var(--dot));
  box-shadow: 0 calc(-1 * var(--r)) 0 0 currentColor,
    calc(var(--r) * 0.7071) calc(-1 * var(--r) * 0.7071) 0 0 currentColor,
    var(--r) 0 0 0 currentColor,
    calc(var(--r) * 0.7071) calc(var(--r) * 0.7071) 0 0 currentColor,
    0 var(--r) 0 0 currentColor,
    calc(-1 * var(--r) * 0.7071) calc(var(--r) * 0.7071) 0 0 currentColor,
    calc(-1 * var(--r)) 0 0 0 currentColor,
    calc(-1 * var(--r) * 0.7071) calc(-1 * var(--r) * 0.7071) 0 0 currentColor;
  animation: spinner-rotate var(--speed) linear infinite;
}

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

/* ===============================
   POS — MOBILE / TABLET
   =============================== */

/* Sticky checkout bar on mobile & tablet */
@media (max-width: 991px) {
  .pos-bar {
    position: sticky;
    bottom: 0;
    z-index: 50;
    background: #ffffff;
    border-top: 1px solid var(--border, #e5e7eb);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.09);
    padding: 10px 14px 14px;
    margin: 0 -5px -5px;
  }

  /* Room so content doesn't sit behind the sticky bar */
  .main-content {
    padding-bottom: 100px;
  }
}

/* Big thumb-friendly payment buttons */
.cart-actions .payment-btn {
  min-width: 130px;
  min-height: 52px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: transform 0.1s, box-shadow 0.1s;
}

.cart-actions .payment-btn:active {
  transform: scale(0.97);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* Cart qty +/- — comfortable touch target */
.qty-btn {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  min-width: 36px;
  min-height: 36px;
  line-height: 1;
  border-radius: 0.4rem;
}

/* Remove button — compact × */
.remove-btn {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  min-width: 28px;
  min-height: 28px;
  line-height: 1;
  border-radius: 6px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.remove-btn:hover {
  opacity: 1;
}

/* Larger frequently-sold pills */
#recentProducts .match-pill {
  padding: 8px 14px;
  font-size: 0.88rem;
}

/* Search results rows — taller tap target */
#matchResults .match-pill {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 2px 0;
  font-size: 0.9rem;
}
}
