/*
  Settlement Hub - Bootstrap theme
  Palette and typography adapted from the THD Ops Hub design system.
*/

/* ============================================================
   Theme tokens
   ============================================================ */
:root {
  --ops-red: #cc0000;
  --ops-red-dark: #8b0000;
  --ops-gold: #f5a800;
  --ops-gold-soft: #fff3d6;
  --ops-ink: #1a1a1a;
  --ops-muted: #6c757d;
  --ops-border: #dfdfdf;
  --ops-surface: #ffffff;
  --ops-bg-top: #ececec;
  --ops-bg-bottom: #dddddd;
  --ops-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
  --ops-shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.12);
  --ops-radius: 1.15rem;
  --ops-radius-sm: 0.9rem;

  /* Bootstrap overrides */
  --bs-primary: var(--ops-red);
  --bs-primary-rgb: 204, 0, 0;
  --bs-secondary: var(--ops-ink);
  --bs-secondary-rgb: 26, 26, 26;
  --bs-warning: var(--ops-gold);
  --bs-warning-rgb: 245, 168, 0;
  --bs-danger: var(--ops-red);
  --bs-danger-rgb: 204, 0, 0;
  --bs-dark: var(--ops-ink);
  --bs-dark-rgb: 26, 26, 26;
  --bs-body-color: var(--ops-ink);
  --bs-body-color-rgb: 26, 26, 26;
  --bs-body-bg: #e6e6e6;
  --bs-body-bg-rgb: 230, 230, 230;
  --bs-border-color: var(--ops-border);
  --bs-link-color: var(--ops-red);
  --bs-link-hover-color: var(--ops-red-dark);
  --bs-card-bg: #ffffff;
  --bs-card-border-radius: var(--ops-radius);
  --bs-card-border-color: rgba(0, 0, 0, 0.08);
  --bs-card-cap-bg: #ffffff;
  --bs-secondary-bg: #ffffff;
  --bs-tertiary-bg: #f8f9fa;
  --bs-btn-border-radius: 0.85rem;
  --bs-btn-font-weight: 700;
  --bs-btn-padding-y: 0.7rem;
  --bs-btn-padding-x: 1rem;
  --bs-form-control-border-radius: 0.85rem;
  --bs-form-select-border-radius: 0.85rem;
  --bs-form-control-bg: #ffffff;
  --bs-form-control-disabled-bg: #f8f9fa;
  --bs-form-select-bg: #ffffff;
  --bs-modal-bg: #ffffff;
  --bs-modal-border-radius: 1rem;
  --bs-modal-header-border-color: rgba(0, 0, 0, 0.08);
  --bs-modal-footer-border-color: rgba(0, 0, 0, 0.08);
  --bs-focus-ring-color: rgba(204, 0, 0, 0.16);
}

/* ============================================================
   Base
   ============================================================ */
html,
body {
  min-height: 100%;
}

body {
  font-family: "Barlow", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(245, 168, 0, 0.08), transparent 28%),
    linear-gradient(180deg, var(--ops-bg-top) 0%, var(--ops-bg-bottom) 100%);
}

h1, h2, h3, h4, h5, h6,
.font-condensed {
  font-family: "Barlow Condensed", sans-serif;
}

/* ============================================================
   Bootstrap polish
   ============================================================ */
.card {
  background-color: #ffffff;
}

