:root {
  /* Core brand colors (unchanged for brand recognition) */
  --c2r-blue: #36ace3;
  --c2r-red: #eb4141;
  --c2r-light-red: #ea6566;

  /* Refined palette */
  --c2r-titles-blue: #2a4670;
  --c2r-body-grey: #3d505a;
  --c2r-medium-blue: #3188c6;
  --c2r-dark-blue: #084473;
  --c2r-darkest-blue: #182a44;
  --c2r-navy: #0d1b2a;
  --c2r-light-blue-bg: #e8f4fd;
  --c2r-stroke-grey: #e2e8f0;
  --c2r-grey: #525257;

  /* New surface & effect tokens */
  --c2r-page-bg: #ffffff;
  --c2r-surface: #ffffff;
  --c2r-shadow-sm:
    0 1px 2px rgba(13, 27, 42, 0.08), 0 4px 12px rgba(13, 27, 42, 0.08);
  --c2r-shadow-md:
    0 4px 12px rgba(13, 27, 42, 0.1), 0 8px 20px rgba(13, 27, 42, 0.08);
  --c2r-shadow-lg:
    0 8px 24px rgba(13, 27, 42, 0.12), 0 16px 40px rgba(13, 27, 42, 0.1);
  --c2r-glow-blue: rgba(54, 172, 227, 0.12);

  /* Bootstrap semantic overrides */
  --bs-primary: var(--c2r-blue);
  --bs-primary-rgb: 54, 172, 227;
  --bs-primary-text-emphasis: var(--c2r-dark-blue);
  --bs-primary-bg-subtle: var(--c2r-light-blue-bg);
  --bs-primary-border-subtle: #a8ddf4;
  --bs-secondary: var(--c2r-grey);
  --bs-secondary-rgb: 130, 136, 140;
  --bs-secondary-text-emphasis: #475569;
  --bs-secondary-bg-subtle: #f1f5f9;
  --bs-secondary-border-subtle: #d5d9dc;
  --bs-danger: var(--c2r-red);
  --bs-danger-rgb: 235, 65, 65;
  --bs-danger-text-emphasis: #8b1a1a;
  --bs-danger-bg-subtle: #fde8e8;
  --bs-danger-border-subtle: #f5b0b0;
  --bs-focus-ring-color: rgba(54, 172, 227, 0.25);
  --bs-form-valid-border-color: var(--c2r-blue);
  --bs-form-invalid-color: var(--c2r-red);
  --bs-form-invalid-border-color: var(--c2r-red);

  /* Bootstrap component overrides */
  --bs-body-font-family: "Inter", sans-serif;
  --bs-body-font-size: 1rem;
  --bs-body-bg: var(--c2r-page-bg);
  --bs-body-color: var(--c2r-body-grey);
  --bs-border-color: var(--c2r-stroke-grey);
  --bs-link-color: var(--c2r-blue);
  --bs-link-color-rgb: 54, 172, 227;
  --bs-link-hover-color: var(--c2r-medium-blue);
  --bs-link-hover-color-rgb: 41, 148, 199;
  --bs-dark: var(--c2r-darkest-blue);
  --bs-dark-rgb: 24, 42, 68;
  --bs-heading-color: var(--c2r-titles-blue);
  --bs-card-border-color: transparent;
  --bs-card-cap-color: var(--c2r-titles-blue);
  --bs-nav-link-font-size: 16px;
}

/* ─────────────────────────────────────────────
   LAYOUT & BASE
   ───────────────────────────────────────────── */
html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: rgba(54, 172, 227, 0.2);
  color: var(--c2r-titles-blue);
}

/* ─────────────────────────────────────────────
   PAGINATION
   ───────────────────────────────────────────── */
.pagination {
  --bs-pagination-color: var(--c2r-blue);
  --bs-pagination-border-color: var(--c2r-stroke-grey);
  --bs-pagination-hover-color: var(--c2r-medium-blue);
  --bs-pagination-hover-bg: var(--c2r-light-blue-bg);
  --bs-pagination-hover-border-color: var(--c2r-stroke-grey);
  --bs-pagination-focus-color: var(--c2r-blue);
  --bs-pagination-focus-bg: var(--c2r-light-blue-bg);
  --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(54, 172, 227, 0.25);
  --bs-pagination-active-color: #fff;
  --bs-pagination-active-bg: var(--c2r-blue);
  --bs-pagination-active-border-color: var(--c2r-blue);
  --bs-pagination-disabled-color: var(--c2r-grey);
  --bs-pagination-disabled-border-color: var(--c2r-stroke-grey);
  font-weight: 500;
  font-size: 14px;
}

/* ─────────────────────────────────────────────
   TYPOGRAPHY
   ───────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  letter-spacing: -0.02em;
}

/* ─────────────────────────────────────────────
   NAVBAR
   ───────────────────────────────────────────── */
.portal-navbar {
  background: var(--c2r-darkest-blue);
  min-height: 64px;
  padding-block: 0;
  border-bottom: 1px solid rgba(54, 172, 227, 0.12);
}

.portal-navbar .navbar-brand {
  padding-block: 0.5rem;
}

.portal-brand {
  flex-shrink: 0;
}

.portal-nav-link {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.925rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem !important;
  border-radius: 6px;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.portal-nav-link:hover,
.portal-nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.portal-nav-link.active {
  color: #fff;
  background: rgba(54, 172, 227, 0.2);
}

/* Navbar order search with the htmx autocomplete dropdown */
.portal-nav-search {
  flex: 1 1 auto;
  max-width: 24rem;
  min-width: 0;
}

.order-search-wrap {
  position: relative;
  min-width: 0;
}

/* Wrapper for the search input so the icon can be positioned inside it. */
.order-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* Search icon positioned inside the pill input. */
.order-search-input-wrap .order-search-icon {
  position: absolute;
  left: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 5;
}

/* Scoped under .portal-nav-search so these win over the generic
   .form-control rules declared later in this file. */
.portal-nav-search .order-search-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50px;
  color: #fff;
  padding-left: 2.25rem;
}

