/**
 * Celbert Grocery Ordering System
 * Administrator Dashboard Stylesheet
 * Handcrafted Pure CSS with Bootstrap 5 integration (No Tailwind)
 */

:root {
  --admin-sidebar-width: 272px;
  --admin-topbar-height: 72px;
  --admin-primary: #e10600;
  --admin-primary-dark: #c40000;
  --admin-dark: #1a1d26;
  --admin-bg: #f4f6fb;
  --admin-border: #e9ecef;
}

body.admin-layout {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--admin-dark);
  min-height: 100vh;
  background-color: #f4f6fb;
  overflow-x: hidden;
}

.admin-layout > .d-flex {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Sidebar */
.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--admin-sidebar-width);
  z-index: 1030;
  padding: 0;
  background: #161922;
  border-right: 1px solid #2a2f3a;
  color: #e7e9ee;
  overflow: hidden;
  box-shadow: none;
}

.cg-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 16px 10px;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.cg-brand-logo {
  display: block;
  width: 104px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.admin-sidebar .sidebar-menu {
  padding: 6px 0 8px;
  scrollbar-color: #3a4150 transparent;
  scrollbar-width: thin;
}

.admin-sidebar .sidebar-link,
.admin-sidebar .nav-link {
  min-height: 46px;
  color: #c5cad6;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 14px;
  margin: 3px 14px;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-sidebar .sidebar-link:hover,
.admin-sidebar .nav-link:hover {
  color: #ff6b66;
  background: rgba(225, 6, 0, 0.14);
}

.admin-sidebar .sidebar-link.active,
.admin-sidebar .nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, #e10600 0%, #ff2a2a 100%);
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(225, 6, 0, 0.22);
}

.admin-sidebar .sidebar-link i,
.admin-sidebar .nav-link i {
  flex: 0 0 18px;
  color: #9aa3b5;
  font-size: 1.12rem;
  text-align: center;
}

.admin-sidebar .nav-link.active i,
.admin-sidebar .nav-link:hover i {
  color: inherit;
}

.admin-sidebar .nav-link > span:first-of-type {
  min-width: 0;
  flex: 1;
  line-height: 1.2;
  white-space: normal;
}

.admin-sidebar .sidebar-link {
  text-decoration: none;
}

.sidebar-count {
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff1f1;
  color: #e10600;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}

.sidebar-count-alert {
  background: #e10600;
  color: #fff;
}

.admin-sidebar .nav-link.active .sidebar-count-alert {
  background: #fff;
  color: #e10600;
}

.admin-sidebar-footer {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  min-height: 210px;
  margin-top: auto;
  padding: 8px 14px 18px;
  overflow: hidden;
  border-top: 0;
}

.cg-side-user {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 8px 8px 4px;
  color: inherit;
  text-decoration: none;
  background: transparent;
  border-radius: 16px;
}

.cg-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff4545, #d10000);
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 6px 14px rgba(225, 6, 0, 0.25);
}

.cg-side-user-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  line-height: 1.15;
}

.cg-side-user-copy strong {
  overflow: hidden;
  color: #f2f4f8;
  font-size: 0.86rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cg-side-user-copy span {
  color: #9aa3b5;
  font-size: 0.75rem;
  font-weight: 600;
}

.cg-side-user .bi-chevron-down {
  color: #9aa3b5;
  font-size: 0.8rem;
}

.cg-wave-link {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.cg-wave-link:hover {
  color: #fff;
  opacity: 0.88;
}

.cg-side-wave {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 156px;
  pointer-events: none;
}

.admin-header-bell {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #fff4f4;
  color: #c62828;
  font-size: 1.15rem;
  line-height: 1;
}

.admin-header-bell[hidden] {
  display: none !important;
}

.admin-header-bell:hover,
.admin-header-bell:focus-visible {
  background: #ffe4e4;
  color: #a91f24;
}

.admin-header-bell .notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid #fff;
  font-size: 0.62rem;
  line-height: 14px;
}

/* Main Content Area */
.admin-main-wrapper {
  margin-left: var(--admin-sidebar-width);
  width: calc(100% - var(--admin-sidebar-width));
  max-width: calc(100% - var(--admin-sidebar-width));
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Navigation Bar */
.admin-topbar {
  height: auto;
  min-height: var(--admin-topbar-height);
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding-top: 10px;
  padding-bottom: 10px;
  background: #fff;
  border-bottom: 1px solid var(--admin-border);
  padding-right: 176px !important;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.025);
}

.admin-menu-toggle,
.admin-sidebar-backdrop {
  display: none;
}

.reports-topbar {
  height: auto;
  min-height: var(--admin-topbar-height);
  gap: 12px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.reports-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.reports-filter,
.reports-exports {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.reports-filter .form-control {
  width: 9.75rem;
  flex: 0 0 auto;
}

.reports-filter .btn,
.reports-exports .btn {
  white-space: nowrap;
  flex: 0 0 auto;
}

.admin-content-body {
  padding: 26px 30px;
  flex-grow: 1;
  min-width: 0;
  max-width: 100%;
}

/* Metric / KPI Cards */
.stat-kpi-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--admin-border);
  padding: 19px;
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.025);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}

.stat-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.07);
  border-color: #f0c7c8;
}

a.stat-kpi-card,
a.stat-kpi-trigger {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

a.stat-kpi-card:hover,
a.stat-kpi-card:focus,
a.stat-kpi-trigger:hover,
a.stat-kpi-trigger:focus {
  color: inherit;
  text-decoration: none;
}

a.stat-kpi-card:focus-visible,
a.stat-kpi-trigger:focus-visible {
  outline: 2px solid var(--admin-primary);
  outline-offset: 2px;
}

.dashboard-kpi-modal .modal-content {
  border: 0;
  border-radius: 16px;
  overflow: hidden;
}

.dashboard-kpi-modal .modal-header,
.dashboard-kpi-modal .modal-footer {
  padding: 16px 20px;
}

.dashboard-kpi-modal .modal-title {
  color: #1f2937;
}

.kpi-icon-bubble {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.bubble-red {
  background: #fff0f0;
  color: #c62828;
}

.bubble-green {
  background: #fff4f4;
  color: #bd3034;
}

.bubble-blue {
  background: #fff7f7;
  color: #a91f24;
}

.bubble-amber {
  background: #fff1f1;
  color: #d14347;
}

.bubble-purple {
  background: #fff5f5;
  color: #8f2529;
}

/* Tables */
.admin-table-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--admin-border);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.025);
}

.admin-table-card > .bg-light {
  background-color: #fff !important;
  border-color: var(--admin-border) !important;
}

.admin-table th {
  background-color: #fff7f7;
  color: #606978;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #f0dada;
  padding: 13px 16px;
}

.admin-table td {
  padding: 13px 16px;
  vertical-align: middle;
  font-size: 0.9rem;
  border-bottom: 1px solid #f1f2f4;
}

.admin-table tbody tr:hover {
  background-color: #fffafa;
}

.customer-address-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--admin-border, #e7e8ea);
  border-radius: 10px;
  background: #fff;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.5rem;
}

.customer-address-line-text {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
}

.customer-address-line-text strong,
.customer-address-line-text .badge {
  flex-shrink: 0;
}

.customer-address-line-text .text-muted {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-layout .table tbody tr.needs-action > * {
  --bs-table-bg: #fff4e0;
  --bs-table-accent-bg: #fff4e0;
  background-color: #fff4e0;
}

.admin-layout .table tbody tr.needs-action:hover > * {
  --bs-table-bg: #ffe4c2;
  --bs-table-accent-bg: #ffe4c2;
  background-color: #ffe4c2;
}

.admin-layout .table tbody tr.needs-action > *:first-child {
  border-left: 4px solid #e8890c;
}

.admin-layout .table tbody tr.nc-bounced > * {
  --bs-table-bg: #fee2e2;
  --bs-table-accent-bg: #fee2e2;
  background-color: #fee2e2;
}

.admin-layout .table tbody tr.nc-bounced:hover > * {
  --bs-table-bg: #fecaca;
  --bs-table-accent-bg: #fecaca;
  background-color: #fecaca;
}

.admin-layout .table tbody tr.nc-bounced > *:first-child {
  border-left: 4px solid #dc2626;
}

.admin-layout .table tbody tr.nc-bounced-settled > * {
  --bs-table-bg: #fff4e0;
  --bs-table-accent-bg: #fff4e0;
  background-color: #fff4e0;
}

.admin-layout .table tbody tr.nc-bounced-settled:hover > * {
  --bs-table-bg: #ffe4c2;
  --bs-table-accent-bg: #ffe4c2;
  background-color: #ffe4c2;
}

.admin-layout .table tbody tr.nc-bounced-settled > *:first-child {
  border-left: 4px solid #e8890c;
}

.nc-bounce-note {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 600;
}

.admin-table-card.needs-action-card,
.list-group-item.needs-action {
  background: #fff4e0;
  border-color: #f5c07a;
  box-shadow: inset 4px 0 0 #e8890c, 0 2px 8px rgba(31, 41, 55, 0.025);
}

/* Compact order and payment queue */
.orders-live-card {
  border-radius: 12px;
  max-width: 100%;
}

.orders-live-card .table-responsive {
  max-width: 100%;
}

.orders-live-heading {
  min-height: 48px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
}

.orders-live-heading small {
  color: #718096;
  font-size: 0.68rem;
  font-weight: 400;
}

.orders-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 0 16px 12px;
}

.orders-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.orders-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  width: min(100%, 280px);
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d5deea;
  border-radius: 999px;
  background: #fff;
  color: #94a3b8;
}

.orders-search:focus-within {
  border-color: #e8b4b4;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.08);
}

.orders-search input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1f2937;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 0;
}

.orders-search input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.orders-filter-chip {
  border: 1px solid #d5deea;
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 5px 10px 5px 12px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.orders-filter-chip span {
  display: inline-block;
  margin-left: 6px;
  min-width: 1.25rem;
  padding: 0 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.68rem;
  text-align: center;
}

.orders-filter-chip:hover {
  border-color: #e8b4b4;
  color: var(--admin-primary);
}

.orders-filter-chip.is-active {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  color: #fff;
}

.orders-filter-chip.is-active span {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.orders-live-table {
  width: 100%;
  table-layout: fixed;
}

.orders-live-table th:nth-child(1) { width: 16%; }
.orders-live-table th:nth-child(2) { width: 16%; }
.orders-live-table th:nth-child(3) { width: 20%; }
.orders-live-table th:nth-child(4) { width: 16%; }
.orders-live-table th:nth-child(5) { width: 16%; }
.orders-live-table th:nth-child(6) { width: 16%; }

.orders-live-table thead th {
  background: #f8fafc;
  border-bottom-color: #dce3eb;
  color: #53657d;
  font-size: 0.68rem;
  letter-spacing: 0;
  padding: 11px 8px;
  white-space: normal;
}

.orders-live-table tbody td {
  padding: 12px 8px;
  font-size: 0.72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.orders-live-table tbody tr:hover {
  background: #fbfdff;
}

.orders-live-number {
  color: #c62828;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.orders-live-number:hover {
  text-decoration: underline;
}

.orders-destination-button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.orders-destination-button .bi-geo-alt-fill {
  color: #c62828;
}

.orders-destination-button:hover .orders-destination-label,
.orders-destination-button:focus-visible .orders-destination-label {
  color: #c62828;
  text-decoration: underline;
}

.orders-destination-button:focus-visible {
  outline: 2px solid #c62828;
  outline-offset: 2px;
  border-radius: 4px;
}

.destination-map-modal .modal-body {
  padding-top: 0.75rem;
}

.destination-map-address {
  font-weight: 700;
  color: #1e293b;
}

.destination-map-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #e8eef4;
}

.destination-map-canvas {
  height: 360px;
  width: 100%;
  background: #dbe7ee;
}

.destination-map-canvas.leaflet-container {
  font-family: inherit;
  background: #dbe7ee;
}

.leaflet-marker-icon.destination-map-marker {
  background: none;
  border: 0;
}

.destination-map-pin {
  position: relative;
  width: 46px;
  height: 58px;
  pointer-events: none;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.32));
}

.destination-map-pin svg {
  display: block;
  width: 46px;
  height: 58px;
}

.destination-map-pin-tip {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(28, 28, 28, 0.28);
  transform: translate(-50%, 50%);
}

.destination-map-status {
  margin: 0;
  padding: 8px 12px;
  background: #fff;
  color: #64748b;
  font-size: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

.destination-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.85fr);
  gap: 12px;
  align-items: stretch;
}

.destination-map-layout.is-map-only {
  grid-template-columns: minmax(0, 1fr);
}

.destination-route {
  max-height: 420px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
}

