:root {
  --background: 248 250 252;
  --foreground: 15 23 42;
  --card: 255 255 255;
  --border: 226 232 240;
  --muted: 100 116 139;
  --primary: 15 23 42;
}

html { color-scheme: light; }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(226, 232, 240, 0.45), transparent 32rem),
    rgb(var(--background));
  color: rgb(var(--foreground));
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgb(226 232 240);
  color: rgb(15 23 42);
}

.bt-main {
  max-width: 1680px;
  margin-inline: auto;
}

.bt-shadow {
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 18px 48px rgba(15, 23, 42, 0.07);
}

.bt-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgb(var(--border));
  border-radius: 0.875rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.025);
}

.bt-metric-card {
  min-height: 146px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.bt-metric-card:hover {
  border-color: rgb(203 213 225);
  box-shadow: 0 8px 26px rgba(15, 23, 42, .045);
  transform: translateY(-1px);
}

.bt-metric-icon,
.bt-notice-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(226 232 240);
  background: rgb(248 250 252);
  color: rgb(71 85 105);
}

.bt-sidebar {
  background: rgba(255, 255, 255, .98);
  border-right: 1px solid rgb(226 232 240);
  box-shadow: 10px 0 35px rgba(15, 23, 42, .025);
}

.bt-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .15rem .5rem 1.65rem;
  padding: .6rem .5rem;
}

.bt-brand-mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  flex: none;
  border-radius: .8rem;
  background: rgb(15 23 42);
  color: white;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .14);
}

.bt-nav-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 2.55rem;
  border-radius: .65rem;
  padding: .55rem .7rem;
  font-size: .875rem;
  font-weight: 500;
  transition: background-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.bt-nav-icon {
  display: grid;
  width: 1.45rem;
  place-items: center;
  flex: none;
}

.bt-nav-active {
  background: rgb(241 245 249);
  color: rgb(15 23 42);
  box-shadow: inset 0 0 0 1px rgba(203, 213, 225, .7);
}

.bt-nav-active .bt-nav-icon {
  color: rgb(15 23 42);
}

.bt-nav-inactive {
  color: rgb(71 85 105);
}

.bt-nav-inactive:hover {
  background: rgb(248 250 252);
  color: rgb(15 23 42);
}

.bt-nav-count {
  margin-left: auto;
  min-width: 1.35rem;
  border-radius: 999px;
  background: rgb(226 232 240);
  padding: .1rem .4rem;
  text-align: center;
  font-size: .68rem;
  font-weight: 700;
  color: rgb(71 85 105);
}

.bt-topbar {
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
}

.bt-icon-btn {
  display: inline-grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border: 1px solid rgb(226 232 240);
  border-radius: .7rem;
  background: white;
  color: rgb(71 85 105);
  transition: all .14s ease;
}

.bt-icon-btn:hover {
  border-color: rgb(203 213 225);
  background: rgb(248 250 252);
  color: rgb(15 23 42);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.bt-table-wrap {
  overflow-x: auto;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
}

.bt-table {
  width: 100%;
  border-collapse: collapse;
}

.bt-table th {
  white-space: nowrap;
  text-align: left;
  font-size: .69rem;
  letter-spacing: .075em;
  text-transform: uppercase;
  font-weight: 650;
  color: rgb(100 116 139);
  background: rgb(248 250 252);
  padding: .78rem 1rem;
  border-bottom: 1px solid rgb(226 232 240);
}

.bt-table td {
  padding: .88rem 1rem;
  border-bottom: 1px solid rgb(241 245 249);
  vertical-align: middle;
}

.bt-table tbody tr {
  transition: background-color .12s ease;
}

.bt-table tr:last-child td {
  border-bottom: 0;
}

.bt-input {
  width: 100%;
  min-height: 2.55rem;
  border: 1px solid rgb(203 213 225);
  border-radius: .65rem;
  padding: .62rem .78rem;
  background: rgba(255, 255, 255, .98);
  color: rgb(15 23 42);
  outline: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .02);
  transition: border-color .14s ease, box-shadow .14s ease;
}

.bt-input:hover {
  border-color: rgb(148 163 184);
}

.bt-input:focus {
  border-color: rgb(100 116 139);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, .16);
}

.bt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.5rem;
  border-radius: .65rem;
  padding: .62rem .9rem;
  font-size: .875rem;
  font-weight: 600;
  transition: all .14s ease;
}