.portal-nav-search .order-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.portal-nav-search .order-search-input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(54, 172, 227, 0.6);
  box-shadow: 0 0 0 0.2rem rgba(54, 172, 227, 0.25);
  color: #fff;
}

/* Replace the native (blue on some platforms) clear "X" with the
   Bootstrap Icons x-lg glyph, masked so it can be tinted for the dark
   navbar. Version matches the bootstrap-icons CDN pin in base.html. */
.portal-nav-search .order-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 0.8em;
  width: 0.8em;
  background-color: rgba(255, 255, 255, 0.65);
  -webkit-mask: url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/icons/x-lg.svg") center / contain no-repeat;
  mask: url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/icons/x-lg.svg") center / contain no-repeat;
  cursor: pointer;
}

.order-search-suggestions {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 1040;
}

.order-search-suggestions-menu {
  max-height: 22rem;
  overflow-y: auto;
  text-align: start;
}

@media (max-width: 991.98px) {
  .portal-nav-search {
    max-width: none;
  }
}

.portal-navbar-toggler {
  color: #fff;
  line-height: 1;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.portal-navbar-toggler:hover {
  background: rgba(255, 255, 255, 0.08);
}

.portal-navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(54, 172, 227, 0.25);
}

.portal-help-link {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.3rem;
  text-decoration: none;
  padding: 0.25rem;
  border-radius: 6px;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.portal-help-link:hover,
.portal-help-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.portal-help-popover {
  --bs-popover-max-width: 320px;
  --bs-popover-border-color: var(--c2r-stroke-grey);
  --bs-popover-header-bg: transparent;
  --bs-popover-header-color: var(--c2r-titles-blue);
  --bs-popover-body-color: var(--c2r-body-grey);
  box-shadow: var(--c2r-shadow-md);
}

.portal-help-popover .popover-header {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--c2r-stroke-grey);
}

.portal-help-popover .popover-body {
  font-size: 0.875rem;
}

.portal-help-popover .portal-help-list {
  margin: 0;
  padding-left: 1.1rem;
}

.portal-help-popover .portal-help-list li {
  margin-bottom: 0.25rem;
}

.portal-user-toggle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.3rem;
  text-decoration: none;
  padding: 0.25rem;
  border-radius: 6px;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.portal-user-toggle:hover,
.portal-user-toggle:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.portal-user-toggle::after {
  display: none;
}

.portal-user-menu {
  max-width: calc(100vw - 2rem);
}

.portal-user-menu .dropdown-item-text {
  white-space: nowrap;
}

.portal-nav-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.15);
  align-self: center;
}

.portal-header-actions {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 992px) {
  .portal-header-actions {
    border-top: 0;
  }

  .portal-nav-link {
    padding: 0.5rem 1rem !important;
  }
}

.navbar-brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.navbar-brand:hover {
  color: var(--c2r-blue) !important;
}

/* ─────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────── */
.portal-footer {
  margin-top: auto;
  background: var(--c2r-secondary-bg-subtle);
  border-top: 1px solid var(--c2r-stroke-grey);
  padding-block: 1.5rem;
  color: var(--c2r-body-grey);
}

.portal-footer-inner {
  text-align: center;
}

.portal-footer-copy {
  font-size: 0.8125rem;
  color: var(--c2r-grey);
}

/* ─────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────── */
.btn {
  --bs-btn-border-radius: 50px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-primary {
  --bs-btn-bg: var(--c2r-blue);
  --bs-btn-border-color: var(--c2r-blue);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--c2r-medium-blue);
  --bs-btn-hover-border-color: var(--c2r-medium-blue);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--c2r-dark-blue);
  --bs-btn-active-border-color: var(--c2r-dark-blue);
  --bs-btn-active-color: #fff;
}