.destination-route-kicker {
  margin: 0 0 2px;
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.destination-route-distance {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.destination-route-fee {
  margin: 4px 0 0;
  font-weight: 700;
  color: #b42318;
}

.destination-route-meta {
  margin: 4px 0 12px;
  color: #64748b;
  font-size: 0.8rem;
}

.destination-route-steps {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 8px;
}

.destination-route-steps li {
  color: #1e293b;
  font-size: 0.86rem;
}

.destination-route-steps small {
  display: block;
  color: #64748b;
}

.store-location-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.store-location-toolbar .form-control {
  flex: 1 1 220px;
}

.store-location-results {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.store-location-result {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
}

.store-location-result:hover,
.store-location-result:focus-visible {
  border-color: #15803d;
  background: #f0fdf4;
}

.store-location-map {
  height: 360px;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #dbe7ee;
}

.store-location-map.leaflet-container {
  font-family: inherit;
  background: #dbe7ee;
}

@media (max-width: 767px) {
  .destination-map-layout,
  .destination-map-layout.is-map-only {
    grid-template-columns: minmax(0, 1fr);
  }

  .destination-route {
    max-height: 260px;
  }
}

.orders-view-button {
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #b42318;
}

.orders-view-button:hover {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #991b1b;
}

.orders-items-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.orders-items-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef2f6;
}

.orders-items-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.orders-items-list .catalog-photo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 8px;
  object-fit: cover;
}

.orders-items-name {
  min-width: 0;
  font-weight: 600;
  color: #1f2937;
}

.orders-items-qty {
  margin-left: auto;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

.orders-items-price {
  min-width: 5.5rem;
  font-weight: 700;
  color: #1f2937;
  text-align: right;
  white-space: nowrap;
}

.orders-items-summary {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.orders-items-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 0.9rem;
}

.orders-items-summary .orders-items-grand {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #eef2f6;
  color: #111827;
  font-size: 1.05rem;
  font-weight: 700;
}

.orders-items-summary .orders-items-grand span:last-child {
  color: #b42318;
}

.payment-proof-link {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b42318;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.payment-proof-link:hover {
  text-decoration: underline;
}

.payment-proof-thumb {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.payment-proof-modal .modal-body {
  display: flex;
  justify-content: center;
  background: #fff;
}

.payment-proof-full {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(75vh, 820px);
  object-fit: contain;
  border-radius: 8px;
}

.orders-live-total {
  white-space: nowrap;
}

.payment-state {
  display: inline-block;
  max-width: 100%;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: lowercase;
  vertical-align: 1px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.payment-state-verified {
  background: #d1fae5;
  color: #047857;
}

.payment-state-pending {
  background: #fef3c7;
  color: #a16207;
}

.payment-state-failed,
.payment-state-refunded {
  background: #fee2e2;
  color: #b91c1c;
}

.orders-status-form {
  min-width: 0;
  width: 100%;
}

.orders-status-select {
  width: 100%;
  min-height: 31px;
  padding: 4px 20px 4px 8px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 600;
}

.orders-status-select.status-pending {
  border-color: #fbbf24;
  background-color: #fffbeb;
  color: #92400e;
}

.orders-status-select.status-confirmed,
.orders-status-select.status-preparing {
  border-color: #f59e0b;
  background-color: #fff7ed;
  color: #9a3412;
}

.orders-status-select.status-ready-for-pickup,
.orders-status-select.status-out-for-delivery {
  border-color: #60a5fa;
  background-color: #eff6ff;
  color: #1d4ed8;
}

.orders-status-select.status-completed {
  border-color: #34d399;
  background-color: #ecfdf5;
  color: #047857;
}

.orders-status-select.status-cancelled,
.orders-status-select.status-rejected {
  border-color: #fca5a5;
  background-color: #fef2f2;
  color: #b91c1c;
}

.orders-reject-note {
  margin-top: 6px;
  padding: 8px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
}

.orders-reject-label {
  margin: 0 0 6px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b91c1c;
}

.orders-reject-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.orders-reject-chips button {
  border: 1px solid #fecaca;
  background: #fff;
  color: #991b1b;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
}

.orders-reject-chips button.is-active {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.orders-reject-error {
  margin: 4px 0 0;
  color: #b91c1c;
  font-size: 0.68rem;
  font-weight: 600;
}

.orders-reject-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.orders-reject-actions .btn {
  font-size: 0.68rem;
  font-weight: 700;
}

.orders-reject-back {
  color: #64748b;
  text-decoration: none;
  padding-inline: 6px;
}

.orders-status-reason {
  display: block;
  margin-top: 4px;
  color: #b91c1c;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.35;
}

.orders-live-actions {
  min-width: 0;
  text-align: right;
  white-space: normal;
}

.orders-action-button {
  margin: 2px;
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
}

.orders-driver-button {
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
}

.orders-driver-button:hover {
  border-color: #bfdbfe;
  background: #dbeafe;
  color: #1e40af;
}

.orders-driver-button:disabled,
.orders-driver-button:disabled:hover {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.orders-driver-lock {
  display: block;
  margin: 2px 2px 0;
  color: #b45309;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: right;
}

.driver-roster-details {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.85rem;
}

.orders-driver-note {
  display: block;
  margin: 2px 2px 0;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: right;
}

.assign-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.assign-finding-fields {
  display: grid;
  gap: 1rem;
}

[data-assign-panel][hidden],
[data-partner-other][hidden] {
  display: none !important;
}

.assign-mode-option {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.assign-mode-option input {
  margin-top: 3px;
}

.assign-mode-option:has(input:checked) {
  border-color: #c62828;
  background: #fff5f5;
}

.assign-mode-option strong,
.assign-found-option strong {
  display: block;
  font-size: 0.92rem;
}

.assign-mode-option small,
.assign-found-option small {
  display: block;
  color: #64748b;
  line-height: 1.35;
}

.assign-found-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff7f7;
  cursor: pointer;
}

.assign-found-option input {
  margin-top: 3px;
}

@media (max-width: 520px) {
  .assign-mode {
    grid-template-columns: 1fr;
  }
}

.orders-verify-button {
  border: 1px solid #d1fae5;
  background: #ecfdf5;
  color: #047857;
}

.orders-verify-button:hover {
  border-color: #a7f3d0;
  background: #d1fae5;
  color: #065f46;
}

.orders-delivered-button {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.orders-delivered-button:hover {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.orders-print-button,
.orders-more-toggle {
  width: 28px;
  height: 28px;
  margin: 2px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.orders-print-button:hover,
.orders-more-toggle:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.orders-more-actions {
  position: relative;
  display: inline-block;
}

.orders-more-toggle {
  cursor: pointer;
  list-style: none;
}

.orders-more-toggle::-webkit-details-marker {
  display: none;
}

.orders-more-panel {
  position: static;
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.14);
  text-align: left;
  white-space: normal;
}

.orders-more-panel form + form {
  padding-top: 8px;
  border-top: 1px solid var(--admin-border);
}

/* Status Badges */
.status-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 20px;
  display: inline-block;
  text-transform: capitalize;
}

/* Filter Card */
.filter-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--admin-border);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.025);
}

.admin-layout .form-control:focus,
.admin-layout .form-select:focus {
  border-color: #df8b8e;
  box-shadow: 0 0 0 0.2rem rgba(198, 40, 40, 0.12);
}

.admin-layout .btn-danger {
  background-color: var(--admin-primary);
  border-color: var(--admin-primary);
}

.admin-layout .btn-danger:hover {
  background-color: var(--admin-primary-dark);
  border-color: var(--admin-primary-dark);
}

/* Responsive adjustment for Mobile screens */
@media (max-width: 991.98px) {
  .admin-menu-toggle {
    display: inline-flex;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1040;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e6e8eb;
    border-radius: 10px;
    background: #fff;
    color: #1f2937;
    font-size: 1.35rem;
    line-height: 1;
  }

  .admin-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1025;
    background: rgba(15, 27, 50, 0.45);
  }

  .admin-sidebar-backdrop:not([hidden]) {
    display: block;
  }

  .admin-sidebar {
    z-index: 1035;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .admin-sidebar.show {
    transform: translateX(0);
  }

  .admin-main-wrapper {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }

  .admin-topbar {
    padding-left: 64px !important;
  }

  .admin-content-body {
    padding: 20px;
  }
}

@media (max-width: 575.98px) {
  .admin-content-body {
    padding: 16px 12px;
  }

  .admin-topbar {
    padding-left: 62px !important;
    padding-right: 156px !important;
  }

  .admin-topbar h5 {
    font-size: 1rem;
  }

  .stat-kpi-card {
    padding: 16px;
  }

  .filter-card {
    padding: 16px;
  }
}

/* Product catalogue */
.products-main {
  min-width: 0;
}

.products-page {
  min-width: 0;
  padding: 28px 30px 36px;
}

.products-page .admin-topbar .badge {
  padding: 7px 12px;
  background: #fff0f0 !important;
  color: var(--admin-primary) !important;
  font-size: 0.75rem;
  font-weight: 700;
}

.product-preview-card {
  position: sticky;
  top: calc(var(--admin-topbar-height) + 20px);
}

.admin-layout .product-form-modal.modal-dialog {
  max-width: min(1080px, calc(100vw - 2rem));
}

.product-form-modal .modal-content {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(31, 41, 55, 0.18);
}

.product-form-modal .modal-header,
.product-form-modal .modal-footer {
  padding: 16px 20px;
  border-color: #f1f3f5;
}

.product-form-modal .modal-title {
  color: #1f2937;
}

.product-form-modal .modal-body {
  padding: 18px 20px;
}

.product-form-modal .product-preview-card {
  position: static;
}

.product-preview-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 240px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.product-preview-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.product-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 0.78rem;
}

.product-preview-placeholder i {
  font-size: 2rem;
}

.catalogue-card {
  border-color: #e7ebf0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.025);
}

.catalogue-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px 14px;
  background: #fff;
}

.catalogue-description {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 500;
}

.catalogue-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.catalogue-card-actions .btn {
  flex: 0 0 auto;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 650;
  box-shadow: 0 3px 8px rgba(198, 40, 40, 0.12);
}

.catalogue-card .table-responsive {
  scrollbar-color: #cbd2dc #f5f6f8;
  scrollbar-width: thin;
}

.catalogue-table {
  min-width: 1140px;
  table-layout: fixed;
}

.catalogue-table th,
.catalogue-table td {
  padding-right: 12px;
  padding-left: 12px;
}

.catalogue-table th {
  padding-top: 10px;
  padding-bottom: 10px;
  background: #f8fafc;
  color: #526174;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.catalogue-table th:nth-child(1) { width: 19%; }
.catalogue-table th:nth-child(2) { width: 12%; }
.catalogue-table th:nth-child(3) { width: 7%; }
.catalogue-table th:nth-child(4) { width: 10%; }
.catalogue-table th:nth-child(5) { width: 9%; }
.catalogue-table th:nth-child(6) { width: 12%; }
.catalogue-table th:nth-child(7) { width: 14%; }
.catalogue-table th:nth-child(8) { width: 17%; }

.catalogue-table td {
  padding-top: 9px;
  padding-bottom: 9px;
  color: #293548;
  font-size: 0.75rem;
  line-height: 1.4;
}

.catalogue-table td,
.catalogue-table th {
  border-color: #edf1f5;
}

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

.catalogue-table tbody tr:hover {
  background: #f8fafc;
}

.catalogue-table tbody tr.low-stock-row > * {
  --bs-table-bg: #fff1f2;
  --bs-table-accent-bg: #fff1f2;
  --bs-table-hover-bg: #ffe4e6;
  background-color: #fff1f2;
}

.catalogue-table tbody tr.low-stock-row:hover > * {
  --bs-table-bg: #ffe4e6;
  --bs-table-accent-bg: #ffe4e6;
  background-color: #ffe4e6;
}

.catalogue-table tbody tr.low-stock-row > *:first-child {
  box-shadow: inset 3px 0 0 #e11d48;
}

.catalogue-table td small {
  margin-top: 3px;
  color: #8993a2 !important;
  font-size: 0.64rem;
  line-height: 1.45;
}

.product-identity strong {
  display: block;
  color: #202b3c;
  font-size: 0.76rem;
  font-weight: 700;
}

.product-image {
  display: block;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e8edf2;
}

.product-image-placeholder {
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.9rem;
}

.product-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
  color: #8993a2;
  font-size: 0.62rem;
}

.product-meta .badge {
  padding: 2px 5px;
  border-radius: 4px;
  color: #657184 !important;
  font-size: 0.55rem;
  font-weight: 650;
  text-transform: capitalize;
}

.product-prices strong {
  color: #202b3c;
  font-size: 0.74rem;
  font-weight: 650;
  white-space: nowrap;
}

.product-retail-price strong {
  color: #c62828;
  font-weight: 800;
}

.product-stock .badge {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
}

.product-stock .stock-pill-ok {
  background: #d1fae5;
  color: #047857;
}

.product-stock .stock-pill-low {
  background: #fee2e2;
  color: #b91c1c;
}

.product-supplier {
  overflow: hidden;
  color: #526174 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-actions {
  white-space: nowrap;
}

.product-actions form {
  margin: 0;
}

.product-icon-button {
  display: inline-flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.product-icon-button:hover {
  transform: translateY(-1px);
}

.product-icon-button:active {
  transform: translateY(0) scale(0.96);
}

.product-icon-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.product-stock-button {
  border-color: #dbeafe;
  background: #eff6ff;
  color: #2563eb;
}

.product-stock-button:hover {
  border-color: #bfdbfe;
  background: #dbeafe;
  color: #1d4ed8;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.12);
}

.product-restock-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.product-restock-button:hover {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #991b1b;
  box-shadow: 0 3px 8px rgba(185, 28, 28, 0.12);
  transform: translateY(-1px);
}

.product-restock-button:active {
  transform: translateY(0) scale(0.96);
}

.product-restock-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.2);
}

.product-edit-button {
  border-color: #e0e7ff;
  background: #eef2ff;
  color: #4f46e5;
}

.product-edit-button:hover {
  border-color: #c7d2fe;
  background: #e0e7ff;
  color: #4338ca;
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.12);
}

.product-discontinue-button {
  border-color: #fee2e2;
  background: #fef2f2;
  color: #b91c1c;
}

.product-discontinue-button:hover {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
  box-shadow: 0 3px 8px rgba(185, 28, 28, 0.12);
}

.stock-modal-form + .stock-modal-form {
  padding-top: 18px;
  border-top: 1px solid #e9ecef;
}

.restock-price-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.restock-price-card div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  background: #fff1f2;
}

.restock-price-card span {
  display: block;
  margin-bottom: 3px;
  color: #9f1239;
  font-size: 0.68rem;
  font-weight: 650;
}

.restock-price-card strong {
  color: #1f2937;
  font-size: 0.92rem;
}

.restock-next-note {
  color: #be123c;
  font-weight: 650;
}

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

.delivery-form-modal .modal-content {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(31, 41, 55, 0.18);
}

.delivery-form-modal .modal-header,
.delivery-form-modal .modal-footer {
  padding: 16px 20px;
  border-color: #f1f3f5;
}

.delivery-form-modal .modal-title {
  color: #1f2937;
}

.delivery-form-modal .modal-body {
  padding: 18px 20px;
}


.recipe-form-modal .modal-dialog {
  max-width: min(1040px, calc(100vw - 2rem));
}

.recipe-form-modal .modal-content {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(31, 41, 55, 0.18);
}

.recipe-form-modal .modal-header,
.recipe-form-modal .modal-footer {
  padding: 16px 20px;
  border-color: #f1f3f5;
}

.recipe-form-modal .modal-title {
  color: #1f2937;
}

.recipe-form-modal .modal-body {
  padding: 18px 20px;
}

.recipe-picture-preview,
.recipe-admin-thumb {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
}

.recipe-picture-preview {
  margin-top: 0.5rem;
}

.recipe-admin-thumb-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  flex: 0 0 56px;
}

.recipe-form-modal .recipe-admin-ingredient-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) 92px 46px;
  gap: 0.5rem;
  align-items: end;
}

.recipe-form-modal .recipe-admin-ingredient-row > [class*="col-"] {
  width: auto;
  max-width: none;
  padding: 0;
}

@media (max-width: 575.98px) {
  .recipe-form-modal .recipe-admin-ingredient-row {
    grid-template-columns: 1fr 1fr;
  }

  .recipe-form-modal .recipe-admin-ingredient-row > :first-child,
  .recipe-form-modal .recipe-admin-ingredient-row > :nth-child(2) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .products-page {
    padding: 20px 16px 28px;
  }

  .catalogue-card-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .catalogue-card-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .catalogue-card-actions .btn {
    width: 100%;
  }

  .catalogue-table {
    min-width: 0;
  }
}

/* Keep every admin page inside the viewport when the window is resized. */
.admin-topbar form.d-flex {
  flex: 1 1 16rem;
  min-width: 0;
}

.admin-topbar form.d-flex .form-control {
  flex: 1 1 8rem;
  width: auto;
  min-width: 0;
}

.admin-topbar h5 {
  overflow-wrap: anywhere;
}

.admin-topbar .d-flex,
.admin-content-body .d-flex,
.admin-table-card .d-flex,
.orders-live-heading,
.filter-card form {
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.admin-content-body .row,
.admin-content-body .row > [class*="col"] {
  min-width: 0;
  max-width: 100%;
}

.admin-content-body,
.filter-card,
.stat-kpi-card,
.tab-content,
.tab-pane {
  min-width: 0;
  max-width: 100%;
}

.stat-kpi-card h3,
.stat-kpi-card span,
.admin-content-body p,
.admin-content-body li,
.admin-content-body td,
.admin-content-body th {
  overflow-wrap: break-word;
}

.admin-content-body .table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.admin-table-card:not(:has(.table-responsive)) {
  overflow-x: auto;
}

.admin-table:not(.catalogue-table):not(.orders-live-table):not(.inventory-editor-table):not(.inventory-line-table):not(.click-line-table):not(.dr-fit):not(.nc-fit) {
  width: max-content;
  min-width: 100%;
}

.click-line-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.click-line-table td {
  padding: 0;
}

.line-open {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.line-open:hover,
.line-open:focus-visible {
  color: inherit;
  background: transparent;
}

.line-open:focus-visible {
  outline: 2px solid var(--admin-primary, #dc3545);
  outline-offset: -2px;
}

.line-open .inventory-line {
  width: 100%;
}

.line-open-chevron {
  flex: 0 0 auto;
  color: #b0b7c3;
  font-size: 0.85rem;
}

.inventory-line-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.inventory-line-table th:last-child,
.inventory-line-table td:last-child {
  width: 72px;
  white-space: nowrap;
  vertical-align: middle;
}

.inventory-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.inventory-line strong {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #202b3c;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-line-meta {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #8993a2;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-line .badge {
  flex: 0 0 auto;
  font-weight: 650;
}

.inventory-editor-table {
  width: 100%;
  min-width: 720px;
  table-layout: auto;
}

.inventory-editor-table .form-control,
.inventory-editor-table .form-select {
  width: 100%;
}

.inventory-editor-table th:last-child,
.inventory-editor-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

.admin-content-body .nav-tabs {
  flex-wrap: wrap;
  row-gap: 4px;
}

.admin-section-tabs .nav-link {
  color: #5c6778;
  font-weight: 600;
}

.admin-section-tabs .nav-link:hover,
.admin-section-tabs .nav-link.active {
  color: var(--admin-primary);
}

.admin-content-body .nav-tabs .nav-link {
  white-space: normal;
}

.admin-content-body img:not(.product-image):not(.catalog-photo):not(.payment-proof-thumb):not(.bp-item-photo),
.admin-content-body canvas,
.admin-content-body svg {
  max-width: 100%;
}

.admin-content-body pre,
.admin-content-body code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.admin-content-body details form,
.admin-content-body form[style*="min-width"] {
  min-width: 0 !important;
  width: min(100%, 420px);
  max-width: 100%;
}

.admin-content-body input,
.admin-content-body select,
.admin-content-body textarea,
.admin-content-body .form-control,
.admin-content-body .form-select {
  max-width: 100%;
  min-width: 0;
}

.filter-card form.d-flex > .form-control {
  flex: 1 1 12rem;
}

.line-product {
  min-width: 0;
  max-width: 100%;
}

.line-product > span,
.line-product > div {
  min-width: 0;
}

.orders-more-panel {
  width: min(245px, 100%);
  max-width: 100%;
}

.admin-layout .modal-dialog {
  max-width: min(var(--bs-modal-width, 500px), calc(100vw - 1.5rem));
  margin-left: auto;
  margin-right: auto;
}

.admin-layout .modal-body,
.stock-modal-form .d-flex > * {
  min-width: 0;
}

@media (max-width: 1199.98px) {
  .orders-live-table,
  .catalogue-table {
    min-width: 0;
    width: 100%;
  }

  .catalogue-table {
    table-layout: auto;
  }

  .orders-live-actions,
  .orders-status-form {
    min-width: 0;
  }

  .orders-live-actions,
  .orders-live-table thead th,
  .product-actions {
    white-space: normal;
  }

  .reports-toolbar,
  .reports-filter,
  .reports-exports {
    width: 100%;
    justify-content: flex-start;
  }

  .reports-filter .form-control {
    flex: 1 1 8.5rem;
    width: auto;
    min-width: 0;
  }
}

@media (max-width: 767.98px) {
  .orders-search {
    margin-left: 0;
    width: 100%;
  }

  .orders-live-table {
    min-width: 760px;
  }

  .catalogue-table {
    min-width: 860px;
    table-layout: fixed;
  }
}

@media (max-width: 575.98px) {
  .stat-kpi-card h3 {
    font-size: 1.25rem;
  }

  .admin-table th,
  .admin-table td {
    padding-right: 10px;
    padding-left: 10px;
  }

  .orders-live-heading,
  .admin-table-card > .border-bottom,
  .admin-table-card > .p-3.d-flex {
    align-items: flex-start;
  }
}

@media (max-width: 767.98px) {
  .admin-topbar {
    align-items: flex-start;
  }

  .admin-topbar .btn,
  .admin-content-body .btn,
  .filter-card .btn {
    min-height: 40px;
  }

  .products-page,
  .admin-content-body {
    padding: 16px 12px 28px;
  }

  .filter-card .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .line-product img,
  .catalog-photo,
  .recipe-admin-thumb,
  .recipe-picture-preview {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    object-fit: cover;
  }

  .stat-kpi-card {
    min-height: 88px;
  }

  .admin-layout .modal-dialog {
    margin: 0.75rem;
  }

  .recipe-form-modal .recipe-admin-ingredient-row {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    width: min(86vw, 280px);
  }
}

.payment-method-card {
  height: 100%;
  padding: 1.15rem 1.15rem 1.25rem;
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  background: #fff;
}

.payment-method-card .form-check-input:checked {
  background-color: var(--admin-primary);
  border-color: var(--admin-primary);
}

.payment-method-qr {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--admin-border);
}

.payment-qr-admin-card {
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  background: #fff;
}

.payment-qr-admin-image {
  display: block;
  width: min(220px, 100%);
  height: auto;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid #e7e5e4;
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
}

.payment-qr-admin-empty {
  padding: 1.25rem 1rem;
  border-radius: 14px;
  background: #fff7ed;
  color: #9a3412;
  text-align: center;
}

body.admin-layout:has(.staff-login) {
  background: #fff;
}

.staff-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 48px;
  background: #fff var(--portal-bg) center / cover no-repeat;
}

.staff-login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  align-items: center;
  gap: 72px;
  width: min(1080px, 100%);
}