.bt-btn-primary {
  background: rgb(15 23 42);
  color: white;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.bt-btn-primary:hover {
  background: rgb(30 41 59);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
}

.bt-btn-secondary {
  background: white;
  color: rgb(30 41 59);
  border: 1px solid rgb(203 213 225);
}

.bt-btn-secondary:hover {
  border-color: rgb(148 163 184);
  background: rgb(248 250 252);
}

.bt-back-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border-radius: .55rem;
  padding: .4rem .55rem;
  margin-left: -.55rem;
  color: rgb(71 85 105);
  font-size: .875rem;
  font-weight: 600;
  transition: background-color .14s ease, color .14s ease;
}

.bt-back-link:hover {
  background: rgb(241 245 249);
  color: rgb(15 23 42);
}

.bt-proof {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid rgb(226 232 240);
  border-radius: .55rem;
  padding: .32rem .48rem;
  color: rgb(100 116 139);
  background: white;
  font-size: .7rem;
  font-weight: 550;
}

.bt-proof-ok {
  border-color: rgb(187 247 208);
  background: rgb(240 253 244);
  color: rgb(21 128 61);
}

canvas {
  max-width: 100%;
}

@media (max-width: 767px) {
  .bt-sidebar {
    box-shadow: 18px 0 45px rgba(15, 23, 42, .14);
  }

  .bt-table th,
  .bt-table td {
    padding: .7rem .75rem;
  }

  .bt-main {
    padding-bottom: 2rem;
  }
}

/* NEW: keg registration + barcode label extension */
.bt-keg-feature-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  flex: none;
  border-radius: .75rem;
  border: 1px solid rgb(226 232 240);
  background: rgb(248 250 252);
  color: rgb(51 65 85);
}

.bt-barcode-preview {
  display: flex;
  min-height: 9.5rem;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  border: 1px dashed rgb(203 213 225);
  border-radius: .875rem;
  background:
    linear-gradient(180deg, rgba(248,250,252,.8), rgba(255,255,255,1));
  padding: 1rem;
}

.bt-barcode-preview svg {
  max-width: 100%;
  height: auto;
}

.bt-keg-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 100;
  border-radius: .75rem;
  background: rgb(15 23 42);
  color: white;
  padding: .7rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(15,23,42,.2);
}

@media (max-width: 767px) {
  .bt-keg-toast {
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    text-align: center;
  }
}

/* NEW: Back-office OpenStreetMap route visualization */
#btBackofficeRouteMap {
  z-index: 0;
  background: rgb(226 232 240);
}

.bt-route-marker {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 3px solid;
  border-radius: 999px;
  background: white;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(15,23,42,.22);
}

.bt-route-marker-complete {
  color: white;
}

.bt-route-marker-complete svg {
  width: 17px;
  height: 17px;
}

.bt-route-legend-item {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  gap: .42rem;
  border: 1px solid rgb(226 232 240);
  border-radius: .62rem;
  background: white;
  padding: .36rem .55rem;
  font-size: .7rem;
  font-weight: 600;
  color: rgb(51 65 85);
  transition: border-color .14s ease, background-color .14s ease;
}

.bt-route-legend-item:hover {
  border-color: rgb(148 163 184);
  background: rgb(248 250 252);
}

.bt-route-legend-line {
  width: 1.25rem;
  height: .2rem;
  border-radius: 999px;
}

.bt-route-status-key {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  gap: .4rem;
  border-radius: .6rem;
  padding: .35rem .45rem;
  font-size: .68rem;
  font-weight: 600;
  color: rgb(100 116 139);
}

.bt-route-solid-key,
.bt-route-dash-key {
  width: 1.25rem;
  height: 0;
  border-top: 3px solid rgb(71 85 105);
}

.bt-route-dash-key {
  border-top-style: dashed;
}

.bt-route-mini-keg {
  display: grid;
  width: 1.3rem;
  height: 1.3rem;
  place-items: center;
  border-radius: 999px;
  background: rgb(71 85 105);
  color: white;
}

.bt-route-mini-keg svg {
  width: .75rem;
  height: .75rem;
}

.bt-route-popup {
  min-width: 210px;
  color: rgb(15 23 42);
}

.bt-route-popup-driver {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: 11px;
  font-weight: 650;
  color: rgb(100 116 139);
}

.bt-route-popup-driver span {
  width: .75rem;
  height: .2rem;
  border-radius: 999px;
}

