/* V59: dashboard reference styling */
#dashboard .day-report-card.dashboard-section {
  background: #f7faf9;
  border-radius: 22px;
  padding: 18px;
  border-color: #e8eeeb;
  box-shadow: 0 3px 12px rgba(28, 65, 57, 0.055);
}
#dashboard .day-report-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
#dashboard .dash-date-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e8eeeb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-size: 22px;
  color: #202b28;
  display: grid;
  place-items: center;
  padding: 0;
}
#dashboard .dash-date-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
}
#dashboard #dashboardDateLabel {
  font-size: clamp(14px, 3.8vw, 20px);
  font-weight: 900;
  color: #202b28;
  text-align: center;
  white-space: nowrap;
}
#dashboard .dash-calendar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #202b28;
  padding: 2px;
}
#dashboard .dash-calendar svg {
  width: 25px;
  height: 25px;
}
#dashboard .day-report-metrics {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
}
#dashboard .day-metric {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 116px;
  padding: 16px;
  border: 1px solid #e9efec !important;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(24, 62, 52, 0.07);
}
#dashboard .dash-icon {
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f8fb;
}
#dashboard .dash-icon svg {
  width: 56px;
  height: 56px;
  display: block;
}
#dashboard .cash-mark {
  background: #edf7ef !important;
}
#dashboard .upi-mark {
  background: #fff !important;
  border: 1px solid #edf0ee;
}
#dashboard .dash-metric-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
#dashboard .dash-metric-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  color: #202b28;
}
#dashboard .day-metric strong {
  font-size: clamp(21px, 5vw, 29px);
  line-height: 1.1;
  font-weight: 900;
  color: #171f28;
  overflow-wrap: anywhere;
}

/* Payment choice cards keep the supplied UPI SVG prominent, with cash and split marks beside it. */
.payment-choice-grid button svg {
  width: 42px;
  height: 42px;
}
.payment-choice-grid .dual-mark svg {
  width: 29px;
  height: 38px;
}
.payment-choice-grid button {
  min-height: 94px;
  font-size: 13px;
}
.payment-mini svg {
  width: 20px;
  height: 20px;
}
@media (max-width: 420px) {
  #dashboard .day-report-card.dashboard-section {
    padding: 12px;
  }
  #dashboard .day-report-head {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 5px;
  }
  #dashboard .dash-date-arrow {
    width: 37px;
    height: 37px;
  }
  #dashboard .dash-date-center {
    gap: 4px;
  }
  #dashboard #dashboardDateLabel {
    font-size: 13px;
  }
  #dashboard .dash-calendar {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }
  #dashboard .dash-calendar svg {
    width: 21px;
    height: 21px;
  }
  #dashboard .day-metric {
    gap: 9px;
    min-height: 96px;
    padding: 10px;
    border-radius: 16px;
  }
  #dashboard .dash-icon {
    width: 49px;
    height: 49px;
    flex-basis: 49px;
    border-radius: 13px;
  }
  #dashboard .dash-icon svg {
    width: 43px;
    height: 43px;
  }
  #dashboard .dash-metric-name {
    font-size: 13px;
  }
  #dashboard .day-metric strong {
    font-size: 20px;
  }
}

/* V79: barcode / QR scan flow for New Bill */
.paper-add-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.paper-scan-button svg {
  width: 19px;
  height: 19px;
  display: block;
}
.barcode-scanner-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 28, 0.62);
  padding: 14px;
}
.barcode-scanner-overlay.show {
  display: flex;
}
.barcode-scanner-panel {
  width: min(100%, 520px);
  max-height: 92dvh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  color: #263238;
}
.barcode-scanner-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.barcode-scanner-head h3 {
  margin: 0 0 5px;
}
.barcode-scanner-head p {
  margin: 0 0 12px;
  color: #68767a;
  font-size: 13px;
  line-height: 1.4;
}
.barcode-html5-reader {
  width: 100%;
  margin: 10px 0;
  border-radius: 12px;
  overflow: hidden;
  background: #101820;
}
.barcode-html5-reader video {
  width: 100% !important;
  max-height: 300px;
  object-fit: cover;
}
.barcode-camera-video {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px;
  background: #101820;
  margin: 10px 0;
}
.barcode-scanner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}
.barcode-manual-row {
  display: flex;
  gap: 8px;
}
.barcode-manual-row input {
  flex: 1;
  min-width: 0;
}
.barcode-scanner-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.barcode-preview-card {
  border: 1px solid #dce6e5;
  background: #f5fbfa;
  border-radius: 12px;
  padding: 12px;
  margin-top: 12px;
}
.barcode-preview-card .barcode-preview-title {
  font-weight: 800;
  font-size: 16px;
}
.barcode-preview-card .barcode-preview-meta {
  font-size: 12px;
  color: #65777a;
  margin-top: 4px;
}
.barcode-preview-card .barcode-preview-price {
  margin-top: 10px;
}
.barcode-preview-card .barcode-preview-price input {
  width: 100%;
}
.barcode-preview-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
@media (max-width: 520px) {
  .barcode-scanner-panel {
    padding: 14px;
  }
  .barcode-manual-row {
    flex-direction: column;
  }
  .barcode-manual-row .btn {
    width: 100%;
  }
}