.staff-login-brand,
.staff-login-card {
  min-width: 0;
}

.staff-login-brand {
  text-align: center;
}

.staff-login-brand img {
  display: block;
  width: min(280px, 86%);
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.staff-login-rule {
  display: block;
  width: 46px;
  height: 3px;
  margin: 18px auto 16px;
  border-radius: 3px;
  background: #e10600;
}

.staff-login-brand h1 {
  margin: 0;
  color: #1c2430;
  font-size: clamp(2.15rem, 3.4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.staff-login-brand h1 span {
  color: #e10600;
}

.staff-login-brand p {
  margin: 10px 0 0;
  color: #8e97a3;
  font-size: 1rem;
  font-weight: 500;
}

.staff-login-card {
  width: 100%;
  padding: 32px 28px 22px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(28, 36, 48, 0.1);
}

.staff-login-card h2 {
  margin: 0 0 6px;
  color: #1c2430;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.staff-login-lead {
  margin: 0 0 20px;
  color: #8b939e;
  font-size: 0.9rem;
}

.staff-login-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1f1;
  color: #b42318;
  font-size: 0.8rem;
}

.portal-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-bottom: 12px;
  padding: 0 14px;
  border: 1px solid #e6e8ee;
  border-radius: 10px;
  background: #fff;
}

.portal-field:focus-within {
  border-color: #f3b4b4;
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.08);
}

.portal-field > i {
  flex: 0 0 auto;
  color: #a0a8b3;
  font-size: 1.05rem;
}

.portal-field input,
.portal-field .password-field,
.portal-field .password-field input {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: #1c2430;
  font-size: 0.92rem;
}

.portal-field input::placeholder {
  color: #b4bcc6;
}

.portal-field .password-field {
  position: relative;
}

.portal-field .password-field input {
  padding-right: 28px;
}

.portal-field .password-toggle {
  color: #a0a8b3;
}

.portal-field .password-toggle:hover,
.portal-field .password-toggle:focus-visible {
  color: #e10600;
}

.portal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 16px;
}

.portal-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #3d4654;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.portal-remember input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid #d5d9e0;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.portal-remember input:checked {
  border-color: #e10600;
  background: #e10600 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M6.2 11.4 2.9 8.1l1.2-1.2 2.1 2.1 5.7-5.7 1.2 1.2z'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
}

.portal-forgot {
  color: #e10600;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.portal-forgot:hover {
  color: #c40000;
}

.portal-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: #e10600;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(225, 6, 0, 0.18);
}

.portal-submit:hover {
  background: #c40000;
  color: #fff;
}

.portal-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 12px;
  color: #c5cad3;
  font-size: 0.75rem;
}

.portal-or::before,
.portal-or::after {
  flex: 1;
  height: 1px;
  background: #eceff3;
  content: '';
}

.staff-login-links {
  color: #8b939e;
  font-size: 0.78rem;
  text-align: center;
}

.staff-login-links p {
  margin: 0 0 4px;
}

.staff-login-links a {
  color: #e10600;
  font-weight: 700;
  text-decoration: none;
}

.staff-login-links a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .staff-login {
    align-items: flex-start;
    padding: 28px 20px 40px;
    overflow-x: hidden;
  }

  .staff-login-layout {
    grid-template-columns: 1fr;
    gap: 22px;
    width: min(420px, 100%);
  }

  .staff-login-brand img {
    width: min(240px, 78%);
  }

  .staff-login-card {
    padding: 26px 18px 18px;
  }

  .portal-row {
    gap: 8px;
    max-width: 100%;
  }

  .portal-forgot,
  .portal-remember {
    font-size: 0.78rem;
  }

  .portal-forgot {
    white-space: normal;
    text-align: right;
  }
}

.staff-sidebar-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.staff-sidebar-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: #fff;
  font-size: 0.86rem;
  font-weight: 600;
}

.staff-sidebar-option:has(input:checked) {
  border-color: #d30912;
  background: #fff5f5;
}

.staff-sidebar-option input {
  accent-color: #d30912;
}

@media (max-width: 575.98px) {
  .staff-sidebar-options {
    grid-template-columns: 1fr;
  }
}

/* Dashboard shell matched to the red-and-white overview */
.admin-topbar.cg-shell {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 26px 6px !important;
  background: #f4f6fb;
  border: 0;
  box-shadow: none;
}

.cg-shell-name {
  position: static;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  justify-self: center;
  overflow: hidden;
  color: #fa1011;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
}

.admin-topbar:not(.cg-shell) > .cg-shell-name {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: max-content;
  max-width: calc(100% - 22rem);
  transform: translate(-50%, -50%);
  text-align: center;
}

.admin-topbar:not(.cg-shell) > .cg-shell-name.is-compact {
  font-size: 1.15rem;
  max-width: calc(100% - 16rem);
}

.admin-topbar:not(.cg-shell) > .cg-shell-name.is-hidden {
  display: none;
}

.admin-topbar.cg-shell .cg-shell-tools {
  margin-left: 0;
}

.cg-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #1a1d26;
  font-size: 1.55rem;
  line-height: 1;
}

.cg-icon-btn:hover,
.cg-icon-btn:focus-visible {
  background: #fff;
  color: #e10600;
}

.cg-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 180px;
  height: 46px;
  padding: 0 18px;
  border: 1px solid #eef1f6;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(26, 29, 38, 0.04);
}

.cg-search i {
  color: #e10600;
  font-size: 1rem;
}

.cg-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1a1d26;
  font: inherit;
  font-size: 0.92rem;
}

.cg-search input::placeholder {
  color: #b0b7c6;
}

.cg-shell-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.cg-shell .admin-header-bell {
  position: relative;
  top: auto;
  right: auto;
  width: 44px;
  height: 44px;
  border: 1px solid #f3d2d2;
  background: #fff;
  color: #e10600;
  box-shadow: 0 6px 16px rgba(26, 29, 38, 0.04);
}

.cg-userchip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 5px 16px 5px 5px;
  border: 1px solid #eef1f6;
  border-radius: 999px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(26, 29, 38, 0.04);
}

.cg-userchip small,
.cg-userchip strong {
  display: block;
  line-height: 1.15;
}

.cg-userchip small {
  color: #9aa3b5;
  font-size: 0.68rem;
  font-weight: 600;
}

.cg-userchip strong {
  color: #1a1d26;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.cg-userchip .cg-avatar {
  width: 36px;
  height: 36px;
  font-size: 1rem;
}

.admin-content-body.cg-dashboard {
  padding: 28px 40px 56px;
  background: #f4f6fb;
}

.cg-dashboard .cg-hero {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cg-dashboard .cg-hero:not(.cg-hero-sales):hover,
.cg-dashboard .cg-hero:not(.cg-hero-sales):focus {
  box-shadow: 0 16px 34px rgba(26, 29, 38, 0.08);
}

.cg-dashboard .cg-hero-sales .cg-hero-go {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.cg-dashboard .cg-hero-sales::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -52px;
  width: 230px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.cg-page-head p.rpt-intro {
  align-items: flex-start;
  max-width: 68ch;
  line-height: 1.45;
}

.rpt-intro .cg-accent-dash {
  flex: 0 0 auto;
  margin-top: 0.45em;
}

.cg-hero-line.is-amber {
  background: linear-gradient(90deg, #e0a020, #ffe3a8);
}

.cg-hero-line.is-rose {
  background: linear-gradient(90deg, #ff5d73, #ffb3bc);
}

.rpt-panel {
  margin-top: 16px;
}

.rpt-list {
  margin: 8px -18px -4px;
}

.rpt-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 18px 12px;
  color: #8b93a7;
  font-size: 0.92rem;
  font-weight: 600;
}

.rpt-empty i {
  color: #1f9d4d;
  font-size: 1.15rem;
}

.rpt-watch {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) minmax(168px, 260px);
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid #f1f3f7;
  color: inherit;
  text-decoration: none;
}

.rpt-watch:hover,
.rpt-watch:focus {
  background: #fff7f7;
  color: inherit;
}

.rpt-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff0f0;
  color: #e10600;
  font-size: 1.05rem;
}

.rpt-mark.is-bad {
  background: #1a1d26;
  color: #fff;
}

.rpt-watch-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.rpt-watch strong {
  color: #1a1d26;
  font-size: 0.98rem;
  font-weight: 800;
}

.rpt-watch small {
  color: #8b93a7;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
}

.rpt-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rpt-track {
  flex: 1 1 auto;
  height: 10px;
  border-radius: 99px;
  background: #f0f2f6;
  overflow: hidden;
}

.rpt-fill {
  display: block;
  height: 100%;
  min-width: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #ff8a9b, #e10600);
}

.rpt-fill.is-bad {
  background: #1a1d26;
}

.rpt-pct {
  flex: 0 0 46px;
  color: #9aa3b5;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rpt-watch:focus-visible {
  outline: 2px solid #e10600;
  outline-offset: -2px;
}

@media (max-width: 767.98px) {
  .rpt-watch {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .rpt-meter {
    grid-column: 1 / -1;
  }
}

.cg-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.cg-page-head h1 {
  margin: 0;
  color: #1a1d26;
  font-size: 1.72rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.cg-page-head p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
  color: #8b93a7;
  font-size: 0.92rem;
  font-weight: 600;
}

.cg-accent-dash {
  width: 18px;
  height: 3px;
  border-radius: 99px;
  background: #e10600;
}

.cg-page-head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cg-chip,
.cg-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #eef1f6;
  border-radius: 12px;
  background: #fff;
  color: #3c4353;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(26, 29, 38, 0.04);
  white-space: nowrap;
}

a.cg-chip {
  text-decoration: none;
}

a.cg-chip:hover,
a.cg-chip:focus {
  color: #e10600;
  border-color: #ffd2d2;
}

.cg-chip i {
  color: #e10600;
}

.cg-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e10600;
  box-shadow: 0 0 0 0 rgba(225, 6, 0, 0.55);
  animation: cg-pulse 1.6s ease-out infinite;
}

@keyframes cg-pulse {
  70% { box-shadow: 0 0 0 7px rgba(225, 6, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(225, 6, 0, 0); }
}

.cg-heroes,
.cg-metrics,
.cg-charts {
  display: grid;
  gap: 16px;
}

.cg-heroes {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cg-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 16px;
}

.admin-content-body.cg-dashboard .cg-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cg-charts {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  margin-top: 16px;
}

.cg-hero,
.cg-metric,
.cg-panel {
  border: 1px solid #eef1f6;
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 29, 38, 0.045);
}

.cg-hero,
.cg-metric {
  color: inherit;
  text-decoration: none;
}

.cg-hero:hover,
.cg-metric:hover,
.cg-hero:focus,
.cg-metric:focus {
  color: inherit;
  text-decoration: none;
  transform: translateY(-2px);
}

.cg-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 178px;
  padding: 18px 18px 16px;
  overflow: hidden;
  border-radius: 22px;
}

.cg-hero-sales {
  border: 0;
  color: #fff;
  background: linear-gradient(145deg, #ff3d32 0%, #e10600 46%, #b40000 100%);
  box-shadow: 0 16px 32px rgba(225, 6, 0, 0.28);
}

.cg-hero-sales:hover,
.cg-hero-sales:focus {
  color: #fff;
}

.cg-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.cg-hero-icon,
.cg-metric-ico,
.cg-hero-go,
.cg-card-ico {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.cg-hero-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff0f0;
  color: #e10600;
  font-size: 1.15rem;
}

.cg-hero-sales .cg-hero-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.cg-hero-go {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff5f5;
  color: #e10600;
  font-size: 0.85rem;
}

.cg-kicker {
  display: block;
  margin-top: 16px;
  color: #8b93a7;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cg-hero-sales .cg-kicker {
  color: rgba(255, 255, 255, 0.88);
}

.cg-hero strong {
  margin-top: 6px;
  color: #1a1d26;
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.cg-hero-sales strong {
  color: #fff;
  font-size: 2.45rem;
}

.cg-hero strong.is-hot {
  color: #e10600;
}

.cg-hero strong.is-money,
.cg-hero-sales strong.is-money {
  font-size: 1.72rem;
  line-height: 1.08;
}

.cg-metric strong.is-money {
  font-size: 1.08rem;
}

.cg-hero-sub,
.cg-hero-meta {
  margin-top: 8px;
  color: #8b93a7;
  font-size: 0.82rem;
  font-weight: 600;
}

.cg-hero-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.92);
}

.cg-hero-line {
  width: 68%;
  height: 3px;
  margin-top: auto;
  border-radius: 99px;
  background: linear-gradient(90deg, #e10600, #ffb4b4);
}

.cg-hero-wave {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 68%;
  height: 82%;
  pointer-events: none;
}

.cg-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 122px;
  padding: 16px 14px 14px;
  border-radius: 20px;
}

.cg-metric-copy {
  min-width: 0;
}

.cg-metric .cg-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
}

.cg-metric-ico {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffe8e8;
  color: #e10600;
  font-size: 0.82rem;
}

.cg-metric strong {
  display: block;
  margin-top: 10px;
  color: #1a1d26;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.cg-metric strong.is-hot,
.cg-metric-sub.is-hot {
  color: #e10600;
}

.cg-metric-sub {
  display: flex;
  align-items: center;
  margin-top: 8px;
  color: #8b93a7;
  font-size: 0.74rem;
  font-weight: 600;
}

.cg-metric-sub.is-up {
  color: #1f9d4d;
}

.cg-metric-sub.is-amber {
  color: #d89a14;
}

.cg-spark {
  width: 74px;
  height: 36px;
  flex: 0 0 auto;
}

.cg-panel {
  min-width: 0;
  padding: 18px 18px 16px;
  border-radius: 22px;
}

.cg-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.cg-card-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #1a1d26;
  font-size: 1.02rem;
  font-weight: 800;
}