.bt-route-popup-title {
  margin-top: .45rem;
  font-size: 13px;
  font-weight: 700;
}

.bt-route-popup-address,
.bt-route-popup-meta,
.bt-route-popup-pod {
  margin-top: .25rem;
  font-size: 11px;
  line-height: 1.4;
  color: rgb(100 116 139);
}

.bt-route-popup-link {
  display: inline-block;
  margin-top: .65rem;
  font-size: 11px;
  font-weight: 700;
  color: rgb(37 99 235);
}

.leaflet-popup-content-wrapper {
  border-radius: .9rem;
  box-shadow: 0 14px 34px rgba(15,23,42,.17);
}

.leaflet-popup-tip {
  box-shadow: 3px 3px 8px rgba(15,23,42,.06);
}

.leaflet-control-zoom {
  overflow: hidden;
  border: 0 !important;
  border-radius: .7rem !important;
  box-shadow: 0 5px 14px rgba(15,23,42,.12) !important;
}

.leaflet-control-zoom a {
  border: 0 !important;
  color: rgb(15 23 42) !important;
}

.leaflet-tooltip {
  border: 1px solid rgb(226 232 240);
  border-radius: .55rem;
  box-shadow: 0 7px 18px rgba(15,23,42,.1);
  font-size: 11px;
}

@media (max-width: 767px) {
  #btBackofficeRouteMap {
    height: 340px !important;
  }
}

/* NEW: route driver map filtering controls */
.bt-route-driver-filter-wrap {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgb(226 232 240);
  border-radius: .62rem;
  background: white;
}

.bt-route-filter {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  gap: .42rem;
  border-radius: .62rem;
  padding: .36rem .55rem;
  font-size: .7rem;
  font-weight: 600;
  color: rgb(51 65 85);
  transition: background-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.bt-route-driver-filter-wrap .bt-route-filter {
  border-radius: 0;
}

.bt-route-filter:hover {
  background: rgb(248 250 252);
}

.bt-route-filter-active {
  background: rgb(15 23 42);
  color: white;
  box-shadow: 0 1px 2px rgba(15,23,42,.12);
}

.bt-route-filter-active .text-slate-400 {
  color: rgb(203 213 225);
}

.bt-route-filter-map-link {
  display: inline-grid;
  width: 2rem;
  place-items: center;
  border-left: 1px solid rgb(226 232 240);
  color: rgb(100 116 139);
  transition: background-color .14s ease, color .14s ease;
}

.bt-route-filter-map-link:hover {
  background: rgb(248 250 252);
  color: rgb(15 23 42);
}

.bt-route-filter-stack {
  display: inline-flex;
  align-items: center;
  width: 1.3rem;
}

.bt-route-filter-stack span {
  width: .75rem;
  height: .2rem;
  border-radius: 999px;
}

.bt-route-filter-stack span + span {
  margin-left: -.35rem;
}

/* NEW: separate Create Route page */
#btCreateRouteMap {
  z-index: 0;
  background: rgb(226 232 240);
}

.bt-customer-map-marker {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 3px solid white;
  border-radius: 999px;
  background: white;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(15,23,42,.22);
  transition: transform .14s ease, box-shadow .14s ease;
}

.bt-customer-map-marker.is-selected {
  transform: scale(1.08);
  border-width: 4px;
  box-shadow: 0 0 0 3px rgba(255,255,255,.95), 0 8px 20px rgba(15,23,42,.25);
}

.bt-customer-map-order {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgb(15 23 42);
  color: white;
  font-size: 10px;
  font-weight: 800;
}

