#weighbridge { gap: 0; background: #fff; border: 1px solid #dde3e9; border-radius: 6px; letter-spacing: 0; }
.app:has(#weighbridge.active) #exportRecon { display: none; }
#weighbridge [hidden] { display: none !important; }
#weighbridge h3 { margin: 0 0 14px; font-size: 16px; letter-spacing: 0; }
.wb-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #e1e6ec; }
.wb-toolbar label { min-width: 140px; }
.wb-toolbar input, .wb-toolbar select, #wbDialog input, #wbDialog select, #wbDialog textarea, #wbDialog button, #weighbridge button { border-radius: 6px; letter-spacing: 0; }
.wb-toolbar #wbSource { min-width: 170px; max-width: 260px; }
.wb-status { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 13px; color: #b45309; }
.wb-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.wb-status.online { color: #087f67; }
.wb-status.offline, .wb-status.source_error { color: #c33035; }
.wb-band { padding: 20px; border-bottom: 1px solid #e1e6ec; }
.wb-live { display: grid; grid-template-columns: 1fr 1fr; }
.wb-live > div { display: grid; align-content: start; gap: 8px; }
.wb-live > div + div { border-left: 1px solid #e1e6ec; padding-left: 24px; }
.wb-live strong { font-size: 30px; font-variant-numeric: tabular-nums; line-height: 1.2; letter-spacing: 0; }
.wb-live span:last-child { font-size: 12px; color: #687588; }
.wb-chart { height: 220px; width: 100%; position: relative; }
.wb-chart canvas { width: 100%; height: 100%; display: block; }
#wbChartEmpty { position: absolute; inset: 0; display: grid; place-items: center; color: #7b8797; font-size: 14px; }
.wb-tabs { align-items: center; }
.wb-tabs [role=tab] { background: transparent; color: #596579; border: 1px solid transparent; box-shadow: none; }
.wb-tabs [aria-selected=true] { color: #087f67; background: #e8f6f1; border-color: #bde3d7; }
#weighbridge .wb-tabs [role=tab]:hover:not(:disabled) { color: #086652; background: #dcf0e8; border-color: #bde3d7; }
.wb-tabs .wb-event-filter { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: auto; }
.wb-event-filter input { width: 16px; height: 16px; min-height: 16px; }
.wb-table-wrap { width: 100%; overflow: auto; max-height: 620px; }
.wb-table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 13px; }
.wb-table th { position: sticky; top: 0; background: #f2f5f8; z-index: 1; }
.wb-table th, .wb-table td { padding: 12px 14px; border-bottom: 1px solid #e7ebef; text-align: left; white-space: nowrap; }
.wb-table td.wb-message { white-space: normal; min-width: 220px; max-width: 430px; line-height: 1.55; }
.wb-table td.wb-empty { text-align: center; padding: 42px 14px; color: #7b8797; }
.wb-tag { display: inline-block; padding: 3px 7px; border-radius: 4px; color: #9f3737; background: #fdf0f0; font-size: 12px; }
.wb-tag.reviewed { color: #087f67; background: #edf8f3; }
.wb-tag.followup { color: #9b620f; background: #fff5e3; }
.wb-error { padding: 12px 18px; color: #a52626; background: #fff0ef; margin: 0; font-size: 13px; overflow-wrap: anywhere; }
#wbCount { padding: 12px 18px; }
#wbDialog { width: min(1000px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 20px; border: 1px solid #d5dce5; border-radius: 8px; color: #192431; }
#wbDialog::backdrop { background: #11182780; }
.wb-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.wb-dialog-head h3 { margin: 0; font-size: 18px; }
#wbDialog form { display: grid; gap: 14px; margin-top: 16px; }
.wb-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#wbDialog .wb-error { margin-bottom: 12px; border-radius: 4px; }
.wb-token { font-family: Consolas, monospace; word-break: break-all; }
.wb-version { border-top: 1px solid #dfe5ec; margin-top: 18px; padding-top: 14px; }
.wb-version h4 { font-size: 14px; margin: 0 0 10px; }
.wb-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wb-detail-grid div { display: grid; gap: 4px; overflow-wrap: anywhere; font-size: 14px; }
.wb-detail-grid dt { color: #687588; font-size: 12px; }
.wb-detail-grid dd { margin: 0; }
.wb-review-list { padding: 12px 0; border-top: 1px solid #e1e6ec; font-size: 13px; }
@media(max-width: 700px) {
  .app:has(#weighbridge.active) > .side { height: 210px; position: static; overflow: auto; }
  .wb-toolbar { padding: 12px; gap: 10px; }
  .wb-toolbar label { flex: 1; min-width: 130px; }
  .wb-toolbar #wbSource { width: 100%; min-width: 0; max-width: none; }
  .wb-band { padding: 16px 12px; }
  .wb-live { grid-template-columns: 1fr; gap: 18px; }
  .wb-live > div + div { padding: 16px 0 0; border-left: 0; border-top: 1px solid #e1e6ec; }
  .wb-live strong { font-size: 27px; }
  .wb-tabs .wb-event-filter { margin-left: 0; flex: initial; }
  .wb-chart { height: 180px; }
  .wb-form-row, .wb-detail-grid { grid-template-columns: 1fr 1fr; }
}