.cg-card-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #ffe8e8;
  color: #e10600;
  font-size: 0.9rem;
}

.cg-chart-frame {
  height: 286px;
}

.cg-empty {
  margin: 28px 0;
  color: #8b93a7;
  text-align: center;
}

.cg-bars {
  display: grid;
  gap: 14px;
}

.cg-bar-row,
.cg-bar-scale {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 54px;
  gap: 12px;
  align-items: center;
}

.cg-panel.is-money-bars .cg-bar-row,
.cg-panel.is-money-bars .cg-bar-scale {
  grid-template-columns: 148px minmax(0, 1fr) 108px;
}

.cg-bar-label {
  color: #4b5568;
  font-size: 0.86rem;
  font-weight: 600;
}

.cg-bar-track {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 22px;
}

.cg-bar-fill {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.cg-bar-fill.is-light {
  color: #9a3030;
}

.cg-bar-pct {
  color: #9aa3b5;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
}

.cg-bar-scale {
  margin-top: 8px;
}

.cg-bar-ticks {
  display: flex;
  justify-content: space-between;
  color: #b0b7c6;
  font-size: 0.72rem;
  font-weight: 600;
}

.cg-dashboard .admin-table-card {
  margin-top: 16px;
  border-color: #eef1f6;
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(26, 29, 38, 0.045);
}

.cg-dashboard .admin-table:not(.catalogue-table):not(.orders-live-table):not(.inventory-editor-table):not(.inventory-line-table):not(.click-line-table) {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.cg-dashboard .admin-table th,
.cg-dashboard .admin-table td {
  white-space: normal;
}

.cg-dashboard .ar-row-actions {
  flex-wrap: nowrap;
}

.cg-dashboard .ar-row-actions .btn {
  white-space: nowrap;
}

.cg-hero:focus-visible,
.cg-metric:focus-visible,
.cg-userchip:focus-visible,
.cg-icon-btn:focus-visible,
.cg-search:focus-within {
  outline: 2px solid #e10600;
  outline-offset: 2px;
}

@media (min-width: 992px) {
  .admin-sidebar,
  .admin-main-wrapper {
    transition: transform 0.25s ease, margin-left 0.25s ease, width 0.25s ease;
  }

  body.is-sidebar-collapsed .admin-sidebar {
    transform: translateX(-100%);
  }

  body.is-sidebar-collapsed .admin-main-wrapper {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 1399.98px) {
  .cg-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1199.98px) {
  .cg-heroes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cg-charts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  body:has(.cg-shell) #adminMenuToggle {
    display: none;
  }

  .admin-topbar.cg-shell {
    padding-left: 16px !important;
  }
}

@media (max-width: 767.98px) {
  .admin-content-body.cg-dashboard {
    padding: 8px 14px 28px;
  }

  .cg-page-head {
    flex-wrap: wrap;
  }

  .admin-topbar.cg-shell {
    flex-wrap: nowrap;
  }

  .cg-shell-name {
    display: none;
  }

  .cg-heroes,
  .cg-metrics,
  .admin-content-body.cg-dashboard .cg-metrics {
    grid-template-columns: 1fr;
  }

  .cg-search {
    flex: 1 1 100%;
    order: 3;
  }

  .cg-shell-tools {
    margin-left: auto;
  }

  .cg-userchip strong {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cg-bar-row,
  .cg-bar-scale {
    grid-template-columns: 92px minmax(0, 1fr) 48px;
    gap: 8px;
  }

  .cg-panel.is-money-bars .cg-bar-row,
  .cg-panel.is-money-bars .cg-bar-scale {
    grid-template-columns: 108px minmax(0, 1fr) 92px;
  }

  .cg-hero strong.is-money,
  .cg-hero-sales strong.is-money {
    font-size: 1.45rem;
  }

  .cg-hero strong,
  .cg-hero-sales strong {
    font-size: 2rem;
  }
}

.ar-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ar-guide div,
.ar-stat,
.ar-detail,
.ar-soa,
.ar-balance-report,
.ar-empty-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 16px;
}

.ar-guide div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  padding: 14px 16px;
}

.ar-guide span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff1f1;
  color: #e10600;
  font-weight: 800;
}

.ar-guide strong,
.ar-detail h2,
.ar-soa h2,
.ar-balance-report h2 {
  font-weight: 800;
}

.ar-guide p,
.ar-card-head p,
.ar-hint,
.ar-meta,
.ar-note {
  margin: 0;
  color: #6b7280;
  font-size: 0.86rem;
}

.ar-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ar-stat {
  padding: 16px 18px;
}

.ar-stat span,
.ar-kicker,
.ar-detail-balance span {
  display: block;
  color: #8b93a7;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ar-stat strong,
.ar-detail-balance strong {
  display: block;
  margin-top: 6px;
  font-size: 1.45rem;
  font-weight: 800;
}

.ar-stat em,
.ar-detail-balance em {
  color: #8b93a7;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 650;
}

.ar-stat-action {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ar-card-head,
.ar-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}

.ar-form-card .ar-card-head,
.ar-form-foot {
  padding-left: 0;
  padding-right: 0;
}

.ar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  padding: 8px 12px;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  background: #f8f9fc;
}

.ar-search input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
}

.ar-row-actions,
.ar-filters {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ar-filters {
  flex-wrap: wrap;
  align-items: center;
}

.ar-filters .form-control {
  min-width: 220px;
}

.ar-date-field {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 700;
}

.ar-filters .ar-date {
  min-width: 148px;
  width: 148px;
}

.ar-balance {
  font-weight: 800;
}

.ar-empty {
  padding: 28px 16px !important;
  text-align: center;
  color: #8b93a7;
}

.ar-pill {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef1f6;
  color: #3c4353;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
}

.ar-pill-open { background: #fff1f1; color: #c40000; }
.ar-pill-partial { background: #fff6e8; color: #9a6200; }
.ar-pill-paid,
.ar-pill-posted { background: #eefbf3; color: #0f7a45; }
.ar-pill-void { background: #f3f4f6; color: #6b7280; }

.admin-table tr.ar-row-void td {
  color: #6b7280;
}

.ar-link {
  color: #e10600;
  font-weight: 800;
  text-decoration: none;
}

.ar-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ar-choice {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  cursor: pointer;
}

.ar-choice input { margin-bottom: 4px; }
.ar-choice span { color: #6b7280; font-size: 0.86rem; }
.ar-choice.is-on {
  border-color: #e10600;
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.12);
}

.ar-lines input,
.ar-void-form {
  min-width: 110px;
}

.ar-finder-search {
  display: block;
}

.ar-finder-search span,
.ar-finder-kicker {
  display: block;
  margin-bottom: 6px;
  color: #667085;
  font-size: 0.78rem;
  font-weight: 800;
}

.ar-finder-search input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #d5dbe6;
  border-radius: 14px;
  background: #fff;
  font-size: 1rem;
}

.ar-finder-search input:focus {
  border-color: #e10600;
  outline: 3px solid rgba(225, 6, 0, 0.12);
}

.ar-finder-results {
  margin-top: 10px;
  max-height: 440px;
  overflow: auto;
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
}

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

.ar-finder-table th,
.ar-finder-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef1f6;
  vertical-align: middle;
  font-size: 0.92rem;
}

.ar-finder-table th {
  position: sticky;
  top: 0;
  background: #f7f8fb;
  color: #8b93a7;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ar-finder-table th:first-child,
.ar-finder-table td:first-child {
  width: 44px;
  text-align: center;
}

.ar-finder-table th.num,
.ar-finder-table td.num {
  text-align: right;
  white-space: nowrap;
}

.ar-finder-table tr.is-checked {
  background: #fff6f6;
}

.ar-finder-table tbody tr {
  cursor: pointer;
}

.ar-finder-product {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

.ar-finder-product strong,
.ar-finder-pick strong {
  display: block;
  font-weight: 800;
}

.ar-finder-product small,
.ar-finder-pick small {
  color: #667085;
}

.ar-finder-photo {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 12px;
  object-fit: cover;
  background: #f3f4f6;
  border: 1px solid #eef1f6;
}

.ar-finder-photo.is-empty {
  display: grid;
  place-items: center;
  color: #9aa3b5;
  font-size: 1.15rem;
}

.ar-finder-qty,
.ar-finder-price {
  width: 92px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid #d5dbe6;
  border-radius: 8px;
  text-align: right;
}

.ar-finder-price.is-locked {
  background: #f7f8fb;
  color: #1f2937;
}

.ar-finder-price-amount {
  display: block;
  font-weight: 800;
}

.ar-finder-price-tag {
  display: block;
  margin-top: 2px;
  color: #8b93a7;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ar-finder[data-price-label="Wholesale"] .ar-finder-pick {
  grid-template-columns: 52px minmax(0, 1fr) 88px max-content max-content max-content;
}

.ar-finder-price-wrap {
  display: grid;
  gap: 2px;
  justify-items: end;
}

.ar-finder-price-wrap .ar-finder-price-tag {
  margin-top: 0;
}

.ar-finder-check {
  width: 18px;
  height: 18px;
  accent-color: #e10600;
}

.ar-finder-note,
.ar-finder-empty {
  margin: 10px 0 0;
  color: #667085;
}

.ar-finder-picked {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.ar-finder-pick {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 92px 92px auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  background: #fff;
}

.ar-finder-amount {
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
  padding-left: 8px;
}

.ar-finder-remove {
  border: 0;
  background: transparent;
  color: #e10600;
  font-weight: 700;
}

@media (max-width: 760px) {
  .ar-finder-pick {
    grid-template-columns: 52px minmax(0, 1fr) auto;
  }

  .ar-finder-qty,
  .ar-finder-price,
  .ar-finder-price-wrap,
  .ar-finder-amount,
  .ar-finder-remove {
    grid-column: 2;
  }
}

.ar-pick {
  position: relative;
  min-width: 260px;
}

.ar-results {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow: auto;
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(26, 29, 38, 0.12);
}

.ar-results button,
.ar-results p {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
  color: #1a1d26;
  font-size: 0.86rem;
  text-align: left;
}

.ar-results button:hover {
  background: #fff4f4;
}

.ar-pick small {
  display: block;
  margin-top: 4px;
  color: #0f7a45;
  font-weight: 700;
}

.ar-void-form {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.ar-form-foot {
  margin-top: 16px;
}

.ar-form-foot span {
  margin-right: 12px;
  font-weight: 800;
}

.ar-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3c4353;
  font-weight: 650;
}

.ar-detail {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 20px;
}

.ar-detail h2 { margin: 4px 0; }
.ar-detail-balance { text-align: right; }
.ar-back { margin-bottom: 12px; }
.ar-back a { color: #6b7280; font-weight: 700; text-decoration: none; }
.ar-actions .ar-hint { margin-top: 8px; }
.ar-apply { margin: 16px 0 8px; }

.collect-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.collect-mode {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  background: #fff;
  color: #1a1d26;
  text-decoration: none;
}

.collect-mode strong {
  font-size: 1rem;
}

.collect-mode span {
  color: #6b7280;
  font-size: 0.86rem;
  font-weight: 650;
}

.collect-mode.is-on {
  border-color: #e10600;
  background: #fff8f8;
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.08);
}

.collect-mode.is-on strong {
  color: #e10600;
}

.collect-customer-locked:disabled {
  color: #111827;
  background: #f3f4f6;
  opacity: 1;
  cursor: not-allowed;
}

.collect-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.collect-step > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff1f1;
  color: #e10600;
  font-weight: 800;
}

.collect-step-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.collect-step-title strong,
.collect-kicker,
.collect-amount span,
.collect-date span,
.collect-ref span,
.collect-note span {
  color: #667085;
  font-size: 0.78rem;
  font-weight: 800;
}

.collect-help,
.collect-empty,
.collect-ref small {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 0.86rem;
}

.collect-charges {
  display: grid;
  gap: 10px;
  max-height: 520px;
  margin-top: 10px;
  overflow: auto;
}

.collect-order-head,
.collect-order {
  display: grid;
  grid-template-columns: 18px minmax(0, 1.5fr) minmax(150px, 0.7fr) 180px;
  gap: 12px;
  align-items: center;
}

.collect-order-head {
  padding: 0 14px;
  color: #667085;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.collect-order {
  align-items: start;
  padding: 12px 14px;
  border: 1px solid #86efac;
  border-radius: 14px;
  background: #f7fef9;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.08);
}

.collect-order .collect-check {
  margin-top: 3px;
}

.collect-order.is-on {
  border-color: #e10600;
  background: #fff8f8;
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.08);
}

.collect-order-no {
  display: block;
  color: #111827;
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.collect-order-main small {
  display: block;
  margin-top: 2px;
  color: #667085;
  font-size: 0.78rem;
  font-weight: 700;
}

.collect-order-products {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  color: #3c4353;
  font-size: 0.82rem;
  font-weight: 650;
}

.collect-order-products li + li {
  margin-top: 2px;
}

.collect-remarks-btn {
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px solid #d7dbe3;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-size: 0.78rem;
  font-weight: 800;
}

.collect-remarks-btn:hover,
.collect-remarks-btn:focus {
  border-color: #e10600;
  color: #e10600;
  outline: 3px solid rgba(225, 6, 0, 0.12);
}

.collect-order-figures {
  display: grid;
  gap: 2px;
  color: #3c4353;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
}

.collect-order-figures b {
  color: #111827;
  font-weight: 800;
}

.collect-order-figures .collect-balance {
  color: #c40000;
}

.collect-bill {
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.collect-bill header {
  padding: 8px 14px;
  background: #f7f8fb;
  color: #667085;
  font-size: 0.78rem;
  font-weight: 800;
}

.collect-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 180px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid #eef1f6;
}

.collect-bill.is-due {
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.collect-bill.is-due header {
  background: #f0fdf4;
  color: #166534;
}

.collect-item.is-due,
.collect-item.is-on {
  background: #f7fef9;
}

.collect-bill.is-due header .collect-balance,
.collect-figures b.collect-balance {
  color: #c40000;
}

.collect-item-name small.collect-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 4px;
  color: #3c4353;
  font-size: 0.82rem;
  font-weight: 700;
}

.collect-figures b {
  color: #111827;
  font-weight: 800;
}

.collect-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #86efac;
  border-radius: 14px;
  background: #f0fdf4;
  color: #166534;
  font-weight: 800;
}

.collect-total strong {
  color: #111827;
  font-size: 1.15rem;
}

.collect-report {
  margin-top: 10px;
}

.collect-report-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #1d4ed8;
  border-radius: 10px;
  background: #fff;
  color: #1d4ed8;
  font-weight: 800;
  text-decoration: none;
}

.collect-report-btn:hover {
  background: #eff6ff;
  color: #1e3a8a;
}

#collectOwed {
  color: #111827;
  font-size: 1rem;
}

.collect-item-name strong,
.collect-item-name small {
  display: block;
}

.collect-item-name small {
  color: #667085;
}

.collect-item-pay span {
  display: block;
  margin-bottom: 4px;
  color: #667085;
  font-size: 0.72rem;
  font-weight: 800;
}

.collect-item-pay div {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #d5dbe6;
  border-radius: 10px;
  background: #fff;
}

.collect-item.is-on .collect-item-pay div {
  border-color: #e10600;
}

.collect-item-pay div:focus-within {
  border-color: #e10600;
  outline: 3px solid rgba(225, 6, 0, 0.12);
}

.collect-item-pay b {
  color: #98a2b3;
  font-weight: 800;
}

.collect-item-pay input {
  width: 100%;
  border: 0;
  background: transparent;
  font-weight: 800;
  text-align: right;
  outline: none;
}

.collect-note {
  display: block;
  margin-top: 14px;
}

.collect-note input {
  width: 100%;
}

.collect-paid-items {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font-weight: 500;
}

.collect-paid-items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #3c4353;
  font-size: 0.8rem;
}

.collect-paid-items b {
  font-weight: 800;
  white-space: nowrap;
}

.collect-product {
  min-width: 160px;
  max-width: 280px;
}

.collect-products {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #3c4353;
  font-size: 0.84rem;
  font-weight: 650;
}

.collect-products li + li {
  margin-top: 3px;
}

.collect-charge {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.collect-charge:has(.collect-check:checked) {
  border-color: #e10600;
  background: #fff8f8;
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.08);
}

.collect-check {
  width: 18px;
  height: 18px;
  accent-color: #e10600;
}

.collect-charge-body strong {
  display: block;
  font-weight: 800;
}

.collect-charge-body small,
.collect-charge-owed small {
  color: #667085;
}

.collect-charge-body ul {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  color: #667085;
  font-size: 0.82rem;
}

.collect-charge-owed {
  text-align: right;
}

.collect-charge-owed b {
  display: block;
  font-weight: 800;
}

.collect-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr);
  gap: 12px;
}