.bt-customer-route-card {
  width: 100%;
  border: 1px solid rgb(226 232 240);
  border-radius: .875rem;
  background: white;
  padding: 1rem;
  text-align: left;
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.bt-customer-route-card:hover {
  border-color: rgb(148 163 184);
  box-shadow: 0 5px 16px rgba(15,23,42,.05);
}

.bt-customer-route-card.has-route {
  background: linear-gradient(180deg, rgb(248 250 252), white);
  border-color: rgb(203 213 225);
}

.bt-customer-route-card.is-selected {
  border-color: rgb(15 23 42);
  box-shadow: 0 0 0 2px rgba(15,23,42,.08);
}

.bt-customer-route-select {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  flex: none;
  border: 1px solid rgb(203 213 225);
  border-radius: 999px;
  background: white;
  color: rgb(71 85 105);
  font-size: 11px;
  font-weight: 800;
}

.bt-customer-route-card.is-selected .bt-customer-route-select {
  border-color: rgb(15 23 42);
  background: rgb(15 23 42);
  color: white;
}

.bt-customer-route-badge {
  display: inline-flex;
  min-height: 1.55rem;
  align-items: center;
  gap: .35rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 999px;
  background: white;
  padding: .22rem .45rem;
  color: rgb(71 85 105);
  font-size: .63rem;
  font-weight: 650;
}

.bt-customer-route-badge > span {
  width: .48rem;
  height: .48rem;
  border-radius: 999px;
  background: var(--route-color);
}

.bt-customer-unassigned-badge {
  display: inline-flex;
  min-height: 1.55rem;
  align-items: center;
  border-radius: 999px;
  background: rgb(240 253 244);
  padding: .22rem .5rem;
  color: rgb(21 128 61);
  font-size: .63rem;
  font-weight: 650;
}

@media (max-width: 767px) {
  #btCreateRouteMap {
    height: 380px !important;
  }
}

/* NEW: direction-aware next-stop suggestions */
.bt-route-ai-badge {
  display: inline-flex;
  min-height: 1.55rem;
  align-items: center;
  gap: .3rem;
  border-radius: 999px;
  background: rgb(241 245 249);
  padding: .2rem .48rem;
  color: rgb(71 85 105);
  font-size: .62rem;
  font-weight: 700;
}

.bt-route-suggestion-card {
  border: 1px solid rgb(203 213 225);
  border-radius: .875rem;
  background:
    linear-gradient(180deg, rgba(248,250,252,.95), rgba(255,255,255,1));
  padding: .9rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}

.bt-route-direction-pill {
  display: inline-flex;
  min-height: 1.5rem;
  align-items: center;
  border-radius: 999px;
  background: rgb(239 246 255);
  padding: .2rem .45rem;
  color: rgb(29 78 216);
  font-size: .62rem;
  font-weight: 700;
}

.bt-route-metric-pill {
  display: inline-flex;
  min-height: 1.5rem;
  align-items: center;
  gap: .28rem;
  border-radius: 999px;
  background: rgb(248 250 252);
  padding: .22rem .45rem;
  color: rgb(71 85 105);
  font-size: .61rem;
  font-weight: 650;
}

.bt-route-metric-pill.is-free {
  background: rgb(240 253 244);
  color: rgb(21 128 61);
}

.bt-route-metric-pill.is-assigned {
  background: rgb(255 247 237);
  color: rgb(194 65 12);
}

.bt-route-suggested-card {
  position: relative;
  border-color: rgb(147 197 253) !important;
  box-shadow: 0 0 0 2px rgba(59,130,246,.08);
}

.bt-route-suggestion-inline {
  display: inline-flex;
  min-height: 1.4rem;
  align-items: center;
  gap: .25rem;
  margin-bottom: .35rem;
  border-radius: 999px;
  background: rgb(239 246 255);
  padding: .18rem .42rem;
  color: rgb(37 99 235);
  font-size: .58rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* NEW: management reporting redesign */
.bt-report-filter-bar {
  position: sticky;
  top: 5.2rem;
  z-index: 10;
}

.bt-report-eyebrow {
  font-size: .69rem;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: rgb(100 116 139);
}

.bt-report-kpi-pill {
  display: inline-flex;
  min-height: 1.7rem;
  align-items: center;
  border-radius: 999px;
  background: rgb(241 245 249);
  padding: .3rem .55rem;
  font-size: .67rem;
  font-weight: 650;
  color: rgb(71 85 105);
}

.bt-report-metric {
  min-height: 8.5rem;
  border: 1px solid rgb(226 232 240);
  border-radius: .875rem;
  background: white;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.025);
}

.bt-report-metric-icon {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: .75rem;
  background: rgb(248 250 252);
  color: rgb(71 85 105);
  box-shadow: inset 0 0 0 1px rgb(226 232 240);
}

.bt-report-risk {
  display: inline-flex;
  min-height: 1.65rem;
  align-items: center;
  border-radius: 999px;
  padding: .25rem .5rem;
  font-size: .65rem;
  font-weight: 700;
}

.bt-report-risk.is-high {
  background: rgb(255 247 237);
  color: rgb(194 65 12);
}