.btn-outline-primary {
  --bs-btn-color: var(--c2r-blue);
  --bs-btn-border-color: var(--c2r-blue);
  --bs-btn-hover-bg: var(--c2r-blue);
  --bs-btn-hover-border-color: var(--c2r-blue);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--c2r-medium-blue);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn-outline-secondary {
  --bs-btn-color: var(--bs-secondary-text-emphasis);
  --bs-btn-border-color: var(--bs-secondary-border-subtle);
  --bs-btn-border-radius: 50px;
  --bs-btn-hover-color: var(--bs-btn-color);
  --bs-btn-hover-bg: var(--bs-secondary-bg-subtle);
  --bs-btn-hover-border-color: var(--bs-secondary-border-subtle);
  --bs-btn-active-color: var(--bs-btn-color);
  --bs-btn-active-bg: rgba(var(--bs-secondary-rgb), 0.18);
  --bs-btn-active-border-color: var(--bs-secondary-border-subtle);
  text-transform: capitalize;
  letter-spacing: 0.03em;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:active {
  background-color: var(--bs-btn-hover-bg);
}

.btn-outline-danger {
  --bs-btn-border-radius: 50px;
}

.btn-sm {
  --bs-btn-border-radius: 50px;
}

/* ─────────────────────────────────────────────
   CARDS
   ───────────────────────────────────────────── */
.card {
  background: var(--c2r-surface);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(13, 27, 42, 0.08),
    0 4px 12px rgba(13, 27, 42, 0.08);
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.card-header {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  background: transparent;
  border-bottom: 1px solid var(--c2r-stroke-grey);
  padding: 1rem 1.25rem;
  color: var(--c2r-titles-blue);
  font-size: 0.95rem;
  letter-spacing: 0;
}

.order-detail-content > .card,
.order-detail-content .row > [class*="col-"] > .card {
  background: var(--c2r-surface);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: var(--c2r-shadow-sm);
  overflow: hidden;
}

.order-detail-content .card-header {
  align-items: center;
  background: transparent;
  border-bottom: 1px solid var(--c2r-stroke-grey);
  color: var(--c2r-titles-blue);
  font-size: 0.95rem;
  gap: 0.55rem;
  letter-spacing: 0;
  padding: 1rem 1.25rem;
}

.card-body,
.order-detail-content .card-body {
  color: var(--c2r-body-grey);
}

.detail-card-body {
  color: var(--c2r-body-grey);
  font-size: 0.9375rem;
  padding: 1.25rem;
}

.detail-card-icon {
  align-items: center;
  background: var(--c2r-light-blue-bg);
  border-radius: 8px;
  color: var(--c2r-dark-blue);
  display: inline-flex;
  flex: 0 0 auto;
  height: 2rem;
  justify-content: center;
  width: 2rem;
  transition: background 0.2s ease;
}

.detail-card-icon i {
  font-size: 0.95rem;
  line-height: 1;
}

/* Stage-colored variants for the dashboard stat cards and empty states */
.detail-card-icon.is-stage-primary,
.empty-state-icon.is-stage-primary,
.stat-tile-icon.is-stage-primary {
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
}

.detail-card-icon.is-stage-success,
.empty-state-icon.is-stage-success,
.stat-tile-icon.is-stage-success {
  background: var(--bs-success-bg-subtle);
  color: var(--bs-success-text-emphasis);
}

.detail-card-icon.is-stage-warning,
.empty-state-icon.is-stage-warning,
.stat-tile-icon.is-stage-warning {
  background: var(--bs-warning-bg-subtle);
  color: var(--bs-warning-text-emphasis);
}

.detail-card-icon.is-stage-danger,
.empty-state-icon.is-stage-danger,
.stat-tile-icon.is-stage-danger {
  background: var(--bs-danger-bg-subtle);
  color: var(--bs-danger-text-emphasis);
}

.stat-tile-icon.is-stage-secondary {
  background: var(--bs-secondary-bg-subtle);
  color: var(--bs-secondary-text-emphasis);
}

/* Bootstrap has no orange subtle/emphasis variables, so the tentative
   card tones are hardcoded from its orange palette. */
.detail-card-icon.is-stage-orange {
  background: #ffe5d0;
  color: #984c0c;
}

/* ─────────────────────────────────────────────
   FORM LABELS & FILTERS
   ───────────────────────────────────────────── */
.form-label {
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--c2r-titles-blue);
  margin-bottom: 0.35rem;
}

.form-control,
.form-select {
  border-radius: 8px;
  border-color: var(--c2r-stroke-grey);
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--c2r-blue);
  box-shadow: 0 0 0 3px rgba(54, 172, 227, 0.12);
}

.input-group-text {
  border-radius: 8px;
  border-color: var(--c2r-stroke-grey);
  background: #f8fafc;
}

.orders-filter-form {
  background: var(--c2r-surface);
  border-radius: 12px;
  box-shadow: var(--c2r-shadow-sm);
  border: 1px solid #cbd5e1;
  padding: 1.25rem;
}

.orders-filter-form .row > * {
  min-width: 12rem;
}

/* ─────────────────────────────────────────────
   ORDERS TABLE (list view)
   ───────────────────────────────────────────── */
.orders-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--c2r-body-grey);
  color: var(--c2r-body-grey);
  font-size: 0.925rem;
  width: 100%;
  min-width: 860px;
}

.orders-table thead th {
  color: var(--c2r-titles-blue);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 2px solid var(--c2r-stroke-grey);
  padding: 0.9rem 1rem;
}

.orders-table th,
.orders-table td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
  overflow-wrap: break-word;
  white-space: normal;
  word-break: normal;
}

.orders-table tbody tr {
  transition: background 0.12s ease;
}

.orders-table tbody tr:hover {
  background: rgba(54, 172, 227, 0.04);
}

.orders-table tbody td {
  border-bottom: 1px solid var(--c2r-stroke-grey);
}

.orders-table .job_id,
.orders-table .job-id-cell {
  font-weight: 700;
}

.orders-table .job_id a,
.job-id-link {
  color: var(--c2r-dark-blue);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.15s ease;
}

.orders-table .job_id a:hover,
.orders-table .job_id a:focus,
.job-id-link:hover,
.job-id-link:focus {
  color: var(--c2r-darkest-blue);
}

.orders-table .job_description {
  min-width: 12rem;
  max-width: 18rem;
}

.orders-table .order_type {
  min-width: 5rem;
}

/* Dashboard recent orders: fit the card width and wrap instead of scrolling */
.orders-table.dashboard-recent-table {
  min-width: 0;
}

/* Fixed-height wrapper so Chart.js canvases stay a sane size */
.dashboard-chart {
  position: relative;
  height: 240px;
}

.orders-table .job_id,
.orders-table .status,
.orders-table .action_date_0,
.orders-table .action_date_2 {
  white-space: nowrap;
}

.orders-table .action_date_0,
.orders-table .action_date_2 {
  min-width: 6.5rem;
}

.orders-table .po_number,
.orders-table .special_code {
  min-width: 7rem;
}