.collect-grid + .collect-kicker,
.collect-methods + .collect-grid {
  margin-top: 14px;
}

.collect-follow {
  margin-top: 18px;
}

.collect-kicker {
  display: block;
  margin-bottom: 8px;
}

.collect-amount div {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  margin-top: 6px;
  padding: 0 14px;
  border: 1px solid #d5dbe6;
  border-radius: 14px;
  background: #fff;
}

.collect-amount div:focus-within {
  border-color: #e10600;
  outline: 3px solid rgba(225, 6, 0, 0.12);
}

.collect-amount b {
  color: #98a2b3;
  font-size: 1.2rem;
}

.collect-amount input {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  font-weight: 800;
  outline: none;
}

.collect-date input,
.collect-note input,
.collect-ref input {
  margin-top: 6px;
}

.collect-date input,
.collect-note input,
.collect-ref input {
  height: 52px;
}

.collect-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.collect-method {
  position: relative;
}

.collect-method input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.collect-method span {
  display: block;
  min-width: 92px;
  padding: 10px 14px;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  background: #fff;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.collect-method input:checked + span {
  border-color: #e10600;
  background: #fff1f1;
  color: #c40000;
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.12);
}

.collect-method input:focus-visible + span {
  outline: 2px solid #e10600;
  outline-offset: 2px;
}

.collect-ref .form-control {
  font-weight: 800;
  letter-spacing: 0.02em;
  background: #f8f9fc;
}

.collect-save {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #eef1f6;
}

.collect-save .btn {
  min-width: 180px;
  padding: 12px 18px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .collect-grid,
  .collect-save {
    grid-template-columns: 1fr;
    display: grid;
  }

  .collect-order-head {
    display: none;
  }

  .collect-charge,
  .collect-item,
  .collect-order {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .collect-order-figures,
  .collect-order .collect-item-pay {
    grid-column: 2;
  }

  .collect-order-figures {
    text-align: left;
  }

  .collect-item-pay {
    grid-column: 2;
  }

  .collect-charge-owed {
    grid-column: 2;
    text-align: left;
  }

  .collect-save {
    text-align: left;
  }
}

.charge-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgba(17, 24, 39, 0.48);
}

.charge-modal[hidden] {
  display: none;
}

.charge-modal-card {
  width: min(560px, 100%);
  padding: 22px 22px 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.24);
}

.charge-modal-head,
.charge-modal-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.charge-modal-head h6 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.charge-modal-head p {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 0.86rem;
}

.charge-modal-close {
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 1.6rem;
  line-height: 1;
}

.charge-figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  background: #f8f9fc;
}

.charge-figures > div,
.charge-figures > label {
  min-width: 0;
  text-align: center;
}

.charge-figures span,
.charge-fields span,
.charge-pay > span {
  display: block;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.charge-figures span {
  text-align: center;
}

.charge-figures strong,
.charge-figures input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 1.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-align: center;
  outline: none;
  appearance: none;
}

.charge-figures strong {
  color: #e10600;
}

.charge-figures label strong,
.charge-figures label input {
  color: #1d4ed8;
}

.charge-figures div:last-child strong {
  color: #15803d;
}

.charge-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.charge-fields label,
.charge-pay {
  display: block;
}

.charge-fields input,
.charge-pay div {
  width: 100%;
  height: 46px;
  margin-top: 6px;
  padding: 0 12px;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  background: #fff;
  font-weight: 700;
}

.charge-fields input:focus {
  border-color: #e10600;
  outline: 3px solid rgba(225, 6, 0, 0.12);
}

.charge-fields input[readonly] {
  background: #f8f9fc;
  color: #111827;
}

.charge-pay {
  grid-column: 1 / -1;
}

.charge-pay div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff1f1;
  border-color: #fecaca;
}

.charge-pay b {
  color: #c40000;
  letter-spacing: 0.04em;
}

.charge-pay strong {
  font-size: 1.15rem;
}

.charge-modal-foot {
  align-items: center;
  justify-content: flex-end;
  margin-top: 18px;
}

.charge-modal-foot .btn {
  min-width: 148px;
  padding: 12px 16px;
  font-weight: 800;
}

@media (max-width: 640px) {
  .charge-figures,
  .charge-fields {
    grid-template-columns: 1fr;
  }

  .charge-modal-foot {
    display: grid;
  }
}

.ar-statement-page {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.ar-balance-report {
  max-width: none;
  padding: 28px 22px 24px;
  color: #1c1917;
}

.ar-br-head {
  text-align: center;
  margin-bottom: 18px;
}

.ar-br-logo {
  display: block;
  width: 200px;
  max-width: 70%;
  height: auto;
  margin: 0 auto 10px;
}

.ar-br-head h2 {
  margin: 0;
  color: #e10600;
  font-size: 1.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ar-br-kicker {
  margin: 8px 0 0;
  color: #111827;
  font-size: 1.2rem;
  font-weight: 800;
}

.ar-br-date {
  margin: 4px 0 0;
  color: #4b5563;
  font-size: 0.95rem;
}

.ar-br-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  margin: 0 0 14px;
  padding-top: 12px;
  border-top: 3px solid #e10600;
}

.ar-br-meta p {
  margin: 0;
  font-size: 1rem;
}

.ar-br-meta span,
.ar-br-customer {
  letter-spacing: 0.01em;
}

.ar-br-customer {
  text-transform: uppercase;
}

.ar-br-balance {
  text-align: right;
  white-space: nowrap;
}

.ar-br-balance strong {
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  color: #e10600;
}

.ar-br-scroll {
  overflow-x: auto;
}

.ar-br-ledger {
  overflow-x: clip;
}

.ar-br-ledger .ar-br-table {
  table-layout: fixed;
}

.ar-br-col-date { width: 11%; }
.ar-br-col-or { width: 12%; }
.ar-br-col-money { width: 10%; }
.ar-br-col-purchase { width: 24%; }

.ar-br-table.has-bod .ar-br-col-date { width: 9%; }
.ar-br-table.has-bod .ar-br-col-or { width: 10%; }
.ar-br-table.has-bod .ar-br-col-item { width: 16%; }
.ar-br-table.has-bod .ar-br-col-purchase { width: 16%; }
.ar-br-table.has-bod .ar-br-col-money { width: 12%; }
.ar-br-table.has-bod .ar-br-col-status { width: 15%; }
.ar-br-col-status { width: 18%; }

.ar-br-ledger .ar-br-table th,
.ar-br-ledger .ar-br-table td {
  padding: 8px;
  white-space: normal;
}

.ar-br-ledger .ar-br-table td.num,
.ar-br-ledger .ar-br-table tfoot th.num {
  white-space: nowrap;
}

.ar-br-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.ar-br-table th,
.ar-br-table td {
  padding: 9px 12px;
  border: 1px solid #d7dee7;
  font-size: 0.92rem;
  white-space: nowrap;
}

.ar-br-table thead th {
  background: #1f2937;
  color: #fff;
  font-weight: 700;
  text-align: left;
}

.ar-br-table thead th.num,
.ar-br-table tfoot th.num {
  text-align: right;
}

.ar-br-table .num {
  text-align: right;
}

.ar-br-table tbody tr:nth-child(even):not(.ar-br-earlier):not(.ar-br-bounced):not(.ar-br-bounced-settled):not(.ar-br-pdc):not(.ar-br-bod):not(.ar-br-has-bod):not(.ar-br-invoice-bod) td {
  background: #f8fafc;
}

.ar-br-earlier td {
  background: #fff6f6;
  font-weight: 700;
}

.ar-br-table tbody tr.ar-br-bounced td {
  background: #fee2e2;
  color: #7f1d1d;
}

.ar-br-table tbody tr.ar-br-bounced-settled td {
  background: #fff4e0;
  color: #7c4a03;
}

.ar-br-pay-note {
  margin: 0 0 10px;
  color: #6b7280;
  font-size: 0.88rem;
}

.ar-br-pay-result {
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 700;
}

.ar-br-table tfoot th {
  background: #fff1f1;
  border-top: 2px solid #e10600;
  font-weight: 800;
  text-align: left;
}

.ar-br-empty {
  text-align: center;
  color: #6b7280;
  white-space: normal;
}

.ar-empty-card { padding: 28px; color: #6b7280; }

@media (max-width: 1280px) {
  .ar-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .ar-guide,
  .ar-stats,
  .ar-choices,
  .collect-modes,
  .ar-detail,
  .ar-card-head,
  .ar-form-foot {
    grid-template-columns: 1fr;
    display: grid;
  }
  .ar-detail-balance { text-align: left; }
  .ar-balance-report { padding: 22px 16px 18px; }
  .ar-br-head h2 { font-size: 1.25rem; letter-spacing: 0.06em; }
  .ar-br-meta { display: grid; }
  .ar-br-balance { text-align: left; }
}

@media print {
  body.admin-layout .admin-sidebar,
  body.admin-layout .admin-topbar,
  body.admin-layout .admin-menu-toggle,
  body.admin-layout .admin-sidebar-backdrop,
  body.admin-layout .admin-section-tabs,
  body.admin-layout .admin-header-bell,
  body.admin-layout .admin-header-tools,
  body.admin-layout .admin-theme-switch,
  body.admin-layout .ar-no-print {
    display: none !important;
  }
  body.admin-layout .admin-main-wrapper {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  body.admin-layout .ar-statement-page {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  body.admin-layout .ar-balance-report {
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }

  body.admin-layout .ar-br-table thead th,
  body.admin-layout .ar-br-earlier td,
  body.admin-layout .ar-br-bounced td,
  body.admin-layout .ar-br-bounced-settled td,
  body.admin-layout .ar-br-table tfoot th,
  body.admin-layout .ar-br-table .nc-pill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.admin-layout .ar-br-sign b {
    border-bottom-color: #111;
  }
}

.ar-move {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ar-move article {
  padding: 14px 16px;
  border: 1px solid #e6e8ee;
  border-radius: 16px;
  background: #fff;
}

.ar-move span {
  display: block;
  color: #8b93a7;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ar-move strong {
  display: block;
  margin: 4px 0 8px;
  font-size: 1.25rem;
}

.ar-move p,
.ar-move ul {
  margin: 0;
  color: #6b7280;
  font-size: 0.84rem;
}

.ar-move ul {
  padding: 0;
  list-style: none;
}

.ar-move li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
}

.ar-move li b small {
  display: block;
  margin-top: 1px;
  color: #9aa3b5;
  font-size: 0.72rem;
  font-weight: 600;
}

.ar-move em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: #1f2937;
}

.ar-watch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ar-watch a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid #e6e8ee;
  border-radius: 999px;
  color: #374151;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.ar-watch a em {
  color: #9ca3af;
  font-style: normal;
}

.ar-watch a.is-on {
  border-color: #e10600;
  background: #fff1f1;
  color: #e10600;
}

.ar-watch a.is-on em {
  color: #e10600;
}

.ar-card-head:has(.ar-watch) {
  align-items: flex-start;
}

.ar-late {
  color: #e10600;
  font-weight: 800;
}

.ar-aging {
  max-width: 280px;
  color: #4b5563;
  font-size: 0.82rem;
  white-space: normal;
}

.ar-collect-products {
  max-width: 320px;
  white-space: normal;
}

.ar-tick-col {
  width: 52px;
  text-align: center;
}

.ar-aging-table tfoot th {
  background: #fff1f1;
  border-top: 2px solid #e10600;
}

.ar-br-table td.ar-br-status {
  white-space: nowrap;
}

.ar-br-ledger .ar-br-table td.ar-br-status {
  white-space: normal;
}

.ar-br-table td.ar-br-status .nc-pill {
  margin: 0 6px 4px 0;
}

.ar-br-pdc td {
  padding-top: 0;
  background: #fffaf3;
  border-top: 0;
}

.ar-br-ledger .ar-br-table td.ar-br-purchase {
  white-space: normal;
  vertical-align: top;
}

.ar-br-bod-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  color: #9f1239;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}

.ar-br-bod-col .ar-br-bod-amt {
  color: #111827;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.ar-br-cheques {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  align-items: baseline;
  padding: 0 0 8px;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: normal;
}

.ar-br-cheques strong {
  color: #92400e;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ar-br-cheques span {
  font-variant-numeric: tabular-nums;
}

.ar-br-cheque-amt {
  font-variant-numeric: tabular-nums;
}

.ar-br-table td.ar-br-status:has(.ar-br-cheques) {
  white-space: normal;
}

.ar-br-status .ar-br-cheques,
.ar-br-tenders {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-top: 6px;
  padding: 0;
}

.ar-br-table td.ar-br-item {
  white-space: normal;
  min-width: 160px;
  max-width: 280px;
}

.ar-br-ledger .ar-br-table td.ar-br-item {
  min-width: 0;
  max-width: none;
}

.ar-br-open-title {
  margin: 22px 0 8px;
  font-size: 1rem;
  font-weight: 800;
}

.ar-br-sign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 36px;
}

.ar-br-sign span {
  display: block;
  margin-bottom: 28px;
  color: #4b5563;
  font-size: 0.92rem;
}

.ar-br-sign b {
  display: block;
  border-bottom: 1px solid #9ca3af;
  height: 1px;
}

@media (max-width: 900px) {
  .ar-move,
  .ar-br-sign {
    grid-template-columns: 1fr;
  }
}

.nc-lead p {
  margin: 0 0 16px;
  color: #4b5563;
}

.nc-view {
  border-radius: 10px;
  font-weight: 700;
  padding: 4px 14px;
}

@media (min-width: 576px) {
  .modal-dialog.nc-dialog {
    max-width: 740px;
  }
}

.nc-modal {
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(16, 24, 40, 0.22);
}

.nc-modal-accent {
  height: 5px;
  background: linear-gradient(90deg, #e10600, #ff5a54);
}

.nc-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px 8px;
}

.nc-modal-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff1f1;
  color: #e10600;
  font-size: 1.25rem;
  flex: 0 0 auto;
}

.nc-modal-head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nc-modal-head p {
  margin: 2px 0 0;
  color: #8b93a7;
  font-size: 0.9rem;
}

.nc-modal-head .btn-close {
  margin-left: auto;
}

.nc-modal-body {
  padding: 8px 22px 18px;
}

.nc-sheet {
  border: 1px solid #e7ebf2;
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.nc-field {
  padding: 14px 16px 13px;
  border-bottom: 1px solid #eef1f6;
  min-width: 0;
}

.nc-field:nth-child(odd) {
  border-right: 1px solid #eef1f6;
}

.nc-field:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.nc-label {
  display: block;
  margin-bottom: 3px;
  color: #98a2b3;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nc-value {
  display: block;
  color: #1a1d26;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.nc-field-limit {
  background: #fff8f8;
}

.nc-field-limit .nc-value {
  color: #c40000;
  font-size: 1.12rem;
}

.nc-na {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  font-size: 0.82rem;
  font-weight: 800;
}

.nc-match,
.nc-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 14px;
  border-radius: 14px;
  padding: 12px 14px;
}

.nc-match {
  background: #f3f5f8;
  color: #3c4453;
}

.nc-match.is-hard,
.nc-check.is-bad {
  background: #fff4f4;
  color: #9f1239;
}

.nc-match i,
.nc-check i {
  font-size: 1.1rem;
  margin-top: 2px;
}

.nc-match strong,
.nc-check strong {
  display: block;
  margin-bottom: 2px;
}

.nc-match p,
.nc-check p {
  margin: 0;
  font-size: 0.92rem;
}

.nc-check.is-ok {
  background: #eefbf3;
  color: #157a3d;
}

.nc-check.is-na {
  background: #f6f7f9;
  color: #475467;
}

.nc-decide {
  margin-top: 14px;
}

