:root {
  --tblr-primary: #1677ff;
  --tblr-primary-rgb: 22, 119, 255;
  --tblr-border-color: #d9d9d9;
  --tblr-card-shadow: 0 6px 18px rgba(5, 5, 5, 0.06);
  --tblr-body-bg: #f5f7f9;
  --tblr-text: rgba(0, 0, 0, 0.88);
  --tblr-text-muted: rgba(0, 0, 0, 0.45);
  --tblr-surface: #ffffff;
  --tblr-surface-subtle: #fafafa;
}

.border-rfc {
  --bs-border-opacity: 1;
  border-color: rgba(217, 217, 217, var(--bs-border-opacity)) !important;
}

/* Constrains a select+button input-group to 90% of its encapsulating
   .form-field container (e.g. the "Who Dispensed The Gas?" field). */
.w-90 {
  width: 90% !important;
}

body {
  background: var(--tblr-body-bg);
  color: var(--tblr-text);
  padding-top: 70px;
  padding-left: 20px;
  padding-right: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body > .container-fluid.px-4 {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

/* Shared per-indicator theme colors, reused by the pool edit page and the
   Pool Reading Report so both stay visually consistent. */
.pool-indicator-icon {
  color: var(--pool-indicator-color, #4c6ef5);
  font-size: 1.26rem;
  line-height: 1;
}

.pool-indicator-theme-alkalinity {
  --pool-indicator-color: #8f5cf6;
  --pool-indicator-bg: rgba(143, 92, 246, 0.045);
}

.pool-indicator-theme-ph {
  --pool-indicator-color: #2563eb;
  --pool-indicator-bg: rgba(37, 99, 235, 0.05);
}

.pool-indicator-theme-total-chlorine {
  --pool-indicator-color: #0f766e;
  --pool-indicator-bg: rgba(15, 118, 110, 0.05);
}

.pool-indicator-theme-free-chlorine {
  --pool-indicator-color: #2b8a3e;
  --pool-indicator-bg: rgba(43, 138, 62, 0.05);
}

.pool-indicator-theme-total-hardness {
  --pool-indicator-color: #6b7280;
  --pool-indicator-bg: rgba(107, 114, 128, 0.055);
}

.pool-indicator-theme-cyanuric-acid {
  --pool-indicator-color: #d97706;
  --pool-indicator-bg: rgba(217, 119, 6, 0.055);
}

.back-to-top-button {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--tblr-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(var(--tblr-primary-rgb), 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, background-color 0.2s ease;
  z-index: 1060;
  pointer-events: none;
}

.back-to-top-button.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top-button:hover,
.back-to-top-button:focus-visible {
  background: #0958d9;
  outline: none;
}

.back-to-top-button span {
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 700;
}

@media (max-width: 767.98px) {
  .back-to-top-button {
    right: 14px;
    bottom: 18px;
    width: 42px;
    height: 42px;
  }
}

body > .container-fluid.px-4 > .card.mb-5.records-card {
  width: 100%;
  max-width: 90vw;
  margin-left: auto;
  margin-right: auto;
}

.records-card .card-header {
  background-color: var(--tblr-surface) !important;
  color: var(--tblr-text) !important;
  border-bottom: 1px solid var(--tblr-border-color);
}

.records-card .table {
  --bs-table-striped-bg: #fafafa;
  --bs-table-striped-color: var(--tblr-text);
  --bs-table-hover-bg: #f0f5ff;
  --bs-table-hover-color: var(--tblr-text);
  --bs-table-border-color: #f0f0f0;
}

.records-card .table thead th {
  background-color: #fafafa !important;
  color: var(--tblr-text);
  border-bottom: 1px solid #f0f0f0;
  letter-spacing: 0.03em;
}

.records-card .table thead th .sort-link {
  color: var(--tblr-text);
}

.records-card .table thead th .sort-link:hover {
  color: var(--tblr-primary);
  text-decoration: none;
}

.records-card .table tbody td {
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
  color: var(--tblr-text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.25;
}

.records-card .table tbody td .cell-value,
.records-card .table tbody td .date-cell-main,
.records-card .table tbody td .weekday-inline {
  display: block;
  width: 100%;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: left;
}

.records-card .table thead .id-col {
  background-color: #fafafa;
}

.records-card .table tbody tr:nth-of-type(odd) .id-col {
  background-color: #fafafa;
}

.records-card .table tbody tr:nth-of-type(even) .id-col {
  background-color: #ffffff;
}

.records-card .table tbody tr:hover .id-col {
  background-color: #f0f5ff;
}

.card {
  border: 1px solid var(--tblr-border-color);
  border-radius: 16px;
  box-shadow: var(--tblr-card-shadow);
  background-color: var(--tblr-surface);
}

.card-header {
  border-bottom: 1px solid var(--tblr-border-color);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.table-container {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table .id-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
}

.table thead .id-col {
  z-index: 4;
  background: #fafafa;
}

.weekday-inline {
  display: none;
}

.records-card .weekday-inline {
  display: none;
}

.date-cell-main {
  display: block;
}

@media (max-width: 767.98px) {
  .table .mobile-hide-col {
    display: none;
  }

  .table .weekday-col {
    display: none;
  }

  .records-card .weekday-inline {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    line-height: 1.2;
  }
}

.table thead th {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tblr-text-muted);
}

#historyViewModal .history-modal-table thead th {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.2;
}

.table td,
.table th {
  padding: 0.85rem 0.95rem;
}

.sort-link {
  text-decoration: none;
  color: var(--tblr-text);
  font-weight: 600;
}

.sort-link:hover {
  text-decoration: underline;
  color: var(--tblr-primary);
}

.history-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  margin-left: 6px;
  vertical-align: middle;
  border-radius: 999px;
  font-size: 0.612rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  padding: 0 3.4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.history-indicator.bg-history-green {
  background-color: #52c41a;
  transform: scale(1.02);
}

.history-indicator.bg-history-gray {
  background-color: #bfbfbf;
  opacity: 0.9;
}

.bg-history-green {
  background-color: #52c41a;
  cursor: pointer;
}

.bg-history-gray {
  background-color: #bfbfbf;
}

.custom-navbar {
  background: #ffffff;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 1040;
  display: flex;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 1px 0 rgba(5, 5, 5, 0.08);
  /* Forces its own GPU compositing layer - without this, iOS Safari can
     momentarily un-render fixed elements during momentum scrolling. */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.menu-trigger {
  background: none;
  border: none;
  color: var(--tblr-text);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.custom-navbar .text-white {
  color: var(--tblr-text) !important;
}

.custom-navbar .text-muted {
  color: var(--tblr-text-muted) !important;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.25);
  z-index: 1045;
  display: none;
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  /* iOS Safari's URL bar can make 100vh taller than the visible area; 100dvh
     tracks the real visible height so the nav fits the on-screen space. */
  height: 100dvh;
  background: #f0f2f5;
  z-index: 1050;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: clamp(8px, 1.6vh, 16px) 12px 50px; /* 50px bottom padding: the Sign Out button always clears the bottom edge */
  color: var(--tblr-text);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.app-sidebar.active {
  left: 0;
}

.sidebar-overlay.active {
  display: block;
}

.sidebar-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: clamp(0.98rem, 2vh, 1.2rem);
  font-weight: bold;
  color: var(--tblr-text);
  margin-bottom: clamp(6px, 1.2vh, 14px);
  border-bottom: 1px solid var(--tblr-border-color);
  padding-bottom: clamp(5px, 1.2vh, 12px);
}

/* Fuelometry emblem logo at the left of the sidebar brand bar, beside the
   "Fuelometry Navigation" title (templates/base.html). 40px tall; streamed by
   the public /media/Fuelometry_Logo.svg route. */
.sidebar-brand-logo {
  flex: 0 0 auto;
  height: 40px;
  width: auto;
  display: block;
}

/* Retract control at the right of the "Fuelometry Navigation" brand bar: the Tabler
   arrow-left-to-arc icon (templates/base.html) closes the sidebar via the same
   toggleSidebar() the hamburger "Menu" button uses. */
.sidebar-brand-collapse {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.sidebar-brand-collapse:hover,
.sidebar-brand-collapse:focus-visible {
  color: var(--tblr-primary);
}

/* The links flex column fills whatever vertical space remains after the
   brand/top padding, so `justify-content: space-between` turns every extra
   pixel into visible spacing *between* the options.  Combined with the
   sidebar's 50px bottom padding this makes the last option -- the "Sign
   Out <username>" button, injected by templates/base.html as this flex
   column's final child -- always sit 50px above the bottom edge of the
   visible area. */
.sidebar-links {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2px;
  overflow-y: auto; /* fallback only for extremely short viewports */
  overscroll-behavior: contain;
}

.sidebar-link {
  display: block;
  flex: 0 0 auto;
  color: var(--tblr-text-muted);
  padding: clamp(3px, 0.5vh, 6px) clamp(10px, 1.2vw, 14px);
  text-decoration: none;
  border-radius: 10px;
  line-height: 1.15;
  font-size: clamp(0.8rem, 1.5vh, 1rem);
  font-weight: 500;
}

.sidebar-link:hover,
.sidebar-link.active {
  background-color: #e6f4ff;
  color: var(--tblr-primary);
}

/* "Sign Out <username>" button, moved out of the top header bar and into the
   sidebar (templates/base.html) as the nav's final option. It reuses
   .sidebar-link for the menu look and only resets the native button chrome so
   it fills the sidebar width and lines up with the hyperlinks. */
.sidebar-logout-form {
  flex: 0 0 auto;
  margin: 0;
}

.sidebar-logout-button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

/* Focus-car picker, moved out of the top header bar and into the sidebar
   (templates/base.html) so it sits with the nav, directly above the Fuel
   Records link. A direct flex child of .sidebar-links so `space-between`
   never stretches it; the select fills the sidebar width to line up with
   the hyperlinks. */
.sidebar-focus-car-form {
  flex: 0 0 auto;
  padding: 0 clamp(10px, 1.2vw, 14px);
  margin-bottom: clamp(4px, 0.8vh, 10px);
}

.sidebar-focus-car-form .form-select {
  width: 100%;
}

@media (max-height: 760px) {
  .app-sidebar {
    padding: 6px 10px 50px;
  }

  .sidebar-link {
    border-radius: 8px;
    line-height: 1.12;
    padding: clamp(2px, 0.35vh, 5px) 10px;
    font-size: clamp(0.75rem, 1.45vh, 0.88rem);
  }

  .sidebar-brand {
    margin-bottom: 6px;
    padding-bottom: 4px;
  }
}

@media (max-height: 600px) {
  .sidebar-links {
    gap: 2px;
  }

  .sidebar-link {
    padding: 2px 9px;
    font-size: 0.76rem;
    line-height: 1.1;
  }

  .sidebar-brand {
    margin-bottom: 5px;
    padding-bottom: 3px;
    font-size: 0.95rem;
  }
}

/* Short viewports (phones held in landscape): compact the link fonts/padding
   so the whole menu still fits with the 50px bottom padding, while the flex
   `space-between` keeps whatever leftover room exists as spacing between the
   hyperlinks. The vertical padding is zeroed here (not 1px) because the menu
   now holds 20 items -- with 1px top/bottom per link the list overflowed a
   375px-tall screen by ~16px, which pushed the last option ("Sign Out") below
   its required 50px clearance. */
@media (max-height: 460px) {
  .app-sidebar {
    padding: 4px 8px 50px;
  }

  .sidebar-links {
    gap: 2px;
  }

  .sidebar-link {
    padding: 0 7px;
    font-size: 0.7rem;
    line-height: 1.05;
    border-radius: 6px;
  }

  .sidebar-brand {
    margin-bottom: 4px;
    padding-bottom: 2px;
    font-size: 0.9rem;
  }
}

@media (max-height: 360px) {
  .app-sidebar {
    padding: 2px 6px 50px;
  }

  .sidebar-links {
    gap: 1px;
  }

  .sidebar-link {
    padding: 0 6px;
    font-size: 0.64rem;
    line-height: 1.05;
  }

  .sidebar-brand {
    margin-bottom: 3px;
    padding-bottom: 2px;
    font-size: 0.85rem;
  }
}

.form-control,
.form-select {
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  box-shadow: none;
  background-color: #fff;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--tblr-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--tblr-primary-rgb), 0.16);
}

.btn {
  border-radius: 999px;
  padding: 0.6rem 1rem;
}

.btn-primary {
  background-color: var(--tblr-primary);
  border-color: var(--tblr-primary);
  color: #fff;
  box-shadow: 0 2px 0 rgba(5, 145, 255, 0.1);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #0958d9;
  border-color: #0958d9;
  color: #fff;
}

.btn-warning {
  background-color: #faad14;
  border-color: #faad14;
  color: rgba(0, 0, 0, 0.88);
  box-shadow: 0 2px 0 rgba(250, 173, 20, 0.1);
}

.btn-warning:hover,
.btn-warning:focus {
  background-color: #d48806;
  border-color: #d48806;
  color: #fff;
}

.btn-secondary {
  box-shadow: none;
  background-color: #fff;
  border-color: #d9d9d9;
  color: var(--tblr-text);
}

.btn-outline-warning {
  color: #d48806;
  border-color: #d48806;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus {
  background-color: #d48806;
  border-color: #d48806;
  color: #fff;
}

.btn-outline-danger {
  color: #cf1322;
  border-color: #cf1322;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  background-color: #cf1322;
  border-color: #cf1322;
  color: #fff;
}

.modal-content {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
}

.card-header.bg-dark,
.modal-header.bg-dark,
.card-header.bg-primary,
.modal-header.bg-primary {
  background-color: #fafafa !important;
  color: var(--tblr-text) !important;
  border-bottom: 1px solid #f0f0f0;
}

.card-header.bg-warning,
.modal-header.bg-warning {
  background-color: #fffbe6 !important;
  color: #ad6800 !important;
  border-bottom: 1px solid #ffe58f;
}

.table-light,
.table-light > th,
.table-light > td {
  background-color: #fafafa !important;
  color: var(--tblr-text) !important;
}

.text-primary {
  color: #1677ff !important;
}

.text-muted {
  color: var(--tblr-text-muted) !important;
}

#historyViewModal .history-meta-wrap {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

#reasonModal [data-testid="reason-progress-wrap"] {
  background: #fff8e1;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
}

#historyViewModal .history-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: #f0f0f0;
  border: 1px solid #d9d9d9;
  color: var(--tblr-text);
  max-width: 100%;
}

#historyViewModal .history-meta-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--tblr-text-muted);
  font-weight: 700;
}

#historyViewModal .history-meta-value {
  font-size: 0.73rem;
  line-height: 1.1;
  font-weight: 600;
  overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
  #historyViewModal .history-meta-badge {
    width: 100%;
    justify-content: space-between;
  }
}

/* Field history indicators style - BEGIN */

/* Cell layout helper to stack value and dots vertically */
.history-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  position: relative;
  width: 100%;
  min-height: 52px;
  padding-bottom: 10px;
}