.orders-table th.orderable a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

/* Sortable header links inherit the th title color, not the link/primary color */
.orders-table thead th a {
  color: inherit;
}
.orders-table .sort-icon {
  color: var(--c2r-grey);
  font-size: 0.6rem;
  line-height: 1;
  opacity: 0.4;
}

.orders-table .sort-icon-active {
  color: var(--c2r-blue);
  opacity: 1;
}

/* ─────────────────────────────────────────────
   DETAIL DATA TABLES (products, labor, tracking)
   ───────────────────────────────────────────── */
.detail-table-scroll {
  max-height: 48rem;
  overflow-y: auto;
}

.detail-data-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--c2r-body-grey);
  font-size: 0.925rem;
  color: var(--c2r-body-grey);
}

.detail-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--c2r-titles-blue);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  background: #f8fafc;
  border-bottom: 2px solid var(--c2r-stroke-grey);
  padding: 0.85rem 1rem;
}

.detail-data-table th,
.detail-data-table td {
  padding: 0.85rem 1rem;
}

.detail-data-table tbody tr {
  transition: background 0.12s ease;
}

.detail-data-table tbody:hover tr:hover {
  background: rgba(54, 172, 227, 0.04);
}

.detail-data-table tbody th {
  font-weight: 700;
}

.detail-table-scroll .bootstrap-table,
.detail-table-static .bootstrap-table,
.detail-table-paginated .bootstrap-table {
  margin-bottom: 0;
}

.detail-table-scroll .fixed-table-container,
.detail-table-static .fixed-table-container,
.detail-table-paginated .fixed-table-container {
  border: 0;
  border-radius: 0;
}

.detail-table-scroll .fixed-table-container .fixed-table-body,
.detail-table-static .fixed-table-container .fixed-table-body,
.detail-table-paginated .fixed-table-container .fixed-table-body {
  overflow: visible;
}

.detail-table-paginated .fixed-table-pagination {
  border-top: 1px solid var(--c2r-stroke-grey);
  padding: 0.75rem 1rem;
}

.detail-table-paginated .fixed-table-pagination .pagination,
.detail-table-paginated .fixed-table-pagination .pagination-detail {
  margin-bottom: 0;
}

.detail-table-paginated .fixed-table-pagination .page-size {
  text-transform: none;
}

.detail-data-table .sortable {
  cursor: pointer;
}

.detail-data-table .th-inner {
  padding: 0.85rem 1rem;
}

.bootstrap-table
  .fixed-table-container
  .table.table-sm.detail-data-table
  .th-inner {
  padding: 0.85rem 1rem;
}

.detail-data-table .sortable .th-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.detail-data-table .sortable .both,
.detail-data-table .sortable .asc,
.detail-data-table .sortable .desc {
  background-image: none;
}

.detail-data-table .sortable .th-inner::after {
  color: var(--c2r-grey);
  content: "\F282";
  font-family: "bootstrap-icons";
  font-size: 0.6rem;
  line-height: 1;
  opacity: 0.4;
}

.detail-data-table .sortable.desc .th-inner::after {
  content: "\F286";
  opacity: 1;
  color: var(--c2r-blue);
}

.detail-data-table .sortable.asc .th-inner::after {
  content: "\F282";
  opacity: 1;
  color: var(--c2r-blue);
}

.order-lines-table {
  min-width: 760px;
}

.product-image-cell {
  width: 4.5rem;
}

.product-thumbnail {
  aspect-ratio: 1;
  background: #fff;
  border: 1px solid var(--c2r-stroke-grey);
  border-radius: 8px;
  display: block;
  height: 3rem;
  object-fit: contain;
  width: 3rem;
}

.labor-lines-table {
  min-width: 980px;
}

.line-primary-cell {
  min-width: 16rem;
}

.line-title {
  color: var(--c2r-titles-blue);
  font-weight: 700;
}