.nc-note {
  display: block;
  margin-bottom: 6px;
  color: #667085;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nc-note span {
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.nc-decide textarea {
  width: 100%;
  min-height: 64px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  resize: vertical;
  background: #fbfcfe;
}

.nc-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.nc-btn {
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  border: 1px solid #d5dbe3;
  background: #fff;
  color: #1f2937;
}

.nc-btn:hover {
  background: #f8fafc;
}

.nc-btn:disabled,
.nc-btn-approve:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.nc-btn-approve {
  margin-left: auto;
  background: #1f2430;
  color: #fff;
  border-color: #1f2430;
  box-shadow: 0 8px 16px rgba(31, 36, 48, 0.18);
}

.nc-btn-approve:hover {
  background: #11141b;
  color: #fff;
}

.nc-table th:last-child,
.nc-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

.nc-name-open {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nc-name-open:hover strong {
  text-decoration: underline;
}

.nc-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}

.nc-pill.is-ok {
  background: #e8f7ee;
  color: #157a3d;
}

.nc-pill.is-warn {
  background: #fff6df;
  color: #946200;
}

.nc-pill.is-bad {
  background: #fee2e2;
  color: #b91c1c;
}

.nc-pill.is-new {
  background: #eef2ff;
  color: #3730a3;
}

.nc-pill.is-open {
  background: #eef1f4;
  color: #374151;
}

.nc-table .nc-pill {
  margin-left: 0;
}

.nc-table .nc-pill + .nc-pill {
  margin-left: 6px;
}

.nc-wait-badge {
  background: #eef2ff;
  color: #3730a3;
}

.nc-balance {
  color: #98a2b3;
  font-variant-numeric: tabular-nums;
}

.nc-balance.is-due {
  color: #9f1239;
  font-weight: 700;
}

.nc-fit {
  width: 100%;
  table-layout: fixed;
}

.nc-fit th:nth-child(2),
.nc-fit td:nth-child(2) {
  width: 110px;
}

.nc-fit th:nth-child(3),
.nc-fit td:nth-child(3),
.nc-fit th:nth-child(4),
.nc-fit td:nth-child(4) {
  width: 128px;
  white-space: nowrap;
}

.nc-fit th:nth-child(5),
.nc-fit td:nth-child(5) {
  width: 118px;
}

.nc-fit th:nth-child(6),
.nc-fit td:nth-child(6) {
  width: 232px;
  white-space: normal;
}

.nc-fit td:nth-child(1) .nc-meta {
  overflow-wrap: anywhere;
}

.nc-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
}

.nc-row-actions form {
  display: inline-flex;
  margin: 0;
}

.nc-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #d5dbe3;
  background: #fff;
  color: #1f2937;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.nc-act:hover {
  background: #f8fafc;
  color: #111827;
}

.nc-act.is-danger {
  color: #b91c1c;
  border-color: #fecaca;
}

.nc-act.is-danger:hover {
  background: #fff1f2;
  color: #9f1239;
}

.nc-meta {
  display: block;
  color: #9aa3b5;
  font-size: 0.78rem;
  font-weight: 600;
}

.nc-meta.nc-from {
  color: #16a34a;
  font-size: 0.92rem;
  font-weight: 700;
}

@media (max-width: 720px) {
  .nc-sheet {
    grid-template-columns: 1fr;
  }

  .nc-field:nth-child(odd) {
    border-right: 0;
  }

  .nc-field:nth-last-child(-n + 2) {
    border-bottom: 1px solid #eef1f6;
  }

  .nc-field:last-child {
    border-bottom: 0;
  }

  .nc-actions {
    flex-direction: column;
  }

  .nc-btn-approve {
    margin-left: 0;
  }
}

.dr-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dr-stats article {
  background: #fff;
  border: 1px solid #e7ebf2;
  border-radius: 16px;
  padding: 14px 16px;
}

.dr-stats span {
  display: block;
  color: #98a2b3;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dr-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
}

.dr-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}

.dr-tabs a {
  border-radius: 999px;
  padding: 8px 16px;
  color: #3f4c44;
  background: #fff;
  border: 1px solid #d5ddd8;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.dr-tabs a:hover {
  border-color: #86efac;
  color: #166534;
}

.dr-tabs a.is-on {
  background: #16a34a;
  border-color: #15803d;
  color: #fff;
  box-shadow: 0 1px 2px rgba(21, 128, 61, 0.35);
}

.dr-tabs a.is-on:hover {
  background: #15803d;
  border-color: #166534;
  color: #fff;
}

.dr-tabs em {
  font-style: normal;
  margin-left: 4px;
  opacity: 0.9;
}

.dr-no {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.dr-fit {
  table-layout: fixed;
  width: 100%;
}

.dr-fit th:nth-child(1),
.dr-fit td:nth-child(1) {
  width: 124px;
}

.dr-fit th:nth-child(3),
.dr-fit td:nth-child(3) {
  width: 176px;
  white-space: normal;
}

.dr-fit th:nth-child(5),
.dr-fit td:nth-child(5) {
  width: 148px;
  white-space: normal;
}

.dr-fit td:nth-child(5) strong,
.dr-fit td:nth-child(5) .nc-meta {
  display: block;
  white-space: nowrap;
}

.dr-fit th:nth-child(6),
.dr-fit td:nth-child(6) {
  width: 168px;
}

.dr-row-actions {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.dr-row-actions .dr-delete,
.dr-delete-row .dr-delete {
  margin: 0;
}

.dr-delete-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.dr-delete-row .btn {
  border-radius: 12px;
  font-weight: 700;
  padding: 10px 16px;
}

.dr-fit td:nth-child(4) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-dialog.dr-dialog {
  max-width: 920px;
}

.dr-add-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 0.8fr;
  gap: 12px;
  margin-top: 16px;
}

.dr-add-grid label,
.dr-add-amount {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.dr-add-grid span,
.dr-add-amount span {
  color: #667085;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dr-add-amount strong {
  display: flex;
  align-items: center;
  height: 38px;
  color: #9f1239;
  font-size: 1.05rem;
}

.dr-add-note {
  margin: 12px 0 0;
  color: #667085;
  font-size: 0.88rem;
}

.dr-add .ar-finder-results {
  max-height: 240px;
}

@media (max-width: 760px) {
  .dr-add-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.dr-receipt-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e7ebf2;
}

.dr-receipt-head strong,
.dr-receipt-head span {
  display: block;
}

.dr-receipt-head span {
  color: #667085;
  font-size: 0.92rem;
}

.dr-section {
  margin: 16px 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #98a2b3;
}

.dr-lines-wrap {
  border: 1px solid #e7ebf2;
  border-radius: 14px;
}

.dr-lines {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.dr-lines th,
.dr-lines td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef1f6;
  white-space: nowrap;
}

.dr-lines th:nth-child(3),
.dr-lines td:nth-child(3) {
  white-space: normal;
}

.dr-lines th {
  background: #f8fafc;
  color: #667085;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dr-lines tr:last-child td {
  border-bottom: 0;
}

.dr-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
  color: #475467;
  font-size: 0.9rem;
}

.dr-terms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.dr-terms label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.dr-terms span {
  color: #667085;
  font-size: 0.82rem;
  font-weight: 600;
}

.dr-terms span em {
  margin-left: 4px;
  color: #98a2b3;
  font-style: normal;
  font-weight: 600;
}

@media (max-width: 640px) {
  .dr-terms {
    grid-template-columns: 1fr;
  }
}

.dr-amount {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff8f8;
}

.dr-amount strong {
  display: block;
  color: #c40000;
  font-size: 1.7rem;
  line-height: 1.1;
}

.dr-amount em {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-style: normal;
  font-size: 0.88rem;
}

.dr-standing {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e7ebf2;
}

.dr-standing h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
}

.dr-standing-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.dr-standing-row span {
  color: #667085;
}

.dr-standing-row strong {
  font-size: 1.35rem;
}

.dr-bar {
  height: 10px;
  margin: 10px 0 6px;
  border-radius: 999px;
  background: #e6e8ee;
  overflow: hidden;
}

.dr-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #1f2430;
}

.dr-standing p,
.dr-after,
.dr-footnote,
.dr-warn {
  margin: 0;
  color: #667085;
  font-size: 0.9rem;
}

.dr-after {
  margin-top: 6px;
}

.dr-after.is-over,
.dr-warn {
  color: #b42318;
  font-weight: 700;
}

.dr-sign {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e7ebf2;
  color: #98a2b3;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dr-sign b {
  display: block;
  margin-top: 4px;
  color: #1a1d26;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
}

.dr-footnote {
  margin-top: 8px;
}

.dr-bounce-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff4f4;
  color: #9f1239;
}

.dr-bounce-alert i {
  margin-top: 2px;
  font-size: 1.15rem;
}

.dr-bounce-alert strong {
  display: block;
  margin-bottom: 2px;
}

.dr-bounce-alert p {
  margin: 2px 0 0;
  font-weight: 600;
}

@media (max-width: 720px) {
  .dr-stats,
  .dr-sign {
    grid-template-columns: 1fr;
  }

  .dr-tabs {
    justify-content: flex-start;
    width: 100%;
    margin-left: 0;
  }

  .dr-receipt-head {
    flex-direction: column;
  }

  .dr-receipt-head .text-end {
    text-align: left !important;
  }
}

.da-submit {
  width: 100%;
  margin-left: 0;
}

.modal-dialog.dr-paper-dialog {
  max-width: 860px;
}

.dr-paper-modal {
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #3a3a3a;
}

.dr-paper-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #2b2b2b;
  color: #fff;
}

.dr-paper-toolbar strong {
  margin-right: auto;
  font-size: 0.92rem;
  font-weight: 600;
}

.dr-paper-print {
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.85rem;
}

.dr-paper-print:hover {
  background: #fff;
  color: #111;
}

.dr-paper-stage {
  background: #4a4a4a;
  padding: 18px 18px 28px;
}

.dr-paper {
  width: min(100%, 740px);
  margin: 0 auto;
  padding: 28px 32px 22px;
  background: #fff;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.3;
}

.dr-paper-top {
  position: relative;
  min-height: 28px;
  margin-bottom: 16px;
  text-align: center;
}

.dr-paper-top h3 {
  margin: 0;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dr-paper-top span {
  position: absolute;
  top: 4px;
  right: 0;
  font-size: 13px;
}

.dr-paper-meta {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 0 28px;
}

.dr-paper-meta p {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  margin: 0 0 3px;
}

.dr-paper-meta b {
  font-weight: 700;
}

.dr-paper-meta b::after {
  content: " :";
  font-weight: 700;
}

.dr-paper-meta span {
  min-height: 1em;
}

.dr-paper-grid {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
}

.dr-paper-grid th {
  border: 1px solid #000;
  padding: 3px 6px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.dr-paper-grid td {
  padding: 5px 6px 1px;
  vertical-align: top;
}

.dr-paper-grid td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dr-paper-grid th:nth-child(1),
.dr-paper-grid td:nth-child(1) {
  width: 12%;
}

.dr-paper-grid th:nth-child(2),
.dr-paper-grid td:nth-child(2) {
  width: 12%;
}

.dr-paper-grid th:nth-child(4),
.dr-paper-grid td:nth-child(4),
.dr-paper-grid th:nth-child(5),
.dr-paper-grid td:nth-child(5) {
  width: 16%;
}

.dr-paper-dots {
  margin-top: 6px;
  border-bottom: 1px dotted #000;
}

.dr-paper-sum {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
}

.dr-paper-sum .amt,
.dr-paper-sum b {
  font-weight: 700;
}

.dr-paper-sign {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
  border: 1px solid #000;
  min-height: 58px;
}

.dr-paper-sign span {
  padding: 4px 8px 8px;
  border-right: 1px solid #000;
}

.dr-paper-sign span:last-child {
  border-right: 0;
}

.dr-paper-sign b {
  display: block;
  min-height: 22px;
  margin-top: 8px;
  font-weight: 600;
}

body.dr-print-body {
  margin: 12mm 14mm;
  background: #fff;
}

body.dr-print-body .dr-paper {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 720px) {
  .dr-paper {
    padding: 16px 12px 14px;
  }

  .dr-paper-top span {
    position: static;
    display: block;
    margin-top: 4px;
    text-align: right;
  }

  .dr-paper-meta,
  .dr-paper-sign {
    grid-template-columns: 1fr;
  }

  .dr-paper-sign span {
    border-right: 0;
    border-bottom: 1px solid #000;
  }

  .dr-paper-sign span:last-child {
    border-bottom: 0;
  }
}

.da-fit th:nth-child(3),
.da-fit td:nth-child(3) {
  width: 188px;
  white-space: normal;
}

.modal-dialog.da-dialog {
  max-width: 680px;
}

.da-no {
  margin: 4px 0 16px;
  padding: 14px 16px;
  border: 1px solid #e7ebf2;
  border-radius: 16px;
}

.da-no strong {
  display: block;
  margin-top: 2px;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
}

.da-no strong.da-pending {
  color: #98a2b3;
  font-size: 1rem;
  letter-spacing: 0;
}

.da-pair .da-no {
  margin: 0 0 16px;
}

.da-items {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.da-items li {
  padding: 8px 0;
  border-bottom: 1px solid #eef1f6;
  font-weight: 700;
}

.da-items li:last-child {
  border-bottom: 0;
}

.da-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.da-pair div {
  min-width: 0;
}

.da-exposure {
  margin-top: 14px;
}

.da-exposure h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
}

.da-exposure-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.da-exposure-row span {
  color: #667085;
}

.da-exposure-row strong {
  font-size: 1.15rem;
  text-align: right;
}

.da-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eefbf3;
  color: #157a3d;
  font-weight: 700;
}

.da-check.is-bad {
  background: #fff4f4;
  color: #9f1239;
}

.da-check.is-warn {
  background: #fff8eb;
  color: #92400e;
}

.da-check p {
  margin: 2px 0 0;
  font-weight: 600;
}

@media (max-width: 720px) {
  .da-pair,
  .da-exposure-row {
    grid-template-columns: 1fr;
    display: grid;
  }
}

.pe-filter {
  margin: -6px 0 14px;
  color: #475467;
}

.pe-filter a {
  font-weight: 700;
}

.modal-dialog.pe-dialog {
  max-width: 760px;
}

.pe-kicker {
  margin: 16px 0 8px;
  color: #98a2b3;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.pe-grid-3 {
  grid-template-columns: 1.1fr 1fr 1.1fr;
}

.pe-field {
  min-width: 0;
  margin: 0;
}

.pe-field > span:first-child,
.pe-field > .pe-label {
  display: block;
  margin-bottom: 4px;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 700;
}

.pe-field em {
  color: #98a2b3;
  font-style: normal;
  font-weight: 600;
}

.pe-field[hidden],
.pe-control[hidden],
.pe-cash-only[hidden],
.pe-check-only[hidden],
#peGeneric[hidden],
#peRoute[hidden],
#peReady[hidden],
#peReadyRefField[hidden],
#peReadyCheckField[hidden],
#peReadyFileField[hidden],
#peChecks[hidden],
#peOwe[hidden] {
  display: none !important;
}

.pe-file small {
  display: block;
  margin-top: 4px;
  color: #98a2b3;
  font-size: 0.75rem;
  font-weight: 600;
}

.pe-control,
.pe-field input,
.pe-field .form-select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
  color: #1a1d26;
  font-weight: 800;
  box-shadow: none;
}

.pe-field input,
.pe-field .form-select {
  padding: 8px 12px;
}

#peEntry {
  white-space: pre-line;
  height: auto;
}

.pe-locked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  line-height: 1.35;
}

.pe-locked b {
  min-width: 0;
  font-weight: 800;
  word-break: break-word;
}

.pe-locked i {
  color: #98a2b3;
  font-weight: 400;
}

.pe-money {
  position: relative;
}

.pe-money b {
  position: absolute;
  left: 12px;
  bottom: 10px;
  margin: 0;
  font-weight: 800;
  pointer-events: none;
}

.pe-money input {
  padding-left: 28px;
}

.pe-money input[readonly] {
  background: #f8fafc;
}

.pe-remain {
  margin: -4px 0 8px;
  color: #667085;
  font-size: 0.86rem;
  font-weight: 700;
}

.pe-note,
.pe-warn {
  margin: 0 0 8px;
  color: #9f1239;
  font-size: 0.86rem;
  font-weight: 700;
}

.pe-field input.pe-invalid,
.pe-field .form-select.pe-invalid {
  border-color: #e11d48;
}

.pe-collected {
  align-self: end;
  margin: 0;
  color: #667085;
  font-size: 0.86rem;
}

.pe-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.pe-foot p {
  margin: 0;
  color: #98a2b3;
  font-size: 0.78rem;
}

.pe-save {
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  background: #1f2937;
  color: #fff;
  font-weight: 800;
  padding: 10px 18px;
}

.pe-save:hover {
  background: #111827;
  color: #fff;
}

.pe-save:disabled,
.pe-save:disabled:hover {
  background: #e4e7ec;
  color: #98a2b3;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .pe-grid,
  .pe-grid-3,
  .pe-foot {
    grid-template-columns: 1fr;
    display: grid;
  }

  .pe-save {
    width: 100%;
  }
}

.cc-actions {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
}

.nc-meta.cc-when {
  color: #344054;
}

.nc-meta.cc-when.is-after-due {
  color: #b45309;
}

.cc-result {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475467;
}

tr.cc-bounced td {
  background: #f8fafc;
}