.bt-report-risk.is-normal {
  background: rgb(240 253 244);
  color: rgb(21 128 61);
}

.bt-btn-danger {
  background: rgb(127 29 29);
  color: white;
  box-shadow: 0 1px 2px rgba(127,29,29,.12);
}

.bt-btn-danger:hover {
  background: rgb(153 27 27);
}

.bt-btn-danger:disabled {
  cursor: default;
  opacity: .65;
}

@media (max-width: 1023px) {
  .bt-report-filter-bar {
    position: static;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  body {
    background: white !important;
  }

  aside,
  header,
  .print\:hidden,
  #exportsSection,
  button {
    display: none !important;
  }

  .md\:pl-64 {
    padding-left: 0 !important;
  }

  main.bt-main {
    max-width: none !important;
    padding: 0 !important;
  }

  #reportBody {
    margin-top: 0 !important;
  }

  #reportBody > section {
    break-inside: avoid;
    margin-bottom: 18px !important;
  }

  .bt-card,
  .bt-report-metric {
    box-shadow: none !important;
    break-inside: avoid;
  }

  canvas {
    max-height: 250px !important;
  }

  a {
    color: inherit !important;
    text-decoration: none !important;
  }
}

/* NEW: distinct management report areas */
.bt-report-area-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 2rem;
}

.bt-report-area-card {
  --report-accent: 71 85 105;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  min-height: 5.6rem;
  border: 1px solid rgb(226 232 240);
  border-top: 3px solid rgb(var(--report-accent));
  border-radius: .9rem;
  background: white;
  padding: .9rem;
  color: rgb(71 85 105);
  box-shadow: 0 1px 2px rgba(15,23,42,.025);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.bt-report-area-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(15,23,42,.06);
}

.bt-report-area-card strong {
  display: block;
  font-size: .83rem;
  color: rgb(15 23 42);
}

.bt-report-area-card small {
  display: block;
  margin-top: .22rem;
  font-size: .68rem;
  line-height: 1.35;
  color: rgb(100 116 139);
}

.bt-report-area-icon {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: .72rem;
  background: rgb(var(--report-accent) / .09);
  color: rgb(var(--report-accent));
}

.bt-report-area-keg,
.bt-report-section-keg { --report-accent: 225 29 72; }

.bt-report-area-fleet,
.bt-report-section-fleet { --report-accent: 37 99 235; }

.bt-report-area-delivery,
.bt-report-section-delivery { --report-accent: 5 150 105; }

.bt-report-area-crm,
.bt-report-section-crm { --report-accent: 124 58 237; }

.bt-report-section {
  scroll-margin-top: 9rem;
  position: relative;
  border-top: 1px solid rgb(var(--report-accent) / .18);
  padding-top: 1.5rem;
}

.bt-report-section::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 5rem;
  height: 3px;
  border-radius: 999px;
  background: rgb(var(--report-accent));
}

.bt-report-section .bt-report-eyebrow {
  color: rgb(var(--report-accent));
}

@media (max-width: 1199px) {
  .bt-report-area-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .bt-report-area-nav {
    grid-template-columns: 1fr;
  }
}

/* NEW: compact tabbed reports layout */
.bt-report-tabs-wrap {
  position: sticky;
  top: 9.8rem;
  z-index: 9;
  border: 1px solid rgb(226 232 240);
  border-radius: .95rem;
  background: rgba(255,255,255,.96);
  padding: .55rem;
  box-shadow: 0 8px 24px rgba(15,23,42,.045);
  backdrop-filter: blur(14px);
}

.bt-report-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: .45rem;
}

.bt-report-tab {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: .6rem;
  min-height: 4.1rem;
  border-radius: .72rem;
  padding: .65rem .72rem;
  color: rgb(100 116 139);
  transition: background-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.bt-report-tab:hover {
  background: rgb(248 250 252);
  color: rgb(15 23 42);
}

.bt-report-tab strong {
  display: block;
  font-size: .77rem;
  color: inherit;
}

.bt-report-tab small {
  display: block;
  margin-top: .17rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .62rem;
  font-weight: 500;
  color: rgb(148 163 184);
}

.bt-report-tab-icon {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border-radius: .65rem;
  background: rgb(248 250 252);
  color: rgb(100 116 139);
}

.bt-report-tab-active {
  background: rgb(15 23 42);
  color: white;
  box-shadow: 0 3px 10px rgba(15,23,42,.13);
}

.bt-report-tab-active small {
  color: rgb(203 213 225);
}

.bt-report-tab-active .bt-report-tab-icon {
  background: rgba(255,255,255,.12);
  color: white;
}

.bt-report-tab-context {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgb(241 245 249);
  margin-top: .55rem;
  padding: .65rem .35rem .15rem;
}

#reportBody > .bt-report-section {
  margin-top: 0 !important;
  border-top: 0;
  padding-top: 1.25rem;
}