.line-meta {
  color: var(--c2r-grey);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.resource-cell {
  min-width: 14rem;
}

.order-detail-content .table-light {
  --bs-table-bg: transparent;
  --bs-table-color: var(--c2r-titles-blue);
}

.table-hover > tbody > tr:hover > * {
  --bs-table-hover-bg: rgba(54, 172, 227, 0.04);
}

.table-dark th {
  background-color: var(--c2r-dark-blue);
  border-color: var(--c2r-darkest-blue);
}

.table-dark th a {
  color: #fff;
  text-decoration: none;
}

.table-dark th a:hover {
  color: rgba(255, 255, 255, 0.75);
}

/* ─────────────────────────────────────────────
   ADDRESS CARDS (shipping / pickup)
   ───────────────────────────────────────────── */
.address-card-body {
  padding: 1.25rem;
}

.address-card-layout {
  display: block;
}

.address-card-content {
  min-width: 0;
}

.address-card-heading {
  border-bottom: 1px solid var(--c2r-stroke-grey);
  padding-bottom: 0.85rem;
}

.address-card-title {
  color: var(--c2r-titles-blue);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.address-card-subtitle {
  color: var(--c2r-grey);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.address-field-list {
  display: grid;
  gap: 0.85rem;
  padding-top: 0.9rem;
}

.address-field-row {
  min-width: 0;
}

.address-field-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.address-contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1rem;
}

.address-contact-item {
  align-items: center;
  background: var(--c2r-light-blue-bg);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--c2r-dark-blue);
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 600;
  gap: 0.45rem;
  max-width: 100%;
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.address-contact-item:hover {
  background: #ddf0fa;
  border-color: rgba(54, 172, 227, 0.2);
}

.address-contact-item span {
  overflow-wrap: anywhere;
}

.address-contact-panel {
  border-top: 1px solid var(--c2r-stroke-grey);
  margin-top: 1rem;
  padding-top: 1rem;
}

.address-contact-name {
  color: var(--c2r-titles-blue);
  font-weight: 700;
}

.address-notes {
  background: #f8fafc;
  border: 1px solid var(--c2r-stroke-grey);
  border-radius: 8px;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
}

.address-notes-text {
  color: var(--c2r-body-grey);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* ─────────────────────────────────────────────
   ACTION TIMELINE
   ───────────────────────────────────────────── */
.action-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.action-timeline-item {
  position: relative;
  padding: 0 0 1.5rem 1.75rem;
}

.action-timeline-item:last-child {
  padding-bottom: 0;
}

.action-timeline-item::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 1.35rem;
  bottom: 0;
  width: 2px;
  background: var(--c2r-stroke-grey);
  border-radius: 1px;
}

.action-timeline-item:last-child::before {
  display: none;
}

.action-timeline-item.is-complete::before {
  background: var(--c2r-blue);
}

.action-timeline-marker {
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  font-size: 0.6rem;
  transition: all 0.2s ease;
}

.action-timeline-item.is-complete .action-timeline-marker {
  background: var(--c2r-blue);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(54, 172, 227, 0.15);
}

.action-timeline-item.is-upcoming .action-timeline-marker {
  background: var(--c2r-surface);
  border: 1.5px solid var(--c2r-dark-blue);
}

.action-timeline-item.is-empty .action-timeline-marker {
  background: var(--c2r-surface);
  color: var(--c2r-grey);
  border: 2px dashed var(--c2r-stroke-grey);
}

.action-timeline-content {
  min-width: 0;
}

.action-timeline-title {
  display: block;
  color: var(--c2r-titles-blue);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.15rem;
}

.action-timeline-item.is-empty .action-timeline-title {
  color: var(--c2r-grey);
}

.action-timeline-date {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  color: var(--c2r-body-grey);
  font-size: 0.875rem;
  line-height: 1.4;
}

.action-timeline-day {
  color: var(--c2r-grey);
  font-size: 0.85rem;
}

.action-timeline-status {
  margin-top: 0.35rem;
}

/* ─────────────────────────────────────────────
   TRACKING
   ───────────────────────────────────────────── */
.tracking-table {
  min-width: 920px;
}

.tracking-subsection-header {
  background: #f8fafc;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--c2r-stroke-grey);
}

.tracking-subsection-title {
  color: var(--c2r-dark-blue);
  font-size: 0.9rem;
  font-weight: 700;
}

.tracking-number-link {
  color: var(--c2r-dark-blue);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s ease;
}

.tracking-number-link:hover,
.tracking-number-link:focus {
  color: var(--c2r-blue);
  text-decoration: underline;
}

.tracking-history-button {
  --bs-btn-bg: transparent;
  --bs-btn-color: var(--c2r-dark-blue);
  --bs-btn-border-color: var(--c2r-dark-blue);
  --bs-btn-hover-bg: var(--c2r-dark-blue);
  --bs-btn-hover-border-color: var(--c2r-dark-blue);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--c2r-darkest-blue);
  --bs-btn-active-border-color: var(--c2r-darkest-blue);
  --bs-btn-active-color: #fff;
  --bs-btn-border-radius: 50px;
}

.detail-empty-state {
  color: var(--c2r-grey);
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
}

/* Friendly empty state for dashboard cards: a soft circular icon above a
   short message (see partials/card_empty_state.html). */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  padding: 1.75rem 1.25rem;
}

.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--c2r-light-blue-bg);
  color: var(--c2r-dark-blue);
}

.empty-state-icon i {
  font-size: 1.6rem;
  line-height: 1;
}

.empty-state-text {
  color: var(--c2r-grey);
  font-size: 0.9rem;
  max-width: 22rem;
  text-wrap: pretty;
}

/* ─────────────────────────────────────────────
   DASHBOARD KPI STAT TILES
   ───────────────────────────────────────────── */
.stat-tile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  height: 100%;
  padding: 1rem 1.15rem;
  background: var(--c2r-surface);
  border: 1px solid var(--c2r-stroke-grey);
  border-radius: 12px;
  box-shadow: var(--c2r-shadow-sm);
  text-decoration: none;
  transition:
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.stat-tile:hover,
.stat-tile:focus-visible {
  box-shadow: var(--c2r-shadow-md);
  transform: translateY(-1px);
}

.stat-tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
}

.stat-tile-icon i {
  font-size: 1.25rem;
  line-height: 1;
}

.stat-tile-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.stat-tile-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c2r-titles-blue);
}

.stat-tile-label {
  font-size: 0.8rem;
  color: var(--c2r-grey);
}

/* Dashboard cards stretch to equal height within each row: the column flexes
   so the card fills the row height, and the list/empty area grows so the
   "View all" footer pins to the bottom. */
.dashboard-cards > [class*="col-"] {
  display: flex;
}

.dashboard-cards .list-group-flush {
  flex: 1 1 auto;
}

/* Keep card bodies (incl. the "View all" footer) at their natural height so
   only the list takes the extra space. The empty-state body opts back into
   growing via its .flex-grow-1 utility. */
.dashboard-cards .card-body {
  flex: 0 0 auto;
}

/* Small count pill shown next to a dashboard card title. */
.card-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0 0.4rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--bs-secondary-bg-subtle);
  color: var(--bs-secondary-text-emphasis);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ─────────────────────────────────────────────
   SKELETON LOADING
   ───────────────────────────────────────────── */