.admin-header-tools {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-header-tools[hidden] {
  display: none !important;
}

.admin-header-tools .admin-header-bell {
  position: relative;
  top: auto;
  right: auto;
}

.admin-topbar:not(.cg-shell) {
  padding-right: 392px !important;
}

.bridge-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.bridge-pills:hover,
.bridge-pills:focus-visible {
  text-decoration: none;
}

.bridge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e6e8ef;
  border-radius: 999px;
  background: #f4f6fb;
  color: #5c6578;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.bridge-pill i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #b0b6c3;
}

.bridge-pill b {
  font-weight: 700;
}

.bridge-pill.is-on {
  border-color: #b7e7c7;
  background: #e8f8ee;
  color: #0f7a3a;
}

.bridge-pill.is-on i {
  background: #12a150;
}

.bridge-pill.is-sync {
  border-color: #c9d7ff;
  background: #eef3ff;
  color: #27407a;
}

.bridge-pill.is-sync i {
  background: #2f6fed;
  animation: bridge-pulse 1s ease-in-out infinite;
}

.bridge-pill.is-wait {
  border-color: #f3ddb0;
  background: #fff6e8;
  color: #8a5a00;
}

.bridge-pill.is-wait i {
  background: #e0a100;
}

@keyframes bridge-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

@media (prefers-reduced-motion: reduce) {
  .bridge-pill.is-sync i {
    animation: none;
  }
}

@media (max-width: 767.98px) {
  .admin-topbar:not(.cg-shell) {
    padding-right: 214px !important;
  }

  .bridge-pill b {
    display: none;
  }

  .bridge-pill {
    width: 32px;
    justify-content: center;
    padding: 0;
  }
}

.cg-shell .admin-header-tools {
  position: relative;
  top: auto;
  right: auto;
}

.admin-theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 3px;
  border: 1px solid #f3d2d2;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(26, 29, 38, 0.04);
}

.cg-shell .admin-theme-switch {
  height: 44px;
  padding: 4px;
}

.admin-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8b93a7;
  font-size: 0.95rem;
  line-height: 1;
}

.cg-shell .admin-theme-btn {
  width: 36px;
  height: 36px;
}

.admin-theme-btn:hover,
.admin-theme-btn:focus-visible {
  background: #fff4f4;
  color: #e10600;
}

html:not([data-theme="dark"]) .admin-theme-btn[data-theme-value="light"],
html[data-theme="dark"] .admin-theme-btn[data-theme-value="dark"] {
  background: #e10600;
  color: #fff;
  box-shadow: 0 6px 14px rgba(225, 6, 0, 0.28);
}

html:not([data-theme="dark"]) .admin-theme-btn[data-theme-value="light"]:hover,
html[data-theme="dark"] .admin-theme-btn[data-theme-value="dark"]:hover,
html:not([data-theme="dark"]) .admin-theme-btn[data-theme-value="light"]:focus-visible,
html[data-theme="dark"] .admin-theme-btn[data-theme-value="dark"]:focus-visible {
  background: #c40000;
  color: #fff;
}

.admin-theme-btn:focus-visible {
  outline: 2px solid #e10600;
  outline-offset: 2px;
}

@media (max-width: 575.98px) {
  .cg-shell .admin-theme-switch,
  .admin-theme-switch {
    height: 40px;
    padding: 3px;
  }

  .cg-shell .admin-theme-btn,
  .admin-theme-btn {
    width: 32px;
    height: 32px;
  }
}

@media screen {
  html[data-theme="dark"] {
    color-scheme: dark;
  }

  html[data-theme="dark"] body.admin-layout {
    background-color: #101218;
    color: #e7e9ee;
  }

  html[data-theme="dark"] body.admin-layout.bg-light {
    background-color: #101218 !important;
  }

  html[data-theme="dark"] body.admin-layout .admin-sidebar {
    background: #161922;
    border-right-color: #2a2f3a;
    color: #e7e9ee;
    box-shadow: none;
  }

  html[data-theme="dark"] body.admin-layout .admin-sidebar .sidebar-link,
  html[data-theme="dark"] body.admin-layout .admin-sidebar .nav-link {
    color: #c5cad6;
  }

  html[data-theme="dark"] body.admin-layout .admin-sidebar .sidebar-link i,
  html[data-theme="dark"] body.admin-layout .admin-sidebar .nav-link i {
    color: #9aa3b5;
  }

  html[data-theme="dark"] body.admin-layout .admin-sidebar .sidebar-link:hover,
  html[data-theme="dark"] body.admin-layout .admin-sidebar .nav-link:hover {
    color: #ff6b66;
    background: rgba(225, 6, 0, 0.14);
  }

  html[data-theme="dark"] body.admin-layout .admin-sidebar .nav-link.active,
  html[data-theme="dark"] body.admin-layout .admin-sidebar .sidebar-link.active {
    color: #fff;
    background: linear-gradient(90deg, #e10600 0%, #ff2a2a 100%);
  }

  html[data-theme="dark"] body.admin-layout .cg-side-user {
    background: transparent;
  }

  html[data-theme="dark"] body.admin-layout .cg-side-user-copy strong,
  html[data-theme="dark"] body.admin-layout .cg-userchip strong,
  html[data-theme="dark"] body.admin-layout .cg-page-head h1,
  html[data-theme="dark"] body.admin-layout .cg-card-head h2,
  html[data-theme="dark"] body.admin-layout .cg-metric strong,
  html[data-theme="dark"] body.admin-layout .cg-hero:not(.cg-hero-sales) strong,
  html[data-theme="dark"] body.admin-layout .admin-topbar h5,
  html[data-theme="dark"] body.admin-layout .text-dark {
    color: #f2f4f8 !important;
  }

  html[data-theme="dark"] body.admin-layout .cg-hero strong.is-hot,
  html[data-theme="dark"] body.admin-layout .cg-metric strong.is-hot,
  html[data-theme="dark"] body.admin-layout .cg-metric-sub.is-hot {
    color: #ff5a54 !important;
  }

  html[data-theme="dark"] body.admin-layout .admin-topbar,
  html[data-theme="dark"] body.admin-layout .admin-topbar.cg-shell {
    background: #101218;
    border-bottom-color: #2a2f3a;
    box-shadow: none;
  }

  html[data-theme="dark"] body.admin-layout .cg-icon-btn {
    color: #e7e9ee;
  }

  html[data-theme="dark"] body.admin-layout .cg-icon-btn:hover,
  html[data-theme="dark"] body.admin-layout .cg-icon-btn:focus-visible {
    background: #1c2029;
    color: #ff6b66;
  }

  html[data-theme="dark"] body.admin-layout .admin-theme-switch,
  html[data-theme="dark"] body.admin-layout .cg-shell .admin-header-bell,
  html[data-theme="dark"] body.admin-layout .admin-header-bell,
  html[data-theme="dark"] body.admin-layout .cg-userchip,
  html[data-theme="dark"] body.admin-layout .cg-chip,
  html[data-theme="dark"] body.admin-layout .cg-live,
  html[data-theme="dark"] body.admin-layout .cg-search,
  html[data-theme="dark"] body.admin-layout .cg-hero:not(.cg-hero-sales),
  html[data-theme="dark"] body.admin-layout .cg-metric,
  html[data-theme="dark"] body.admin-layout .cg-panel,
  html[data-theme="dark"] body.admin-layout .admin-table-card,
  html[data-theme="dark"] body.admin-layout .stat-kpi-card,
  html[data-theme="dark"] body.admin-layout .filter-card,
  html[data-theme="dark"] body.admin-layout .payment-method-card,
  html[data-theme="dark"] body.admin-layout .payment-qr-admin-card,
  html[data-theme="dark"] body.admin-layout .staff-sidebar-option,
  html[data-theme="dark"] body.admin-layout .customer-address-line,
  html[data-theme="dark"] body.admin-layout .ar-guide div,
  html[data-theme="dark"] body.admin-layout .ar-stat,
  html[data-theme="dark"] body.admin-layout .ar-detail,
  html[data-theme="dark"] body.admin-layout .ar-soa,
  html[data-theme="dark"] body.admin-layout .ar-balance-report,
  html[data-theme="dark"] body.admin-layout .ar-empty-card,
  html[data-theme="dark"] body.admin-layout .ar-move article,
  html[data-theme="dark"] body.admin-layout .ar-watch a,
  html[data-theme="dark"] body.admin-layout .card,
  html[data-theme="dark"] body.admin-layout .modal-content,
  html[data-theme="dark"] body.admin-layout .dropdown-menu,
  html[data-theme="dark"] body.admin-layout .list-group-item,
  html[data-theme="dark"] body.admin-layout .offcanvas,
  html[data-theme="dark"] body.admin-layout .accordion-item,
  html[data-theme="dark"] body.admin-layout .accordion-button,
  html[data-theme="dark"] body.admin-layout .orders-search,
  html[data-theme="dark"] body.admin-layout .orders-filter-chip,
  html[data-theme="dark"] body.admin-layout .orders-more-panel,
  html[data-theme="dark"] body.admin-layout .bg-white,
  html[data-theme="dark"] body.admin-layout .bg-light {
    background-color: #1c2029 !important;
    border-color: #313644 !important;
    color: #e7e9ee;
    box-shadow: none;
  }

  html[data-theme="dark"] body.admin-layout .admin-table-card > .bg-light {
    background-color: #242833 !important;
    border-color: #313644 !important;
    color: #f2f4f8;
  }

  html[data-theme="dark"] body.admin-layout .dr-tabs a {
    background: #2a3140;
    border-color: #3d4556;
    color: #e7e9ee;
  }

  html[data-theme="dark"] body.admin-layout .dr-tabs a:hover {
    border-color: #4ade80;
    color: #bbf7d0;
  }

  html[data-theme="dark"] body.admin-layout .dr-tabs a.is-on,
  html[data-theme="dark"] body.admin-layout .dr-tabs a.is-on:hover {
    background: #16a34a;
    border-color: #22c55e;
    color: #fff;
  }

  html[data-theme="dark"] body.admin-layout .cg-hero-sales,
  html[data-theme="dark"] body.admin-layout .cg-hero-sales:hover,
  html[data-theme="dark"] body.admin-layout .cg-hero-sales:focus {
    background: linear-gradient(145deg, #ff3d32 0%, #e10600 46%, #b40000 100%) !important;
    border-color: transparent !important;
    color: #fff;
  }

  html[data-theme="dark"] body.admin-layout .cg-search input,
  html[data-theme="dark"] body.admin-layout .orders-search input {
    color: #f2f4f8;
  }

  html[data-theme="dark"] body.admin-layout .cg-chip,
  html[data-theme="dark"] body.admin-layout .cg-live,
  html[data-theme="dark"] body.admin-layout .cg-bar-label,
  html[data-theme="dark"] body.admin-layout .ar-watch a {
    color: #d5d9e2;
  }

  html[data-theme="dark"] body.admin-layout a.cg-chip:hover,
  html[data-theme="dark"] body.admin-layout a.cg-chip:focus {
    color: #ff6b66;
    border-color: #6e3030 !important;
  }

  html[data-theme="dark"] body.admin-layout .cg-page-head p,
  html[data-theme="dark"] body.admin-layout .cg-kicker,
  html[data-theme="dark"] body.admin-layout .cg-hero-sub,
  html[data-theme="dark"] body.admin-layout .cg-metric-sub,
  html[data-theme="dark"] body.admin-layout .cg-userchip small,
  html[data-theme="dark"] body.admin-layout .cg-side-user-copy span,
  html[data-theme="dark"] body.admin-layout .cg-bar-pct,
  html[data-theme="dark"] body.admin-layout .cg-bar-ticks,
  html[data-theme="dark"] body.admin-layout .cg-empty,
  html[data-theme="dark"] body.admin-layout .text-muted {
    color: #9aa3b5 !important;
  }

  html[data-theme="dark"] body.admin-layout .cg-metric-sub.is-up {
    color: #3dce73 !important;
  }

  html[data-theme="dark"] body.admin-layout .cg-metric-sub.is-amber {
    color: #f0b429 !important;
  }

  html[data-theme="dark"] body.admin-layout .admin-header-bell .notification-badge {
    border-color: #1c2029;
  }

  html[data-theme="dark"] body.admin-layout .form-control,
  html[data-theme="dark"] body.admin-layout .form-select,
  html[data-theme="dark"] body.admin-layout .input-group-text,
  html[data-theme="dark"] body.admin-layout textarea {
    background-color: #14171e;
    border-color: #313644;
    color: #f2f4f8;
  }

  html[data-theme="dark"] body.admin-layout .form-control::placeholder,
  html[data-theme="dark"] body.admin-layout textarea::placeholder {
    color: #8b93a7;
  }

  html[data-theme="dark"] body.admin-layout .table {
    --bs-table-bg: transparent;
    --bs-table-color: #e7e9ee;
    --bs-table-border-color: #313644;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
    color: #e7e9ee;
  }

  html[data-theme="dark"] body.admin-layout .admin-table th {
    background-color: #2a2226;
    color: #c5cad6;
    border-bottom-color: #4a3336;
  }

  html[data-theme="dark"] body.admin-layout .admin-table td {
    color: #e7e9ee;
    border-bottom-color: #2a2f3a;
  }

  html[data-theme="dark"] body.admin-layout .admin-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.04);
  }

  html[data-theme="dark"] body.admin-layout .table tbody tr.needs-action > * {
    --bs-table-bg: #3a2c16;
    --bs-table-accent-bg: #3a2c16;
    background-color: #3a2c16;
    color: #f6e7c8;
  }

  html[data-theme="dark"] body.admin-layout .table tbody tr.needs-action:hover > * {
    --bs-table-bg: #4a381c;
    background-color: #4a381c;
  }

  html[data-theme="dark"] body.admin-layout .table tbody tr.nc-bounced > * {
    --bs-table-bg: #4a1d24;
    --bs-table-accent-bg: #4a1d24;
    background-color: #4a1d24;
    color: #fecdd3;
  }

  html[data-theme="dark"] body.admin-layout .table tbody tr.nc-bounced:hover > * {
    --bs-table-bg: #5c2430;
    background-color: #5c2430;
  }

  html[data-theme="dark"] body.admin-layout .table tbody tr.nc-bounced-settled > * {
    --bs-table-bg: #3a2c16;
    --bs-table-accent-bg: #3a2c16;
    background-color: #3a2c16;
    color: #f6e7c8;
  }

  html[data-theme="dark"] body.admin-layout .table tbody tr.nc-bounced-settled:hover > * {
    --bs-table-bg: #4a381c;
    background-color: #4a381c;
  }

  html[data-theme="dark"] body.admin-layout .ar-br-table tbody tr.ar-br-bounced td {
    background: #4a1d24 !important;
    color: #fecdd3;
  }

  html[data-theme="dark"] body.admin-layout .ar-br-table tbody tr.ar-br-bounced-settled td {
    background: #3a2c16 !important;
    color: #f6e7c8;
  }

  html[data-theme="dark"] body.admin-layout .ar-br-pay-note,
  html[data-theme="dark"] body.admin-layout .ar-br-pay-result,
  html[data-theme="dark"] body.admin-layout .nc-bounce-note {
    color: #c5cad6;
  }

  html[data-theme="dark"] body.admin-layout .ar-br-pdc td {
    background: #3a2c16;
    color: #f6e7c8;
  }

  html[data-theme="dark"] body.admin-layout .ar-br-cheques {
    color: #f6e7c8;
  }

  html[data-theme="dark"] body.admin-layout .ar-br-cheques strong {
    color: #fbbf24;
  }

  html[data-theme="dark"] body.admin-layout .dr-bounce-alert {
    background: #4a1d24;
    color: #fecdd3;
  }

  html[data-theme="dark"] body.admin-layout .celbert-notify-modal .modal-content {
    background: #1c2029;
    border-color: #313644;
  }

  html[data-theme="dark"] body.admin-layout .celbert-notify-modal .modal-header,
  html[data-theme="dark"] body.admin-layout .celbert-notify-modal .modal-footer,
  html[data-theme="dark"] body.admin-layout .modal-header,
  html[data-theme="dark"] body.admin-layout .modal-footer {
    border-color: #313644;
  }

  html[data-theme="dark"] body.admin-layout .celbert-notify-modal .modal-title,
  html[data-theme="dark"] body.admin-layout .notify-copy h3 {
    color: #f2f4f8;
  }

  html[data-theme="dark"] body.admin-layout .notify-item {
    border-bottom-color: #313644;
  }

  html[data-theme="dark"] body.admin-layout .notify-item.is-unread {
    background: rgba(225, 6, 0, 0.14);
  }

  html[data-theme="dark"] body.admin-layout .notify-copy p {
    color: #c5cad6;
  }

  html[data-theme="dark"] body.admin-layout .modal-header .btn-close,
  html[data-theme="dark"] body.admin-layout .offcanvas-header .btn-close {
    filter: invert(1) grayscale(1);
  }

  html[data-theme="dark"] body.admin-layout .dropdown-item {
    color: #e7e9ee;
  }

  html[data-theme="dark"] body.admin-layout .dropdown-item:hover,
  html[data-theme="dark"] body.admin-layout .dropdown-item:focus {
    background: #2a2f3a;
    color: #fff;
  }

  html[data-theme="dark"] body.admin-layout .btn-outline-dark {
    color: #f2f4f8;
    border-color: #6b7280;
  }

  html[data-theme="dark"] body.admin-layout .btn-outline-dark:hover,
  html[data-theme="dark"] body.admin-layout .btn-outline-dark:focus {
    background: #f2f4f8;
    color: #111318;
  }

  html[data-theme="dark"] body.admin-layout .btn-dark {
    background: #f2f4f8;
    border-color: #f2f4f8;
    color: #111318;
  }

  html[data-theme="dark"] body.admin-layout .btn-outline-secondary {
    color: #d5d9e2;
    border-color: #4b5568;
  }

  html[data-theme="dark"] body.admin-layout .btn-outline-secondary:hover,
  html[data-theme="dark"] body.admin-layout .btn-outline-secondary:focus {
    background: #2a2f3a;
    color: #fff;
    border-color: #6b7280;
  }

  html[data-theme="dark"] body.admin-layout .page-link {
    background: #1c2029;
    border-color: #313644;
    color: #f2f4f8;
  }

  html[data-theme="dark"] body.admin-layout .page-item.active .page-link {
    background: #e10600;
    border-color: #e10600;
    color: #fff;
  }

  html[data-theme="dark"] body.admin-layout .admin-section-tabs .nav-link,
  html[data-theme="dark"] body.admin-layout .admin-content-body .nav-tabs .nav-link {
    color: #c5cad6;
  }

  html[data-theme="dark"] body.admin-layout .admin-content-body .nav-tabs {
    border-bottom-color: #313644;
  }

  html[data-theme="dark"] body.admin-layout .accordion-button:not(.collapsed) {
    background: #242833 !important;
    color: #f2f4f8;
    box-shadow: none;
  }

  html[data-theme="dark"] body.admin-layout .accordion-button::after {
    filter: invert(1);
  }

  html[data-theme="dark"] body.admin-layout .bridge-pill {
    border-color: #313644;
    background: #1c2029;
    color: #c5cad6;
  }

  html[data-theme="dark"] body.admin-layout .bridge-pill.is-on {
    border-color: #1f5c36;
    background: #14281c;
    color: #7ddea6;
  }

  html[data-theme="dark"] body.admin-layout .bridge-pill.is-sync {
    border-color: #2a4478;
    background: #172033;
    color: #b9ccff;
  }

  html[data-theme="dark"] body.admin-layout .bridge-pill.is-wait {
    border-color: #6a5420;
    background: #2a2416;
    color: #f0c36a;
  }

  html[data-theme="dark"] body.admin-layout .admin-header-bell {
    color: #ff4d4d;
  }

  html[data-theme="dark"] body.admin-layout .admin-header-bell:hover,
  html[data-theme="dark"] body.admin-layout .admin-header-bell:focus-visible {
    background: #2a2024 !important;
    color: #ff8a86;
  }

  html[data-theme="dark"] body.admin-layout .admin-theme-btn:hover,
  html[data-theme="dark"] body.admin-layout .admin-theme-btn:focus-visible {
    background: #2a2f3a;
    color: #ff8a86;
  }

  html[data-theme="dark"] body.admin-layout .admin-theme-btn[data-theme-value="dark"],
  html[data-theme="dark"] body.admin-layout .admin-theme-btn[data-theme-value="dark"]:hover,
  html[data-theme="dark"] body.admin-layout .admin-theme-btn[data-theme-value="dark"]:focus-visible {
    background: #e10600;
    color: #fff;
  }

  html[data-theme="dark"] body.admin-layout .admin-theme-btn[data-theme-value="dark"]:hover,
  html[data-theme="dark"] body.admin-layout .admin-theme-btn[data-theme-value="dark"]:focus-visible {
    background: #c40000;
  }

  html[data-theme="dark"] body.admin-layout .admin-content-body.cg-dashboard {
    background: #101218;
  }

  html[data-theme="dark"] body.admin-layout .rpt-watch strong {
    color: #f3f4f6;
  }

  html[data-theme="dark"] body.admin-layout .rpt-watch small,
  html[data-theme="dark"] body.admin-layout .rpt-pct,
  html[data-theme="dark"] body.admin-layout .rpt-empty {
    color: #9aa3b5;
  }

  html[data-theme="dark"] body.admin-layout .rpt-watch {
    border-top-color: #2a2f3a;
    background: transparent;
  }

  html[data-theme="dark"] body.admin-layout .rpt-watch:hover,
  html[data-theme="dark"] body.admin-layout .rpt-watch:focus {
    background: #242833;
  }

  html[data-theme="dark"] body.admin-layout .rpt-mark {
    background: rgba(225, 6, 0, 0.16);
    color: #ff6b66;
  }

  html[data-theme="dark"] body.admin-layout .rpt-mark.is-bad {
    background: #f3f4f6;
    color: #1a1d26;
  }

  html[data-theme="dark"] body.admin-layout .rpt-track {
    background: #2a2f3a;
  }

  html[data-theme="dark"] body.admin-layout .rpt-fill {
    background: linear-gradient(90deg, #ff6b66, #e10600);
  }

  html[data-theme="dark"] body.admin-layout .rpt-fill.is-bad {
    background: #f3f4f6;
  }
}

.ds-note,
.ds-rule {
  margin: 0 0 16px;
  color: #3f4c44;
  font-size: 0.95rem;
  line-height: 1.45;
}

.ds-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff8f8;
}