.history-cell.history-align-left {
  --history-bar-left: 0;
  --history-bar-transform: none;
  --history-bar-justify: flex-start;
}

.history-cell.history-align-center {
  --history-bar-left: 50%;
  --history-bar-transform: translateX(-50%);
  --history-bar-justify: center;
}

/* Dots alignment container */
.history-bars-indicator {
  display: flex;
  justify-content: var(--history-bar-justify, center);
  align-items: center;
  gap: 5px;
  position: absolute;
  left: var(--history-bar-left, 50%);
  bottom: 0;
  transform: var(--history-bar-transform, translateX(-50%));
  min-height: 18px;
  --history-bar-height: 9px;
  cursor: pointer;
  padding: 0 6px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.history-bars-indicator::after {
  content: attr(data-change-count);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--history-bar-height) * 1.15);
  line-height: 1;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.72);
  pointer-events: none;
  z-index: 2;
}

.history-bars-indicator:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.history-bars-inline {
  display: inline-flex;
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  margin-left: 4px;
  min-height: var(--history-bar-height);
  flex: 0 0 auto;
  vertical-align: middle;
}

.history-bars-static {
  cursor: default;
}

.history-bars-static:hover {
  background-color: transparent;
}

/* Tank-fill gauge icon (Fuel Records listing + Report, "Full Fill" rows only) */
.tank-fill-gauge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  vertical-align: middle;
  white-space: nowrap;
}