#reportBody > .bt-report-section::before {
  display: none;
}

/* NEW: QR keg asset labels */
.bt-qr-preview {
  display: flex;
  min-height: 17rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgb(203 213 225);
  border-radius: .875rem;
  background: linear-gradient(180deg, rgba(248,250,252,.8), white);
  padding: 1.25rem;
}

.bt-qr-box {
  display: grid;
  min-width: 220px;
  min-height: 220px;
  place-items: center;
  border-radius: .85rem;
  background: white;
  padding: .75rem;
  box-shadow: 0 0 0 1px rgb(226 232 240), 0 8px 24px rgba(15,23,42,.05);
}

.bt-qr-canvas,
.bt-qr-image {
  display: block !important;
  width: 196px !important;
  height: 196px !important;
  max-width: 100%;
  image-rendering: pixelated;
}

@media (max-width: 1199px) {
  .bt-report-tabs-wrap {
    top: 5rem;
  }

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

@media (max-width: 639px) {
  .bt-report-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .bt-report-tab {
    min-height: 3.5rem;
  }

  .bt-report-tab small {
    display: none;
  }

  .bt-report-tab-context {
    display: block;
  }

  .bt-report-tab-context > div:last-child {
    margin-top: .25rem;
  }

  .bt-qr-box {
    min-width: 190px;
    min-height: 190px;
  }

  .bt-qr-canvas,
  .bt-qr-image {
    width: 170px !important;
    height: 170px !important;
  }
}

@media print {
  #btReportTabs {
    display: none !important;
  }

  #reportBody > .bt-report-section.hidden {
    display: block !important;
  }
}

/* NEW: single QR payload presentation */
.bt-qr-payload-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.bt-qr-payload-summary > div {
  border: 1px solid rgb(241 245 249);
  border-radius: .65rem;
  background: rgb(248 250 252);
  padding: .6rem .7rem;
}

.bt-qr-payload-summary span {
  display: block;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgb(148 163 184);
}

.bt-qr-payload-summary strong {
  display: block;
  margin-top: .2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .72rem;
  font-weight: 650;
  color: rgb(51 65 85);
}

/* NEW: grouped professional notification center */
.bt-notification-summary {
  min-height: 8.4rem;
  border: 1px solid rgb(226 232 240);
  border-radius: .9rem;
  background: white;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.025);
}

.bt-notification-summary-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: .75rem;
}

.bt-notification-eyebrow {
  font-size: .67rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgb(100 116 139);
}

.bt-notification-section-count,
.bt-notification-count {
  display: inline-flex;
  min-width: 1.8rem;
  min-height: 1.7rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgb(241 245 249);
  padding: .2rem .5rem;
  font-size: .68rem;
  font-weight: 700;
  color: rgb(71 85 105);
}

.bt-notification-group {
  overflow: hidden;
  border: 1px solid rgb(226 232 240);
  border-radius: .9rem;
  background: white;
  box-shadow: 0 1px 2px rgba(15,23,42,.025);
}

.bt-notification-group-header {
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgb(241 245 249);
  background: rgb(248 250 252 / .72);
  padding: .85rem 1rem;
}

.bt-notification-group-icon {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  flex: none;
  border-radius: .72rem;
}

.bt-notification-group-icon-keg {
  background: rgb(255 241 242);
  color: rgb(190 18 60);
}

.bt-notification-group-icon-crm {
  background: rgb(239 246 255);
  color: rgb(29 78 216);
}

.bt-notification-row {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  gap: .8rem;
  padding: .8rem 1rem;
  transition: background-color .13s ease;
}

.bt-notification-row:hover {
  background: rgb(248 250 252);
}

.bt-notification-row-icon {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  flex: none;
  border-radius: .68rem;
}

@media (max-width: 639px) {
  .bt-qr-payload-summary {
    grid-template-columns: 1fr;
  }

  .bt-notification-row {
    align-items: flex-start;
  }
}