.ds-total span {
  color: #5c6b63;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ds-total strong {
  color: #c40000;
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.ds-fit {
  table-layout: auto;
}

.ds-status {
  margin: 0;
}

.ds-status select {
  min-width: 210px;
  max-width: 240px;
}

.ds-actions {
  position: sticky;
  right: 0;
  z-index: 1;
  background: #fff;
  box-shadow: -10px 0 10px #fff;
}

.ds-fit thead .ds-actions,
.ds-fit th:last-child {
  background: #f7f8f8;
}

.ds-row-new,
.ds-row-new .ds-actions {
  background: #f0fdf4;
}

.ds-actions {
  white-space: nowrap;
}

.ds-actions .btn + .btn {
  margin-left: 6px;
}

.ds-checks,
#dsChecks {
  margin-bottom: 14px;
}

.ds-check {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #d5ddd8;
  border-radius: 12px;
  background: #f8faf8;
}

.ds-check-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ds-check-remove {
  padding: 0;
  text-decoration: none;
}

.ds-check-sum {
  margin: 8px 0 0;
  font-weight: 700;
}

.ds-owe {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #d5ddd8;
  border-radius: 12px;
  background: #f8faf8;
}

.ds-owe span {
  display: block;
  color: #5c6b63;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ds-owe strong {
  display: block;
  margin-top: 2px;
  font-size: 1.15rem;
}

.ds-owe-left strong {
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
}

.ds-owe.is-drop .ds-owe-left strong {
  color: #0f7a3a;
}

.ds-owe.is-over {
  border-color: #e10600;
  background: #fff5f5;
}

.ds-owe.is-over .ds-owe-left strong,
.ds-owe.is-full .ds-owe-left strong {
  color: #e10600;
}

.ds-owe small {
  grid-column: 1 / -1;
  color: #3f4c44;
  font-weight: 600;
}

#dsAmount.is-bad {
  border-color: #e10600;
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.15);
}

#dsAddCheck {
  margin-top: 4px;
}

.ds-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.ds-field[data-ds-field="proof"] {
  grid-column: 1 / -1;
}

.ds-field small {
  color: #5c6b63;
  font-weight: 500;
}

.ds-check .form-control {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.ds-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  font-weight: 700;
}

.ds-field span {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.ds-field:has(input[readonly]) input {
  background: #f4f6f5;
}

@media (max-width: 720px) {
  .ds-fields {
    grid-template-columns: 1fr;
  }

  .ds-actions {
    white-space: normal;
  }
}

html[data-theme="dark"] .ds-check {
  background: #1c2029;
  border-color: #343846;
}

html[data-theme="dark"] .ds-field small,
html[data-theme="dark"] .ds-note,
html[data-theme="dark"] .ds-rule {
  color: #c5cad6;
}

html[data-theme="dark"] .ds-total {
  background: #2a1518;
}

html[data-theme="dark"] .ds-total span {
  color: #c5cad6;
}

html[data-theme="dark"] .ds-total strong {
  color: #ff6b66;
}

html[data-theme="dark"] .ds-actions,
html[data-theme="dark"] .ds-fit thead .ds-actions,
html[data-theme="dark"] .ds-fit th:last-child {
  background: #16181f;
  box-shadow: -10px 0 10px #16181f;
}

html[data-theme="dark"] .ds-row-new,
html[data-theme="dark"] .ds-row-new .ds-actions {
  background: #14261c;
}

html[data-theme="dark"] .ds-field:has(input[readonly]) input {
  background: #1c2029;
  color: #f3f4f6;
}

html[data-theme="dark"] .ds-owe {
  background: #1c2029;
  border-color: #343846;
}

html[data-theme="dark"] .ds-owe span,
html[data-theme="dark"] .ds-owe small {
  color: #c5cad6;
}

html[data-theme="dark"] .ds-owe.is-drop .ds-owe-left strong {
  color: #4ade80;
}

html[data-theme="dark"] .ds-owe.is-over,
html[data-theme="dark"] .ds-owe.is-full {
  border-color: #e10600;
  background: #2a1518;
}

.ds-bod-list {
  margin: 0 0 14px;
}

.ds-bod-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid #d5ddd8;
  border-radius: 12px;
  background: #fff;
  font-weight: 700;
}

.ds-bod-line input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #e10600;
}

.ds-bod-line b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ds-bod-line.is-on {
  border-color: #e10600;
  background: #fff5f5;
}

.ds-status.is-bod .form-select,
.ds-status.is-bod .form-select:disabled {
  color: #e10600;
  -webkit-text-fill-color: #e10600;
  font-weight: 800;
  border-color: #e10600;
  background-color: #fff5f5;
  opacity: 1;
}

.nc-modal-head p.is-bod {
  color: #e10600;
  font-weight: 800;
}

.ds-bod-view li {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.ds-bod-view b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ds-bod-view li.is-bod {
  margin: 6px 0;
  padding: 8px 10px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff5f5;
  opacity: 0.9;
}

.ds-bod-view li.is-bod span,
.ds-bod-view li.is-bod b {
  color: #9f1239;
  text-decoration: line-through;
}

.ds-bod-view li.is-bod em {
  margin-left: 0;
  padding: 1px 7px;
  border-radius: 999px;
  background: #e10600;
  color: #fff;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.ar-bod-item {
  color: #9f1239;
}

.ar-bod-item s {
  color: #9f1239;
  text-decoration: line-through;
}

.ar-bod-item em {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #e10600;
  color: #fff;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  vertical-align: 1px;
}

.ar-bod-sep {
  color: #6b7280;
}

html[data-theme="dark"] .ds-bod-line {
  background: #1c2029;
  border-color: #343846;
  color: #f3f4f6;
}

html[data-theme="dark"] .ds-bod-line.is-on {
  background: #2a1518;
  border-color: #e10600;
}

html[data-theme="dark"] .ds-status.is-bod .form-select,
html[data-theme="dark"] .ds-status.is-bod .form-select:disabled {
  color: #fecaca;
  -webkit-text-fill-color: #fecaca;
  background-color: #2a1518;
  border-color: #e10600;
}

html[data-theme="dark"] .nc-modal-head p.is-bod {
  color: #fecaca;
}

html[data-theme="dark"] .ds-bod-view li.is-bod {
  background: #2a1518;
  border-color: #e10600;
}

html[data-theme="dark"] .ds-bod-view li.is-bod span,
html[data-theme="dark"] .ds-bod-view li.is-bod b,
html[data-theme="dark"] .ar-bod-item,
html[data-theme="dark"] .ar-bod-item s {
  color: #fecaca;
}

html[data-theme="dark"] .ar-bod-sep {
  color: #9ca3af;
}

html[data-theme="dark"] .ar-br-bod-col {
  color: #fecaca;
}

html[data-theme="dark"] .ar-br-bod-col .ar-br-bod-amt {
  color: #f3f4f6;
}

.ar-cust-search {
  position: relative;
}

.ar-cust-field {
  position: relative;
}

.ar-cust-field .bi-search {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.ar-cust-field .form-control {
  padding-left: 36px;
}

.ar-cust-menu {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
}

.ar-cust-menu button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #1c1917;
  text-align: left;
}

.ar-cust-menu button strong,
.ar-cust-menu button small {
  display: block;
}

.ar-cust-menu button small,
.ar-cust-menu p {
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 500;
}

.ar-cust-menu p {
  margin: 0;
  padding: 10px 12px;
}

.ar-cust-menu button.is-on,
.ar-cust-menu button:hover {
  background: #fff5f5;
}

html[data-theme="dark"] body.admin-layout .ar-cust-menu {
  background: #1c2029;
  border-color: #313644;
  box-shadow: none;
}

html[data-theme="dark"] body.admin-layout .ar-cust-field .bi-search,
html[data-theme="dark"] body.admin-layout .ar-cust-menu button small,
html[data-theme="dark"] body.admin-layout .ar-cust-menu p {
  color: #9aa3b5;
}

html[data-theme="dark"] body.admin-layout .ar-cust-menu button {
  color: #f2f4f8;
}

html[data-theme="dark"] body.admin-layout .ar-cust-menu button.is-on,
html[data-theme="dark"] body.admin-layout .ar-cust-menu button:hover {
  background: #2a1518;
}

.rpt-note {
  max-width: 760px;
  margin: -8px 0 16px;
  color: #6b7280;
  font-size: 0.92rem;
}

.rpt-code {
  display: block;
  color: #8b93a7;
  font-size: 0.75rem;
  font-weight: 600;
}

.rpt-amt,
.rpt-pivot small {
  display: block;
  font-variant-numeric: tabular-nums;
}

.rpt-amt {
  font-weight: 700;
}

.rpt-pivot small,
.rpt-empty {
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 600;
}

.rpt-pivot-wrap {
  overflow-x: auto;
}

.rpt-pivot .rpt-sticky {
  position: sticky;
  background: #fff;
}

.rpt-pivot .rpt-sticky-item {
  left: 0;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  white-space: normal;
  z-index: 2;
}

.rpt-pivot .rpt-sticky-sup {
  left: 220px;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  white-space: normal;
  z-index: 2;
  box-shadow: 8px 0 10px -10px rgba(17, 24, 39, 0.45);
}

.rpt-pivot thead .rpt-sticky {
  z-index: 3;
  background: #faf7f7;
}

.rpt-pivot tfoot th {
  background: #fff8f8;
  font-variant-numeric: tabular-nums;
}

.rpt-pivot tfoot .rpt-foot-label {
  left: 0;
  width: 370px;
  min-width: 370px;
  max-width: none;
  z-index: 2;
}

.rpt-pivot td,
.rpt-pivot th.text-end {
  min-width: 112px;
  white-space: nowrap;
}

.rpt-group td {
  background: #fff6f6;
  border-bottom-color: #f0d4d4;
}

.rpt-group strong,
.rpt-group-total {
  margin-right: 10px;
}

.rpt-group-total {
  float: right;
  font-weight: 700;
}

.rpt-returned {
  color: #c4161c;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-table tfoot th {
  border-top: 1px solid var(--admin-border);
}

html[data-theme="dark"] body.admin-layout .rpt-note,
html[data-theme="dark"] body.admin-layout .rpt-code,
html[data-theme="dark"] body.admin-layout .rpt-pivot small,
html[data-theme="dark"] body.admin-layout .rpt-empty {
  color: #9aa3b5;
}

html[data-theme="dark"] body.admin-layout .rpt-pivot .rpt-sticky,
html[data-theme="dark"] body.admin-layout .rpt-pivot tfoot th {
  background: #1c2029;
}

html[data-theme="dark"] body.admin-layout .rpt-pivot thead .rpt-sticky {
  background: #2a2226;
}

html[data-theme="dark"] body.admin-layout .rpt-group td {
  background: #2a1518;
  border-bottom-color: #4a3336;
}