.btn {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-primary {
  background: linear-gradient(90deg, var(--ops-red-dark), var(--ops-red));
  border-color: var(--ops-red-dark);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: linear-gradient(90deg, #760000, #b40000);
  border-color: #760000;
}

.btn-warning,
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
  background-color: var(--ops-gold);
  border-color: #b87d00;
  color: var(--ops-ink);
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
  background-color: #e09a00;
  border-color: #9d6b00;
  color: var(--ops-ink);
}

.btn-outline-warning {
  border-color: #b87d00;
  color: #5f4000;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus,
.btn-outline-warning:active {
  background-color: var(--ops-gold);
  border-color: #9d6b00;
  color: var(--ops-ink);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
  color: var(--ops-ink);
}

.form-control,
.form-select {
  min-height: 48px;
  background-color: #fff;
}

.form-control[readonly],
.form-control:disabled,
.form-select:disabled {
  background-color: #f8f9fa;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: rgba(204, 0, 0, 0.4);
  box-shadow: 0 0 0 0.25rem rgba(204, 0, 0, 0.12);
}

.table {
  --bs-table-bg: transparent;
}

.table thead th {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--ops-muted);
}

.modal-content {
  border: 0;
  box-shadow: var(--ops-shadow);
  --bs-body-bg: #ffffff;
  --bs-secondary-bg: #f8f9fa;
  --bs-tertiary-bg: #f1f3f5;
}

.modal-content .form-select option {
  background-color: #ffffff;
}

.modal {
  z-index: 2000;
}

.modal-backdrop {
  z-index: 1990;
}

.site-message-icon {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 1.35rem;
  height: 2.75rem;
  justify-content: center;
  width: 2.75rem;
}

.site-message-text {
  font-size: 1rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.site-message-danger .site-message-icon {
  background-color: rgba(204, 0, 0, 0.1);
  color: var(--ops-red);
}

.site-message-warning .site-message-icon {
  background-color: var(--ops-gold-soft);
  color: #8a5d00;
}

.site-message-success .site-message-icon {
  background-color: rgba(25, 135, 84, 0.1);
  color: #198754;
}

.site-message-info .site-message-icon {
  background-color: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
}

.ops-alert-stale-week {
  background-color: #f1ecff;
  border-color: #7c5cc4;
  border-left: 0.35rem solid #5a3ea6;
  color: #271a52;
}

.ops-alert-stale-week i {
  color: #5a3ea6;
}

.ops-alert-stale-week a {
  color: #4c2f94;
}

.swal2-container {
  z-index: 2100 !important;
}

.site-loading-overlay {
  align-items: center;
  background: rgba(20, 20, 20, 0.55);
  display: none;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 2500;
}

.site-loading-overlay.is-visible {
  display: flex;
}

.site-loading-panel {
  align-items: center;
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: var(--ops-shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 2.5rem;
}

.site-loading-message {
  color: #212529;
  font-weight: 600;
}

.badge {
  letter-spacing: 0.02em;
}

/* Request status - colored bold text, no badge/background */
.ops-status-approved { color: #0d6832; font-weight: 700; font-size: 0.82rem; }
.ops-status-pending  { color: #92570a; font-weight: 700; font-size: 0.82rem; }
.ops-status-rejected { color: #b91c1c; font-weight: 700; font-size: 0.82rem; }

/* ============================================================
   Navbar
   ============================================================ */
.ops-topbar {
  background: linear-gradient(90deg, var(--ops-red-dark), var(--ops-red));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  position: sticky;
  top: 46px;
  z-index: 1030;
}

.ops-topbar-public {
  top: 0;
}

.ops-brand {
  color: #fff;
  text-decoration: none;
}

.ops-brand:hover {
  color: #fff;
}

.ops-brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ops-gold);
  color: var(--ops-ink);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.ops-brand-title {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ops-brand-subtitle {
  display: block;
  font-size: 0.72rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.7);
}

.ops-topbar-tools {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ops-topbar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ops-context-bar {
  position: sticky;
  top: 0;
  z-index: 1040;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
}

/* Sticky tab bar (e.g. settlement.cfm's Employees/Contractor Vehicle tabs) -
   stacks below .ops-context-bar/.ops-topbar. `top` is set inline by JS
   (positionStickyTabBar in settlement.cfm) since the height of those two
   bars above it isn't fixed (wraps on mobile, collapsible nav menu). */
.ops-sticky-tabs {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: #ffffff;
  padding-top: 0.25rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.ops-context-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  min-width: 0;
}

.ops-context-summary {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}

.ops-context-label {
  color: var(--ops-red);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ops-context-current {
  color: var(--ops-ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.ops-upload-status {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-left: auto;
  min-width: 0;
  max-width: 100%;
}

.ops-upload-light {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 1 auto;
  max-width: 100%;
  min-height: 28px;
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  background: #f2f3f5;
  color: #646b74;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.ops-upload-light span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

a.ops-upload-light {
  text-decoration: none;
}

a.ops-upload-light:hover,
a.ops-upload-light:focus {
  filter: brightness(0.96);
}

.ops-upload-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: #adb5bd;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
  flex: 0 0 auto;
}

.ops-upload-light.is-ready {
  border-color: rgba(13, 104, 50, 0.32);
  background: #e8f7ef;
  color: #0d6832;
}

.ops-upload-light.is-ready .ops-upload-dot {
  background: #16a34a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.46),
    0 0 0 3px rgba(22, 163, 74, 0.14);
}

.ops-upload-light.is-warning {
  border-color: rgba(133, 100, 4, 0.35);
  background: #fff3cd;
  color: #7a5b00;
}

.ops-upload-light.is-warning .ops-upload-dot {
  background: #f0ad4e;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.46),
    0 0 0 3px rgba(240, 173, 78, 0.18);
}

.ops-context-controls {
  display: flex;
  flex: 0 1 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
}

.ops-context-field {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ops-context-field label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--ops-muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ops-context-controls .form-select,
.ops-context-controls .form-control {
  width: auto;
  min-height: 32px;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-size: 0.82rem;
}

.ops-context-controls .form-select {
  min-width: 9.5rem;
  max-width: 18rem;
}

.ops-context-controls input[type="date"] {
  min-width: 9.2rem;
}

/* ============================================================
   Cards & panels
   ============================================================ */
.dashboard-card,
.auth-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-top: 5px solid var(--ops-red);
  border-radius: var(--ops-radius);
  box-shadow: var(--ops-shadow);
  overflow: hidden;
}

.ops-stat-card {
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--ops-radius-sm);
  background: #ffffff;
  box-shadow: var(--ops-shadow-soft);
}

.ops-stat-label {
  color: var(--ops-red);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-panel {
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--ops-radius-sm);
  background: #ffffff;
  box-shadow: var(--ops-shadow-soft);
}

.ops-panel-title {
  color: var(--ops-red);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-pay-line-offcanvas {
  --bs-offcanvas-width: min(860px, 100vw);
}

.ops-pay-line-offcanvas .offcanvas-header {
  flex-shrink: 0;
}

.ops-pay-line-body {
  min-height: 0;
  overflow: hidden;
}

.ops-pay-line-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.ops-pay-line-summary > div {
  background: #ffffff;
  padding: 0.7rem 1rem;
}

.ops-pay-line-summary span {
  display: block;
  color: var(--ops-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
}

.ops-pay-line-summary strong {
  display: block;
  color: var(--ops-ink);
  font-size: 1rem;
  line-height: 1.25;
}

.ops-pay-line-scroll {
  max-height: calc(100vh - 238px);
  overflow: auto;
}

.ops-pay-line-table {
  font-size: 0.9rem;
}

.ops-pay-line-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8f9fa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
}

.ops-pay-line-table td,
.ops-pay-line-table th {
  padding: 0.55rem 0.75rem;
}

.ops-pay-line-table .badge {
  margin-top: 0.2rem;
}

.ops-pay-line-amount-cell .input-group {
  max-width: 150px;
}

.ops-pay-line-amount-cell .input-group.ops-pay-line-stepper {
  max-width: 200px;
}

.ops-pay-line-amount-cell .form-control {
  min-width: 88px;
  text-align: right;
}

.ops-pay-line-stepper .btn {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.ops-pay-line-table .js-rate {
  white-space: nowrap;
}

.ops-pay-line-footer {
  flex-shrink: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.75rem 1rem;
  background: #ffffff;
}

@media (max-width: 575.98px) {
  .ops-pay-line-summary {
    grid-template-columns: 1fr;
  }

  .ops-pay-line-scroll {
    max-height: calc(100vh - 310px);
  }

  .ops-pay-line-table td,
  .ops-pay-line-table th {
    padding: 0.5rem;
  }

  .ops-pay-line-amount-cell .input-group {
    max-width: 128px;
  }

  .ops-pay-line-amount-cell .input-group.ops-pay-line-stepper {
    max-width: 168px;
  }

  .ops-pay-line-stepper .btn {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
}

.ops-home-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ops-home-context-value {
  color: var(--ops-ink);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.ops-overview-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--ops-radius-sm);
  background: #f8f9fa;
}

.ops-overview-count,
.ops-overview-label {
  display: block;
}

.ops-overview-count {
  color: var(--ops-ink);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
}

.ops-overview-label {
  margin-top: 0.25rem;
  color: var(--ops-muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-dropzone {
  display: flex;
  min-height: 18rem;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  border: 2px dashed rgba(204, 0, 0, 0.28);
  border-radius: var(--ops-radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.96));
  text-align: center;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ops-dropzone:hover,
.ops-dropzone.is-dragging,
.ops-dropzone.has-file {
  border-color: var(--ops-red);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.ops-dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.ops-dropzone-icon {
  display: inline-flex;
  width: 4.5rem;
  height: 4.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ops-gold);
  color: var(--ops-ink);
  font-size: 2rem;
}

.ops-dropzone-title {
  color: var(--ops-ink);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.ops-dropzone-copy,
.ops-dropzone-file {
  color: var(--ops-muted);
}

.ops-dropzone-file {
  max-width: min(38rem, 100%);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #f1f3f5;
  font-size: 0.88rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ops-upload-detect-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ops-upload-busy {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(4px);
}

.ops-upload-busy.is-visible {
  display: flex;
}

.ops-upload-busy-inner {
  width: min(24rem, calc(100% - 2rem));
  padding: 2rem;
  border-radius: var(--ops-radius-sm);
  background: #ffffff;
  box-shadow: var(--ops-shadow);
  text-align: center;
}

.ops-cim-tabs {
  gap: 0.25rem;
}

.ops-config-tabs {
  gap: 0.25rem;
}

.ops-config-tabs .nav-link {
  color: var(--ops-ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ops-config-tabs .nav-link.active {
  color: var(--ops-red);
}

.ops-config-tabs-wrap {
  position: relative;
}

.ops-config-mobile-picker {
  display: none;
}

.ops-cim-tabs .nav-link {
  color: var(--ops-ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ops-cim-tabs .nav-link.active {
  color: var(--ops-red);
}

.ops-cim-table-meta {
  color: var(--ops-muted);
  font-weight: 700;
}

.ops-cim-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 0.8rem 0 0.6rem;
}

.ops-cim-search {
  position: relative;
  width: min(24rem, 100%);
}

.ops-cim-search i {
  position: absolute;
  top: 50%;
  left: 0.8rem;
  color: var(--ops-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.ops-cim-search .form-control {
  min-height: 38px;
  padding-left: 2.2rem;
}

.ops-cim-table-wrap {
  max-height: 68vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--ops-radius-sm);
}

.ops-cim-detail-table {
  min-width: 80rem;
  margin-bottom: 0;
  font-size: 0.78rem;
}

.ops-cim-detail-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #ffffff;
  white-space: nowrap;
}

.ops-cim-detail-table td {
  max-width: 18rem;
  white-space: nowrap;
}

.ops-settlement-desktop-table td,
.ops-settlement-desktop-table th {
  white-space: nowrap;
}

/*
  Bounded scrollable box, same treatment as .ops-cim-table-wrap - without
  this, a long driver list pushes the wrap's own horizontal scrollbar (from
  .table-responsive) down past the bottom of the viewport, so reaching it
  means scrolling past every row first, then scrolling back up to see the
  first driver's info at the new horizontal offset. Bounding the height
  keeps the scrollbar reachable near the table itself; the sticky header
  below keeps column labels visible while scrolling rows inside that box.
*/
.ops-settlement-table-wrap {
  max-height: 68vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.ops-settlement-desktop-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #ffffff;
}

/*
  Frozen first column (Driver name) - stays put while scrolling right, same
  idea as the sticky header above but on the other axis. Needs its own
  opaque background (tables here are transparent by default, see .table's
  --bs-table-bg override) since a sticky cell paints over whatever it's
  scrolling past, not just its own row. The two striping overrides below
  match the two ways this file's views tint a row - default.cfm/
  640_dallas_employees.cfm add .bg-body-tertiary to alternating <tr>s
  directly, while 640_dallas_contractor.cfm uses Bootstrap's table-striped
  class - so the frozen cell's tint always agrees with the rest of its row
  instead of showing a plain white seam down the left edge.
*/
/*
  min-width/max-width on a <td> is not reliably honored by the browser's
  table-layout:auto column-sizing algorithm, especially combined with
  position:sticky - the column's reserved layout width and the sticky
  cell's painted width can disagree, which is what was letting this cell's
  content spill rightward and paint over the Home Market column. A fixed
  wrapping Driver column keeps names inside their box, while a separate
  sticky Actions column keeps row edits reachable.
*/
.ops-settlement-desktop-table tbody tr:not(.js-line-items-row) > td:first-child,
.ops-settlement-desktop-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 16rem;
  min-width: 16rem;
  max-width: 16rem;
  overflow: hidden;
  --bs-table-bg: #ffffff;
  --bs-table-accent-bg: #ffffff;
  --bs-table-striped-bg: #ffffff;
  background-color: #ffffff !important;
  background-image: none !important;
  box-shadow:
    inset 0 0 0 9999px #ffffff,
    2px 0 4px -2px rgba(0, 0, 0, 0.2);
}

.ops-settlement-desktop-table tbody tr:not(.js-line-items-row) > td:first-child {
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.ops-settlement-desktop-table thead th:first-child {
  left: 0;
  z-index: 6;
  white-space: nowrap;
}

.ops-settlement-action-col {
  text-align: center;
  width: 4.25rem;
  min-width: 4.25rem;
  max-width: 4.25rem;
}

.ops-settlement-desktop-table tbody tr:not(.js-line-items-row) > .ops-settlement-action-col,
.ops-settlement-desktop-table thead .ops-settlement-action-col {
  position: sticky;
  left: 16rem;
  z-index: 4;
  overflow: hidden;
  --bs-table-bg: #ffffff;
  --bs-table-accent-bg: #ffffff;
  --bs-table-striped-bg: #ffffff;
  background-color: #ffffff !important;
  background-image: none !important;
  box-shadow:
    inset 0 0 0 9999px #ffffff,
    2px 0 4px -2px rgba(0, 0, 0, 0.2);
}

.ops-settlement-desktop-table tbody tr:not(.js-line-items-row) > .ops-settlement-action-col .btn {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.ops-settlement-desktop-table thead .ops-settlement-action-col {
  z-index: 6;
  white-space: nowrap;
}

.ops-settlement-desktop-table tbody tr.bg-body-tertiary > td:first-child,
.ops-settlement-desktop-table tbody tr.bg-body-tertiary > .ops-settlement-action-col {
  --bs-table-bg: var(--bs-tertiary-bg, #f8f9fa);
  --bs-table-accent-bg: var(--bs-tertiary-bg, #f8f9fa);
  --bs-table-striped-bg: var(--bs-tertiary-bg, #f8f9fa);
  background-color: var(--bs-tertiary-bg, #f8f9fa) !important;
  box-shadow:
    inset 0 0 0 9999px var(--bs-tertiary-bg, #f8f9fa),
    2px 0 4px -2px rgba(0, 0, 0, 0.2);
}

.ops-settlement-desktop-table .table-striped > tbody > tr:nth-of-type(odd):not(.js-line-items-row) > td:first-child,
.ops-settlement-desktop-table .table-striped > tbody > tr:nth-of-type(odd):not(.js-line-items-row) > .ops-settlement-action-col {
  --bs-table-bg: var(--bs-table-striped-bg, rgba(0, 0, 0, 0.05));
  --bs-table-accent-bg: var(--bs-table-striped-bg, rgba(0, 0, 0, 0.05));
  background-color: var(--bs-table-striped-bg, rgba(0, 0, 0, 0.05)) !important;
  box-shadow:
    inset 0 0 0 9999px var(--bs-table-striped-bg, rgba(0, 0, 0, 0.05)),
    2px 0 4px -2px rgba(0, 0, 0, 0.2);
}

.ops-settlement-mobile-cards {
  display: none;
}

.ops-drivers-mobile-cards {
  display: none;
}

.ops-config-mobile-cards {
  display: none;
}

.ops-users-mobile-cards {
  display: none;
}

.ops-uploads-mobile-cards {
  display: none;
}

.ops-activity-mobile-cards {
  display: none;
}

.ops-home-mobile-cards {
  display: none;
}

.ops-driver-detail-mobile-cards {
  display: none;
}

.ops-history-mobile-wrap {
  display: none;
}

.ops-tools-mobile-cards {
  display: none;
}

.ops-tools-mobile-card,
.ops-tools-empty-card,
.ops-activity-mobile-card,
.ops-activity-empty-card,
.ops-home-mobile-card,
.ops-driver-detail-mobile-card,
.ops-history-mobile-card,
.ops-history-empty-card {
  display: none;
}

/* ============================================================
   Typography helpers
   ============================================================ */
.page-eyebrow,
.auth-eyebrow,
.section-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-eyebrow,
.auth-eyebrow {
  color: var(--ops-red);
}

.page-title,
.auth-title {
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

@keyframes market-wiggle {
  0% { transform: rotate(0deg); }
  20% { transform: rotate(-6deg); }
  40% { transform: rotate(5deg); }
  60% { transform: rotate(-3deg); }
  80% { transform: rotate(2deg); }
  100% { transform: rotate(0deg); }
}

.market-wiggle {
  display: inline-block;
  animation: market-wiggle 0.5s ease-in-out 1;
}

@media (prefers-reduced-motion: reduce) {
  .market-wiggle {
    animation: none;
  }
}

.page-copy,
.auth-copy {
  color: var(--ops-muted);
  font-size: 1rem;
}

.ops-form-label {
  color: var(--ops-red);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: var(--ops-gold-soft);
  border: 1px solid rgba(245, 168, 0, 0.35);
  color: var(--ops-ink);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ops-list-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ops-list-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.ops-link {
  font-weight: 600;
  text-decoration: none;
}

.ops-link:hover {
  text-decoration: underline;
}

.min-w-0 {
  min-width: 0;
}

/* ============================================================
   Auth layout
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 0;
  box-sizing: border-box;
  padding: clamp(1rem, 4vh, 2rem) 1rem 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 30rem;
}

.auth-card.wide {
  max-width: 36rem;
}

.auth-card-body {
  padding: 2rem;
}

.auth-links a {
  font-weight: 600;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.9rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--ops-muted);
  padding: 0;
}

/* ============================================================
   Flash messages
   ============================================================ */
#globalFlashContainer {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 1085;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  width: min(28rem, calc(100vw - 2rem));
  pointer-events: none;
}

#globalFlashContainer .alert {
  width: 100%;
  margin: 0;
  border: 0;
  box-shadow: var(--ops-shadow-soft);
  pointer-events: auto;
}

.flash-inner {
  display: inline-flex;
  flex-direction: column;
  width: 100%;
}

.flash-progress {
  margin-top: 0.35rem;
  height: 3px;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  overflow: hidden;
}

.flash-progress-bar {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background-color: rgba(0, 0, 0, 0.25);
  transition: width 0.1s linear;
}

.flash-fade {
  transition: opacity 0.35s ease, transform 0.35s ease;
  opacity: 0;
  transform: translateY(0.35rem);
}

/* ============================================================
   Responsive mobile tables (from THD)
   ============================================================ */
@media (max-width: 991.98px) {
  .ops-context-form {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .ops-cim-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
  }

  .ops-cim-tabs .nav-item {
    flex: 0 0 auto;
  }

  .ops-cim-tabs .nav-link {
    white-space: nowrap;
  }

  .ops-cim-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 0.65rem;
  }

  .ops-cim-toolbar .btn {
    align-self: flex-start;
  }

  .ops-cim-table-wrap {
    max-height: 62vh;
    overflow: auto !important;
  }

  .ops-upload-status {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .ops-settlement-desktop-table {
    display: none;
  }

  .ops-drivers-desktop-table {
    display: none;
  }

  .ops-config-desktop-table {
    display: none;
  }

  .ops-users-desktop-table {
    display: none;
  }

  .ops-uploads-desktop-table {
    display: none;
  }

  .ops-activity-desktop-table {
    display: none;
  }

  .ops-home-desktop-table {
    display: none;
  }

  .ops-driver-detail-desktop-table {
    display: none;
  }

  .ops-history-desktop-table {
    display: none;
  }

  .ops-driver-detail-mobile-hide {
    display: none;
  }

  .ops-tools-desktop-table {
    display: none;
  }

  .ops-config-mobile-picker {
    display: block;
  }

  .ops-config-tabs-wrap {
    display: none;
  }

  .ops-settlement-mobile-cards {
    display: grid;
    gap: 0.75rem;
  }

  .ops-drivers-mobile-cards {
    display: grid;
    gap: 0.75rem;
  }

  .ops-config-mobile-cards {
    display: grid;
    gap: 0.75rem;
  }

  .ops-users-mobile-cards {
    display: grid;
    gap: 0.75rem;
  }

  .ops-uploads-mobile-cards {
    display: grid;
    gap: 0.75rem;
  }

  .ops-activity-mobile-cards {
    display: grid;
    gap: 0.75rem;
  }

  .ops-home-mobile-cards {
    display: grid;
    gap: 0.75rem;
  }

  .ops-driver-detail-mobile-cards {
    display: grid;
    gap: 0.75rem;
  }

  .ops-history-mobile-wrap {
    display: block;
  }

  .ops-history-mobile-cards {
    display: grid;
    gap: 0.75rem;
  }

  .ops-tools-mobile-cards {
    display: grid;
    gap: 0.75rem;
  }

  .ops-tools-mobile-card,
  .ops-tools-empty-card,
  .ops-activity-mobile-card,
  .ops-activity-empty-card,
  .ops-home-mobile-card,
  .ops-driver-detail-mobile-card,
  .ops-history-mobile-card,
  .ops-history-empty-card {
    border: 1px solid rgba(27, 27, 27, 0.08);
    border-radius: var(--ops-radius-sm);
    background: #ffffff;
    box-shadow: 0 0.45rem 1rem rgba(17, 17, 17, 0.05);
  }

  .ops-tools-mobile-card,
  .ops-activity-mobile-card,
  .ops-home-mobile-card,
  .ops-driver-detail-mobile-card,
  .ops-history-mobile-card {
    display: grid;
    gap: 0.65rem;
    padding: 0.9rem;
  }

  .ops-tools-empty-card,
  .ops-activity-empty-card,
  .ops-history-empty-card {
    display: block;
    padding: 1rem;
    color: var(--ops-muted);
    text-align: center;
  }

  .ops-activity-empty-card.text-danger {
    color: var(--bs-danger) !important;
  }

  .ops-tools-mobile-title {
    color: var(--ops-red);
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .ops-tools-mobile-title a {
    color: inherit;
    text-decoration: none;
  }

  .ops-tools-mobile-title a:hover,
  .ops-tools-mobile-title a:focus {
    text-decoration: underline;
  }

  .ops-driver-detail-mobile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .ops-driver-detail-mobile-head .btn {
    flex: 0 0 auto;
  }

  .ops-driver-detail-mobile-title {
    color: var(--ops-red);
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .ops-history-mobile-head {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
  }

  .ops-activity-mobile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .ops-home-mobile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .ops-activity-mobile-head .badge,
  .ops-home-mobile-head .badge {
    flex: 0 0 auto;
  }

  .ops-history-mobile-title {
    color: var(--ops-red);
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .ops-history-mobile-time {
    color: var(--ops-muted);
    font-size: 0.78rem;
    font-weight: 800;
  }

  .ops-activity-mobile-title {
    color: var(--ops-red);
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .ops-home-mobile-title {
    color: var(--ops-red);
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .ops-activity-mobile-time {
    color: var(--ops-muted);
    font-size: 0.78rem;
    font-weight: 800;
  }

  .ops-home-mobile-meta {
    color: var(--ops-muted);
    font-size: 0.82rem;
    font-weight: 700;
  }

  .ops-home-mobile-alert {
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(220, 53, 69, 0.22);
    border-radius: var(--ops-radius-sm);
    background: rgba(220, 53, 69, 0.08);
    color: var(--bs-danger);
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.25;
  }

  .ops-tools-mobile-meta,
  .ops-tools-mobile-detail,
  .ops-driver-detail-mobile-meta,
  .ops-history-mobile-meta,
  .ops-history-mobile-detail {
    color: var(--ops-muted);
    font-size: 0.82rem;
    font-weight: 700;
    overflow-wrap: anywhere;
  }

  .ops-history-mobile-detail {
    color: var(--ops-ink);
    font-weight: 500;
    line-height: 1.35;
  }

  .ops-activity-mobile-detail {
    color: var(--ops-ink);
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .ops-tools-mobile-badges,
  .ops-driver-detail-mobile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .ops-tools-mobile-facts,
  .ops-activity-mobile-facts,
  .ops-home-mobile-facts,
  .ops-driver-detail-mobile-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .ops-tools-mobile-facts div,
  .ops-activity-mobile-facts div,
  .ops-home-mobile-facts div,
  .ops-driver-detail-mobile-facts div {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .ops-tools-mobile-facts span,
  .ops-activity-mobile-facts span,
  .ops-home-mobile-facts span,
  .ops-driver-detail-mobile-facts span {
    color: var(--ops-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .ops-tools-mobile-facts strong,
  .ops-activity-mobile-facts strong,
  .ops-home-mobile-facts strong,
  .ops-driver-detail-mobile-facts strong {
    font-size: 1rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .ops-settlement-mobile-card,
  .ops-settlement-empty-card,
  .ops-drivers-mobile-card,
  .ops-drivers-empty-card,
  .ops-config-mobile-card,
  .ops-config-empty-card,
  .ops-users-mobile-card,
  .ops-users-empty-card,
  .ops-uploads-mobile-card,
  .ops-uploads-empty-card {
    border: 1px solid rgba(27, 27, 27, 0.08);
    border-radius: var(--ops-radius-sm);
    background: #ffffff;
    box-shadow: 0 0.45rem 1rem rgba(17, 17, 17, 0.05);
  }

  .ops-settlement-mobile-card {
    display: grid;
    gap: 0.45rem;
    padding: 0.85rem;
  }

  .ops-drivers-mobile-card {
    display: grid;
    gap: 0.65rem;
    padding: 0.9rem;
  }

  .ops-config-mobile-card {
    display: grid;
    gap: 0.65rem;
    padding: 0.9rem;
  }

  .ops-users-mobile-card {
    display: grid;
    gap: 0.65rem;
    padding: 0.9rem;
  }

  .ops-uploads-mobile-card {
    display: grid;
    gap: 0.65rem;
    padding: 0.9rem;
  }

  .ops-settlement-empty-card,
  .ops-drivers-empty-card,
  .ops-config-empty-card,
  .ops-users-empty-card,
  .ops-uploads-empty-card {
    padding: 1rem;
    color: var(--ops-muted);
    text-align: center;
  }

  .ops-settlement-mobile-driver,
  .ops-drivers-mobile-driver {
    color: var(--ops-red);
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
  }

  .ops-config-mobile-title {
    color: var(--ops-ink);
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .ops-users-mobile-name {
    color: var(--ops-red);
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .ops-uploads-mobile-title {
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .ops-settlement-mobile-meta,
  .ops-drivers-mobile-meta,
  .ops-drivers-mobile-detail,
  .ops-config-mobile-meta,
  .ops-users-mobile-meta,
  .ops-uploads-mobile-meta,
  .ops-uploads-mobile-detail {
    color: var(--ops-muted);
    font-size: 0.82rem;
    font-weight: 700;
  }

  .ops-users-mobile-meta,
  .ops-uploads-mobile-meta,
  .ops-uploads-mobile-detail {
    overflow-wrap: anywhere;
  }

  .ops-users-mobile-badges,
  .ops-uploads-mobile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .ops-drivers-mobile-detail {
    overflow-wrap: anywhere;
  }

  .ops-config-mobile-actions {
    display: inline-flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
  }

  .ops-settlement-mobile-facts,
  .ops-drivers-mobile-facts,
  .ops-config-mobile-facts,
  .ops-users-mobile-facts,
  .ops-uploads-mobile-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .ops-settlement-mobile-facts div,
  .ops-drivers-mobile-facts div,
  .ops-config-mobile-facts div,
  .ops-users-mobile-facts div,
  .ops-uploads-mobile-facts div {
    display: grid;
    gap: 0.15rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    min-width: 0;
  }

  .ops-settlement-mobile-facts span,
  .ops-drivers-mobile-facts span,
  .ops-config-mobile-facts span,
  .ops-users-mobile-facts span,
  .ops-uploads-mobile-facts span {
    color: var(--ops-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .ops-settlement-mobile-facts strong,
  .ops-drivers-mobile-facts strong,
  .ops-config-mobile-facts strong,
  .ops-users-mobile-facts strong,
  .ops-uploads-mobile-facts strong {
    font-size: 1rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .table-responsive {
    overflow: visible;
  }

  .ops-mobile-table thead,
  .ops-mobile-table tr.ops-mobile-pair-row .ops-mobile-row-header {
    display: none;
  }

  .ops-mobile-table,
  .ops-mobile-table tbody,
  .ops-mobile-table tr,
  .ops-mobile-table td,
  .ops-mobile-table th {
    display: block;
    width: 100%;
  }

  .ops-mobile-table {
    border-collapse: separate;
    border-spacing: 0;
  }

  .ops-mobile-table tbody {
    display: grid;
    gap: 0.85rem;
  }

  .ops-mobile-table tbody tr {
    border: 1px solid rgba(27, 27, 27, 0.08);
    border-radius: 1rem;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 248, 248, 0.95));
    box-shadow: 0 0.6rem 1.5rem rgba(17, 17, 17, 0.06);
    overflow: hidden;
  }

  .ops-mobile-table tbody td {
    display: grid;
    grid-template-columns: minmax(92px, 112px) minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
    border: 0;
    padding: 0.45rem 0;
    text-align: left !important;
    white-space: normal !important;
  }

  .ops-mobile-table tbody td::before {
    content: attr(data-label);
    color: var(--ops-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .ops-mobile-table tbody td[data-label=""] {
    grid-template-columns: 1fr;
  }

  .ops-mobile-table tbody td[data-label=""]::before {
    display: none;
  }

  .ops-mobile-table tbody tr.ops-mobile-pair-row td {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .ops-mobile-table tbody tr.ops-mobile-pair-row td::before {
    display: block;
  }

  .ops-mobile-table tbody .badge,
  .ops-mobile-table tbody .btn,
  .ops-mobile-table tbody .progress {
    justify-self: start;
  }

  .ops-mobile-table tbody .form-select,
  .ops-mobile-table tbody .form-control,
  .ops-mobile-table tbody .btn {
    width: 100%;
    max-width: none !important;
  }

  .ops-mobile-table tbody .text-end {
    text-align: left !important;
  }
}

/* ============================================================
   Feedback Tracker
   ============================================================ */
.ops-feedback-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .3rem .7rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ops-feedback-pill-open      { background: #fff1f1; color: #9f1111; }
.ops-feedback-pill-in_review { background: #fff5dc; color: #8a6200; }
.ops-feedback-pill-resolved  { background: #e8f7ef; color: #18613a; }
.ops-feedback-pill-closed    { background: #eef1f5; color: #4b5563; }
.ops-feedback-body     { max-width: 420px; white-space: normal; }
.ops-feedback-response { max-width: 360px; white-space: normal; }
.ops-feedback-status   { min-height: 1.5rem; font-size: .88rem; }
#feedbackTableBody .js-feedback-row { cursor: pointer; }
#feedbackTableBody .js-feedback-row:focus {
  outline: 2px solid rgba(13, 110, 253, .35);
  outline-offset: -2px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991.98px) {
  .ops-topbar-actions {
    gap: 0.75rem;
  }

  .ops-topbar {
    top: 0;
  }

  .ops-topbar .navbar-collapse .ops-topbar-actions > .d-flex {
    width: 100%;
  }

  .ops-topbar .navbar-collapse .btn,
  .ops-topbar .navbar-collapse .dropdown {
    width: 100%;
  }

  .ops-topbar .navbar-collapse .dropdown-menu {
    position: static !important;
    width: 100%;
    min-width: 0;
    margin-top: 0.35rem;
    transform: none !important;
  }

  .ops-context-bar {
    position: static;
    border-bottom: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0.45rem 0.5rem 0;
  }

  .ops-context-bar .container-fluid {
    padding: 0 !important;
  }

  .ops-context-form {
    display: grid;
    gap: 0.65rem;
    padding: 0.7rem;
    border: 1px solid rgba(27, 27, 27, 0.08);
    border-radius: var(--ops-radius-sm);
    background: #ffffff;
    box-shadow: 0 0.45rem 1rem rgba(17, 17, 17, 0.08);
  }

  .ops-context-summary {
    display: none;
  }

  .ops-upload-status {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.35rem;
    margin-left: 0;
    order: 2;
  }

  .ops-upload-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 34px;
    padding: 0.28rem 0.25rem;
    border-radius: 0.6rem;
    font-size: 0.58rem;
    line-height: 1;
    min-width: 0;
    text-align: center;
  }

  .ops-upload-dot {
    width: 0.48rem;
    height: 0.48rem;
  }

  .ops-upload-light span:last-child {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ops-context-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(8.9rem, 0.75fr);
    gap: 0.55rem;
    order: 1;
  }

  .ops-context-field {
    align-items: stretch;
    display: grid;
    gap: 0.25rem;
    min-width: 0;
  }

  .ops-context-field label {
    font-size: 0.58rem;
    line-height: 1;
  }

  .ops-context-controls .form-select,
  .ops-context-controls .form-control {
    width: 100%;
    min-height: 36px;
    max-width: 100%;
    min-width: 0;
    font-size: 0.82rem;
  }

  .ops-upload-detect-grid {
    grid-template-columns: 1fr;
  }

  .ops-home-context {
    grid-template-columns: 1fr;
  }

  .ops-overview-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-home-context-value {
    font-size: 1.55rem;
  }
}

@media (max-width: 575.98px) {
  .ops-brand-title {
    font-size: 1.1rem;
  }

  .ops-brand-subtitle {
    font-size: 0.63rem;
  }

  .auth-card-body {
    padding: 1.5rem;
  }
}

@media (max-height: 680px) {
  .auth-wrap {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }

  .auth-card-body {
    padding: 1.35rem;
  }
}