.skeleton-line {
  display: block;
  height: 0.8rem;
  background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 45%, #e2e8f0 90%);
  background-size: 220% 100%;
  border-radius: 0.35rem;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-label {
  height: 0.55rem;
  width: 42%;
  margin-bottom: 0.45rem;
}

.skeleton-value {
  height: 1rem;
  width: 72%;
}

.skeleton-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skeleton-field {
  min-height: 2.4rem;
}

.skeleton-table {
  padding: 0.75rem 1rem;
}

.skeleton-row {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.25fr 1fr 1fr;
  min-height: 2.4rem;
}

.skeleton-row:last-child {
  border-bottom: 0;
}

.skeleton-row-wide {
  grid-template-columns: 1.1fr 0.9fr 0.8fr 0.8fr 1.6fr 0.7fr;
}

.skeleton-notes {
  display: grid;
  gap: 0.65rem;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

@media (max-width: 575.98px) {
  .skeleton-card-grid {
    grid-template-columns: 1fr;
  }

  .skeleton-row,
  .skeleton-row-wide {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    padding-bottom: 0.65rem;
    padding-top: 0.65rem;
  }
}

/* ─────────────────────────────────────────────
   DETAIL FIELDS (overview info/financials)
   ───────────────────────────────────────────── */
.detail-field-grid {
  row-gap: 1.15rem;
}

.c2r-label {
  color: var(--c2r-titles-blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.c2r-value {
  color: var(--c2r-body-grey);
  line-height: 1.4;
  margin-bottom: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.c2r-value-strong,
.detail-money {
  font-weight: 700;
}

.detail-money {
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--c2r-body-grey);
}

.detail-notes {
  color: var(--c2r-body-grey);
  line-height: 1.6;
  max-height: 18rem;
  overflow-y: auto;
  font-size: 0.9rem;
}

.detail-notes > :last-child {
  margin-bottom: 0;
}

/* ─────────────────────────────────────────────
   ORDER DETAIL SHELL
   ───────────────────────────────────────────── */
.order-detail-shell {
  font-size: 1rem;
}

.order-detail-breadcrumb .breadcrumb {
  --bs-breadcrumb-divider-color: var(--c2r-grey);
  font-size: 0.85rem;
}

/* ─────────────────────────────────────────────
   ORDER DETAIL HEADER
   ───────────────────────────────────────────── */
.order-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem 2.5rem;
  margin-bottom: 1.5rem;
}

.order-header-main {
  min-width: 0;
  flex: 1 1 22rem;
}


.order-header-eyebrow {
  color: var(--c2r-grey);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.order-header-title {
  color: var(--c2r-titles-blue);
  font-size: 1.65rem;
  line-height: 1.2;
  margin-bottom: 0.85rem;
  overflow-wrap: anywhere;
}

.order-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.85rem;
}

.order-header-meta-item {
  align-items: center;
  color: var(--c2r-body-grey);
  display: inline-flex;
  font-size: 0.875rem;
  gap: 0.4rem;
}

.order-header-meta-item i {
  color: var(--c2r-grey);
  font-size: 0.9rem;
}

.order-header-stats {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0;
  background: var(--c2r-surface);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: var(--c2r-shadow-sm);
  overflow: hidden;
}

.order-stat {
  padding: 0.85rem 1.5rem;
  min-width: 9rem;
}

.order-stat + .order-stat {
  border-left: 1px solid var(--c2r-stroke-grey);
}

.order-stat-label {
  color: var(--c2r-grey);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.order-stat-value {
  color: var(--c2r-darkest-blue);
  font-family: "Inter", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}

.order-stat-value.is-due,
.detail-money.is-due {
  color: #ea6566;
}

.order-stat-value.is-zero,
.detail-money.is-zero {
  color: var(--bs-success);
}

@media (max-width: 575.98px) {
  .order-header-title {
    font-size: 1.4rem;
  }

  .order-header-stats {
    width: 100%;
  }

  .order-stat {
    flex: 1 1 0;
    min-width: 0;
  }
}

.order-detail-breadcrumb .breadcrumb-item,
.order-detail-breadcrumb .breadcrumb-item.active {
  color: var(--c2r-grey);
}

.order-detail-breadcrumb .breadcrumb-item a {
  color: var(--c2r-blue);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.order-detail-breadcrumb .breadcrumb-item a:hover,
.order-detail-breadcrumb .breadcrumb-item a:focus {
  color: var(--c2r-dark-blue);
}

.order-detail-shell h1.h3 {
  font-size: 1.5rem;
}

/* ─────────────────────────────────────────────
   DETAIL TABS (underline style)
   ───────────────────────────────────────────── */
.order-detail-tabs {
  gap: 0;
  border-bottom: 2px solid var(--c2r-stroke-grey);
  display: flex;
}

.order-detail-tabs .nav-item {
  margin-bottom: -2px;
}

.order-detail-tabs .nav-link {
  align-items: center;
  color: var(--c2r-body-grey);
  display: inline-flex;
  gap: 0.45rem;
  padding: 0.625rem 1rem;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 500;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
  margin-bottom: 0;
  background: transparent;
}

.order-detail-tabs .nav-link i {
  color: var(--c2r-grey);
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.order-detail-tabs .nav-link:hover,
.order-detail-tabs .nav-link:focus {
  color: var(--c2r-blue);
  background: transparent;
}

.order-detail-tabs .nav-link:hover i,
.order-detail-tabs .nav-link:focus i {
  color: var(--c2r-blue);
}

.order-detail-tabs .nav-link.active {
  color: var(--c2r-blue);
  background: transparent;
  border-bottom-color: var(--c2r-blue);
  box-shadow: none;
}

.order-detail-tabs .nav-link.active i {
  color: var(--c2r-blue);
}

/* ─────────────────────────────────────────────
   TABLE CONTAINER & FOOTER
   ───────────────────────────────────────────── */
.table-container nav {
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--c2r-stroke-grey);
}

.table-footer,
.table-container nav {
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--c2r-stroke-grey);
}

.table-footer {
  color: var(--c2r-grey);
  font-size: 0.875rem;
}

.table-footer-summary {
  color: var(--c2r-body-grey);
  font-weight: 500;
}

.table-footer-per-page-label {
  color: var(--c2r-body-grey);
  font-size: 0.875rem;
}

.table-footer-per-page-select {
  width: auto;
  min-width: 4.5rem;
}

.table-footer .page-link,
.detail-table-paginated .fixed-table-pagination .page-link {
  min-width: 2rem;
  text-align: center;
}

/* ─────────────────────────────────────────────
   BADGE REFINEMENTS
   ───────────────────────────────────────────── */
.badge.rounded-pill {
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.3em 0.75em;
  letter-spacing: 0;
}

/* ─────────────────────────────────────────────
   ALERTS
   ───────────────────────────────────────────── */
.alert {
  border-radius: 10px;
  border: none;
  box-shadow: var(--c2r-shadow-sm);
}

.alert-info {
  background: var(--c2r-light-blue-bg);
  color: var(--c2r-dark-blue);
}

/* ─────────────────────────────────────────────
   MODAL
   ───────────────────────────────────────────── */
.modal-content {
  border: none;
  border-radius: 12px;
  box-shadow: var(--c2r-shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--c2r-stroke-grey);
  padding: 1rem 1.25rem;
}

.modal-header .modal-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--c2r-titles-blue);
}

/* ─────────────────────────────────────────────
   DROPDOWN
   ───────────────────────────────────────────── */
.dropdown-menu {
  border: 1px solid var(--c2r-stroke-grey);
  border-radius: 10px;
  box-shadow: var(--c2r-shadow-md);
  padding: 0.35rem;
}

.dropdown-item {
  border-radius: 6px;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
}

.dropdown-item:hover {
  background: var(--c2r-light-blue-bg);
}

.dropdown-item.text-danger:hover {
  background: #fde8e8;
}

.dropdown-divider {
  border-color: var(--c2r-stroke-grey);
  margin: 0.25rem 0;
}

/* ─────────────────────────────────────────────
   UTILITIES
   ───────────────────────────────────────────── */
.text-muted {
  color: var(--c2r-grey) !important;
}

.text-danger {
  color: var(--c2r-red) !important;
}

/* ─────────────────────────────────────────────
   DATEPICKER OVERRIDE
   ───────────────────────────────────────────── */
.daterangepicker {
  border-radius: 12px !important;
  border-color: var(--c2r-stroke-grey) !important;
  box-shadow: var(--c2r-shadow-lg) !important;
}

.daterangepicker .ranges li.active {
  background: var(--c2r-blue) !important;
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
  background: var(--c2r-blue) !important;
}

.daterangepicker td.start-date,
.daterangepicker td.end-date {
  border-radius: 8px !important;
}

/* ─────────────────────────────────────────────
   BOOTSTRAP-MULTISELECT OVERRIDE
   ───────────────────────────────────────────── */

.multiselect-wrapper {
  position: relative;
  min-height: 38px;
}

/* When a multiselect sits inside an input-group (icon prefix), let the wrapper
   fill the remaining width like a .form-control and square the button's left
   corners so it connects flush with the icon. */
.input-group > .multiselect-wrapper {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

.input-group > .multiselect-wrapper .multiselect {
  width: 100% !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.multiselect-wrapper select {
  display: none !important;
}

.multiselect-wrapper::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1rem;
  margin: -0.5rem 0 0 -0.5rem;
  border: 2px solid var(--c2r-stroke-grey);
  border-top-color: var(--c2r-blue);
  border-radius: 50%;
  animation: multiselect-spin 0.6s linear infinite;
}

.multiselect-wrapper:has(.multiselect)::after {
  display: none;
}

@keyframes multiselect-spin {
  to {
    transform: rotate(360deg);
  }
}
.multiselect {
  position: relative !important;
  border-radius: 8px !important;
  border: var(--bs-border-width, 1px) solid
    var(--bs-border-color, var(--c2r-stroke-grey)) !important;
  font-size: 0.9rem !important;
  padding: 0.5rem 0.85rem !important;
  padding-right: 2rem !important;
  text-align: left !important;
  background: var(--bs-body-bg) !important;
  color: var(--c2r-body-grey) !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.multiselect:focus,
.multiselect:focus-visible {
  border-color: var(--c2r-blue) !important;
  box-shadow: 0 0 0 3px rgba(54, 172, 227, 0.12) !important;
  outline: none !important;
}

.multiselect .caret {
  display: none !important;
}

.multiselect::after {
  content: "" !important;
  position: absolute !important;
  right: 0.85rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 0.7rem !important;
  height: 0.7rem !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
}

.multiselect-container {
  background: var(--c2r-surface) !important;
  border-radius: 10px !important;
  border: 1px solid var(--c2r-stroke-grey) !important;
  box-shadow: var(--c2r-shadow-md) !important;
  padding: 0.35rem !important;
  max-height: 400px;
  overflow-y: auto;
}

.multiselect-container .multiselect-option,
.multiselect-container .multiselect-all {
  background: var(--c2r-surface) !important;
  border-radius: 6px !important;
  font-size: 0.9rem !important;
  padding: 0.45rem 0.85rem !important;
  color: var(--c2r-body-grey) !important;
  transition: background 0.12s ease;
}

/* Route clicks anywhere on the row to the option button itself.
   bootstrap-multiselect toggles via a delegated click handler on
   .multiselect-option; the inner <label for> also natively toggles the
   checkbox, so clicking the text fires both and they cancel out (the
   selected class flashes, then reverts). Making the label/input ignore
   pointer events leaves a single, reliable toggle. */
.multiselect-container .multiselect-option .form-check,
.multiselect-container .multiselect-all .form-check {
  pointer-events: none;
}

.multiselect-container .multiselect-option:hover,
.multiselect-container .multiselect-all:hover {
  background: var(--c2r-light-blue-bg) !important;
  color: var(--c2r-dark-blue) !important;
}

.multiselect-container .multiselect-option:focus,
.multiselect-container .multiselect-all:focus,
.multiselect-container .multiselect-option:focus-visible,
.multiselect-container .multiselect-all:focus-visible {
  background: var(--c2r-light-blue-bg) !important;
  color: var(--c2r-dark-blue) !important;
  outline: none !important;
}

.multiselect-container .multiselect-option.selected,
.multiselect-container .multiselect-all.selected {
  background: var(--c2r-light-blue-bg) !important;
  color: var(--c2r-dark-blue) !important;
  font-weight: 600 !important;
}

.multiselect-container .multiselect-option.selected:hover,
.multiselect-container .multiselect-all.selected:hover {
  background: #d0e9f7 !important;
}

.multiselect-container .multiselect-filter {
  padding: 0.35rem 0.5rem !important;
}

.multiselect-container .multiselect-filter input {
  border-radius: 6px !important;
  border: 1px solid var(--c2r-stroke-grey) !important;
  font-size: 0.875rem !important;
  padding: 0.35rem 0.65rem !important;
  margin: 0 !important;
  width: 100% !important;
}

.multiselect-container .multiselect-filter input:focus {
  border-color: var(--c2r-blue) !important;
  box-shadow: 0 0 0 3px rgba(54, 172, 227, 0.12) !important;
  outline: none !important;
}

.multiselect-container .multiselect-filter .input-group-addon {
  display: none !important;
}

.multiselect-container .multiselect-no-results {
  color: var(--c2r-grey) !important;
  font-size: 0.875rem !important;
  padding: 0.5rem 0.85rem !important;
  text-align: center !important;
}

/* ─────────────────────────────────────────────
   LOGIN PAGE — Split Layout
   ───────────────────────────────────────────── */
body.portal-login-split {
  display: flex;
  min-height: 100vh;
  background: #fff;
}

/* Desktop: side by side */
@media (min-width: 992px) {
  body.portal-login-split {
    flex-direction: row;
  }

  .portal-login-left {
    flex: 0 0 40%;
    background: var(--c2r-darkest-blue);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 3rem;
    position: relative;
  }

  .portal-login-left-top {
    flex-shrink: 0;
    width: 100%;
    max-width: 25rem;
  }

  .portal-login-left-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin: 0;
    width: 100%;
    max-width: 25rem;
  }

  .portal-login-left-back {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    color: var(--c2r-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.15s ease;
  }

  .portal-login-right {
    flex: 0 0 60%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 3rem;
    padding-left: 5rem;
  }

  .portal-login-right-content {
    width: 100%;
    max-width: 28rem;
    min-width: 22rem;
  }

  .portal-login-footer--desktop {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    width: 100%;
    max-width: 25rem;
  }

  .portal-login-footer--desktop a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.15s ease;
  }

  .portal-login-footer--desktop a:hover {
    color: #fff;
  }

  .portal-login-footer--mobile {
    display: none;
  }
}

/* Mobile: stacked */
@media (max-width: 991.98px) {
  body.portal-login-split {
    flex-direction: column;
  }

  .portal-login-left {
    background: var(--c2r-darkest-blue);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    padding-top: 4rem;
    position: relative;
  }

  .portal-login-left-top {
    display: none;
  }

  .portal-login-left-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin: 0;
    text-align: center;
  }

  .portal-login-left-back {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    color: var(--c2r-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.15s ease;
  }

  .portal-login-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
  }

  .portal-login-right-content {
    flex: 1;
    width: 100%;
    max-width: 440px;
  }

  .portal-login-footer--mobile {
    flex-shrink: 0;
    text-align: left;
    font-size: 0.75rem;
    color: var(--c2r-body-grey);
    line-height: 1.6;
    padding-top: 2rem;
  }

  .portal-login-footer--mobile a {
    color: var(--c2r-body-grey);
    text-decoration: none;
    transition: color 0.15s ease;
  }

  .portal-login-footer--mobile a:hover {
    color: var(--c2r-blue);
  }

  .portal-login-footer--desktop {
    display: none;
  }
}

.portal-login-left-back:hover {
  color: #7fccee;
}

.portal-login-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(13, 27, 42, 0.2);
  overflow: hidden;
  padding: 2rem;
}

.portal-login-instruction {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c2r-titles-blue);
  margin-bottom: 1.5rem;
}

.portal-login-otp-desc {
  font-size: 0.95rem;
  color: var(--c2r-body-grey);
  margin-bottom: 1.5rem;
}

.otp-help-item {
  margin-bottom: 0.75rem;
}

.otp-help-heading {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--c2r-titles-blue);
  margin-bottom: 0.15rem;
}

.otp-help-text {
  font-size: 0.82rem;
  color: var(--c2r-body-grey);
  margin: 0;
}

#login-form-container {
  padding: 0;
}