.tank-fill-gauge-icon {
  flex: 0 0 auto;
  color: var(--tblr-body-color, #182433);
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.tank-fill-gauge-label {
  font-size: 0.85em;
  color: var(--tblr-secondary, #626976);
}

/* Data-integrity warning gauge (Fuel Records listing + Report, ID column) */
.integrity-warning-gauge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  vertical-align: middle;
}

.integrity-warning-gauge-bar {
  position: relative;
  display: block;
  width: 42px;
  height: 7px;
  border-radius: 4px;
  background: linear-gradient(to right, #2fb344, #a9d92d, #f1c40f, #f76707, #d63939);
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.integrity-warning-gauge-pointer {
  position: absolute;
  top: -3px;
  left: 0;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--tblr-body-color, #182433);
  transform: translateX(-50%);
}

.integrity-warning-gauge-badge {
  font-size: 9px;
  padding: 0.15em 0.4em;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

/* Non-zero warning counts get a larger badge so the number stays readable. */
.integrity-warning-gauge-badge-warning {
  font-size: 14px;
}

/* Base structural style for all bars */
.history-bar {
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
}

/* 1 change = bar_one */
.bar_zero {
  position: relative;
}

.bar_zero .history-bar {
  display: none;
}

.bar_zero::before {
  content: "";
  width: 23px;
  height: var(--history-bar-height);
  border-radius: 999px;
  background-color: #d9dee2;
}

/* 1 change = bar_one */
.bar_one {
  position: relative;
}

.bar_one .history-bar {
  display: none;
}

.bar_one::before {
  content: "";
  width: 23px;
  height: var(--history-bar-height);
  border-radius: 999px;
  background-color: #c7d7e3;
}

/* 2 changes = bar_two */
.bar_two {
  position: relative;
}

.bar_two .history-bar {
  display: none;
}

.bar_two::before {
  content: "";
  width: 32.3px;
  height: var(--history-bar-height);
  border-radius: 999px;
  background: linear-gradient(90deg, #c7d7e3 0%, #a5bdc4 50%, #818380 100%);
}

/* 3+ changes = bar_threeplus */
.bar_threeplus {
  position: relative;
}

.bar_threeplus .history-bar {
  display: none;
}

.bar_threeplus::before {
  content: "";
  width: 44px;
  height: var(--history-bar-height);
  border-radius: 999px;
  background: linear-gradient(90deg, #b3c2cc 0%, #a3bbc2 45%, #6a5d73 100%);
}

/* Field history indicators style - END */

/* Searchable lookup dropdowns */
.lookup-select-group {
  flex-wrap: nowrap;
  align-items: stretch;
}

.lookup-select-group > .select2-container {
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
  max-width: calc(100% - 2.7rem);
}

.lookup-select-group > .form-select {
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 2.7rem);
}

.lookup-select-group > .btn[data-add-lookup-option] {
  flex: 0 0 auto;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 0;
  font-weight: 700;
  min-width: 2.7rem;
}

/* Who Dispensed has an extra "use last dispenser" button before the
   "+" add-option button, so it needs twice the reserved button width. */
.lookup-select-group--dual-action > .select2-container,
.lookup-select-group--dual-action > .form-select {
  max-width: calc(100% - 5.4rem);
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  min-height: 42px;
}

.select2-container--default .select2-selection--single {
  padding: 0.45rem 0.75rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1.4;
  padding-left: 0;
  color: var(--tblr-text);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
}

.select2-container--default .select2-selection--multiple {
  padding: 0.2rem 0.45rem;
}

.select2-dropdown {
  border-color: #d9d9d9;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(5, 5, 5, 0.12);
}

.select2-search--dropdown .select2-search__field {
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
}

.dual-list-container .form-select[multiple] {
  min-height: 220px;
}

.dual-list-container .dual-list-grid .btn {
  min-width: 64px;
}

.field-char-counter {
  margin-top: 0.25rem;
  line-height: 1.1;
}

#reasonModal .modal-body {
  max-height: min(60vh, 480px);
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
}

#reasonModal .modal-body::-webkit-scrollbar {
  width: 14px;
}

#reasonModal .modal-body::-webkit-scrollbar-track {
  background: #f1f3f5;
}

#reasonModal .modal-body::-webkit-scrollbar-thumb {
  background-color: #adb5bd;
  border-radius: 10px;
  border: 3px solid #f1f3f5;
}

/* Deleted Records collapse toggle: Bootstrap flips the trigger button's
   aria-expanded attribute automatically on show/hide -- no JS needed here,
   just show whichever chevron icon matches the current state. */
.deleted-records-toggle-icon {
  margin-right: 0.35em;
}

[data-testid="deleted-records-toggle"][aria-expanded="false"] .deleted-records-toggle-icon--expanded {
  display: none;
}

[data-testid="deleted-records-toggle"][aria-expanded="true"] .deleted-records-toggle-icon--collapsed {
  display: none;
}

[data-testid="infrequently-used-fields-toggle"][aria-expanded="false"] .deleted-records-toggle-icon--expanded {
  display: none;
}

[data-testid="infrequently-used-fields-toggle"][aria-expanded="true"] .deleted-records-toggle-icon--collapsed {
  display: none;
}


