/**
 * Drivers' Circle — TailAdmin central stylesheet
 *
 * Loaded globally by template/output/tailadmin/html.php.
 * Add shared and page-scoped rules here — not inline in PHP templates.
 *
 * Related files:
 *   dc-dark-mode.css  — dark mode text defaults for main content
 *   dc-pickers.css    — date/time picker popups
 */

/* ── Shared layout utilities ───────────────────────────────────────────── */

.dc-table-scroll {
  overflow-x: auto;
  max-width: 100%;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.tab-panel-inner {
  padding-left: 0 !important;
  max-width: 100%;
}

.dc-calls-tables {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  max-width: 100%;
}

.dc-calls-tables table {
  float: none !important;
  margin-left: 0 !important;
  flex: 1 1 300px;
  min-width: 0;
  max-width: 100%;
}

.dc-calls-tables table td {
  word-break: break-word;
}

.dc-calls-tables table td:first-child {
  max-width: 220px;
  white-space: normal;
}

.dc-collapsed {
  display: none;
}

.dc-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dc-report-table thead th {
  background: #172357;
  color: #fff;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

/* tablesorter vendor CSS sets transparent headers — restore report table styling */
.dc-report-table.tablesorter thead tr th {
  background: #172357;
  color: #fff;
}

.dc-report-table tbody td,
.dc-report-table tbody th {
  padding: 6px 10px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
  font-weight: normal;
  text-align: left;
}

.dark .dc-report-table tbody td,
.dark .dc-report-table tbody th {
  border-bottom-color: #374151;
  color: #d1d5db;
}

.dc-report-table tbody tr:hover {
  background: #f9fafb;
}

.dark .dc-report-table tbody tr:hover {
  background: #111827;
}

/* ── jQuery UI dialog (legacy confirm modals) ──────────────────────────── */

.ui-widget-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.5);
  z-index: 99998;
}

.ui-dialog {
  position: fixed;
  z-index: 99999;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  box-shadow: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
  padding: 16px;
  font-size: 14px;
  color: #344054;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
}

.ui-dialog .ui-dialog-titlebar {
  font-weight: 600;
  color: #101828;
  margin-bottom: 8px;
}

.ui-dialog .ui-dialog-titlebar-close {
  display: none;
}

.ui-dialog .ui-dialog-buttonpane {
  margin-top: 16px;
}

.ui-dialog .ui-dialog-buttonpane button {
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-right: 8px;
  border: 1px solid #d0d5dd;
  background: #ffffff;
  color: #344054;
}

.ui-dialog .ui-dialog-buttonpane button:first-child {
  background: #465fff;
  border-color: #465fff;
  color: #ffffff;
}

.dark .ui-dialog {
  background: #111827;
  border-color: #374151;
  color: #e5e7eb;
}

.dark .ui-dialog .ui-dialog-titlebar {
  color: #f9fafb;
}

.dark .ui-dialog .ui-dialog-buttonpane button {
  background: #1f2937;
  border-color: #4b5563;
  color: #e5e7eb;
}

.dark .ui-dialog .ui-dialog-buttonpane button:first-child {
  background: #465fff;
  border-color: #465fff;
  color: #ffffff;
}

/* ── Dealer settings page (template/page/dealer/modify.php) ─────────────── */

#dealerSettings {
  max-width: 100%;
  box-sizing: border-box;
}
#dealerSettings .pageTitle {
  font-size: 18px;
  font-weight: 600;
  color: #101828;
  margin-bottom: 16px;
}
#dealerSettings .dealerManagementTabs {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  padding: 16px;
  max-width: 100%;
  overflow: hidden;
}
#dealerSettings .dealerManagementTabs > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0 0 16px 0;
  padding: 0 0 8px 0;
  border-bottom: 1px solid #e4e7ec;
}
#dealerSettings .dealerManagementTabs > ul li {
  margin: 0;
}
#dealerSettings .dealerManagementTabs > ul li a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #667085;
  text-decoration: none;
  outline: none;
}
#dealerSettings .dealerManagementTabs > ul li a:hover {
  background: #f2f4f7;
  color: #344054;
}
#dealerSettings .dealerManagementTabs > ul li.ui-tabs-active a {
  background: #ecf3ff;
  color: #465fff;
}
#dealerSettings .ui-tabs-panel {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#dealerSettings h3 {
  font-size: 15px;
  font-weight: 600;
  color: #101828;
  margin: 0 0 4px 0;
}
#dealerSettings hr {
  border: 0;
  border-top: 1px solid #e4e7ec;
  margin: 14px 0;
}
#dealerSettings a {
  color: #465fff;
  text-decoration: none;
}
#dealerSettings a:hover {
  color: #3641f5;
}
#dealerSettings small {
  color: #667085;
}
/* Tables */
#dealerSettings table {
  border-collapse: collapse;
  max-width: 100%;
}
#dealerSettings table.table {
  width: auto;
  margin-bottom: 0;
  background: transparent;
}
#dealerSettings table td,
#dealerSettings table th {
  padding: 8px 12px 8px 0;
  font-size: 14px;
  color: #344054;
  vertical-align: top;
}
#dealerSettings #dealerContactsTab table tr td:first-child,
#dealerSettings #callsTab table tr td:first-child,
#dealerSettings #additionalTab table tr td:first-child,
#dealerSettings #web2callTable tr td:first-child,
#dealerSettings #extractTable tr td:first-child,
#dealerSettings #frontEndException tr td:first-child {
  white-space: nowrap;
  font-weight: 500;
  color: #667085;
  padding-right: 10px;
  min-width: 140px;
}
#dealerSettings #generalTab table {
  width: max-content;
  min-width: 100%;
}
#dealerSettings #generalTab table tr td:nth-child(odd) {
  white-space: nowrap;
  font-weight: 500;
  color: #667085;
  padding-right: 10px;
}
#dealerSettings #generalTab table tr td:nth-child(even) {
  font-weight: normal;
  color: #344054;
  white-space: nowrap;
}
#dealerSettings #generalTab table td input,
#dealerSettings #generalTab table td select,
#dealerSettings #generalTab table td .select2-container {
  min-width: 120px;
  max-width: 180px;
}
#dealerSettings #web2callTable td,
#dealerSettings #extractTable td,
#dealerSettings #frontEndException td {
  vertical-align: top;
}
/* Legacy Bootstrap grid on Used stock mailer tab */
#dealerSettings .row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  max-width: 100%;
}
#dealerSettings .col-xs-12,
#dealerSettings .col-md-6,
#dealerSettings .col-xs-1,
#dealerSettings .col-xs-2 {
  float: none;
  width: auto;
  max-width: 100%;
  padding: 0;
  box-sizing: border-box;
}
#dealerSettings .col-md-6 {
  flex: 1 1 280px;
  min-width: 0;
}
#dealerSettings #UsedStockMailerTab label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}
#dealerSettings #frontendTab #frontEndException label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 10px 4px 0 !important;
  white-space: normal;
}
#dealerSettings #lmsTab .dc-table-scroll,
#dealerSettings #lmsTab table {
  max-width: 100%;
}
/* Radio / checkbox rows that wrap instead of overflowing */
#dealerSettings #productsTab label,
#dealerSettings #cmsTab label,
#dealerSettings #reportingTab label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 10px 4px 0 !important;
  white-space: normal;
  max-width: 100%;
}
#dealerSettings label,
#dealerSettings span {
  font-size: 14px;
  color: #344054;
}
#dealerSettings input[type="text"],
#dealerSettings input[type="password"],
#dealerSettings textarea,
#dealerSettings select,
#dealerSettings .form-control,
#dealerSettings .dc-input {
  box-sizing: border-box;
  max-width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 14px;
  color: #344054;
  background: #ffffff;
}
#dealerSettings input.callParameter {
  width: 100%;
  max-width: 120px;
}
#dealerSettings input.importPath {
  width: 100%;
  max-width: 480px;
}
#dealerSettings textarea.importKeyword {
  width: 100%;
  max-width: 480px;
  min-height: 80px;
  resize: vertical;
}
#dealerSettings #web2callTable select,
#dealerSettings #web2callTable textarea,
#dealerSettings #extractTable select {
  width: 100% !important;
  max-width: 320px;
}
#dealerSettings input[type="text"]:focus,
#dealerSettings textarea:focus,
#dealerSettings select:focus {
  border-color: #9cb9ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.12);
}
#dealerSettings input[type="radio"] {
  margin: 0 4px 0 6px;
  accent-color: #465fff;
  flex-shrink: 0;
}
#dealerSettings .select2-container {
  max-width: 100% !important;
}
#dealerSettings .select2-container .select2-selection--single,
#dealerSettings .select2-container .select2-selection--multiple {
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  min-height: 36px;
}
#dealerSettings .actionButtons {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#dealerSettings .btnSavePrimary {
  background: #465fff;
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
#dealerSettings .btnSavePrimary:hover {
  background: #3641f5;
}
#dealerSettings .btnDisableDanger {
  background: #ffffff;
  color: #d92d20;
  border: 1px solid #fda29b;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
#dealerSettings .btnDisableDanger:hover {
  background: #fef3f2;
}

/* Dark mode */
.dark #dealerSettings .pageTitle,
.dark #dealerSettings h3 {
  color: #f9fafb;
}
.dark #dealerSettings .dealerManagementTabs {
  background: #111827;
  border-color: #374151;
}
.dark #dealerSettings .dealerManagementTabs > ul {
  border-bottom-color: #374151;
}
.dark #dealerSettings .dealerManagementTabs > ul li a {
  color: #9ca3af;
}
.dark #dealerSettings .dealerManagementTabs > ul li a:hover {
  background: #1f2937;
  color: #e5e7eb;
}
.dark #dealerSettings .dealerManagementTabs > ul li.ui-tabs-active a {
  background: rgba(70, 95, 255, 0.15);
  color: #9cb9ff;
}
.dark #dealerSettings hr {
  border-top-color: #374151;
}
.dark #dealerSettings a {
  color: #9cb9ff;
}
.dark #dealerSettings a:hover {
  color: #c2d6ff;
}
.dark #dealerSettings small {
  color: #9ca3af !important;
}
.dark #dealerSettings table td,
.dark #dealerSettings table th,
.dark #dealerSettings label,
.dark #dealerSettings span {
  color: #e5e7eb;
}
.dark #dealerSettings #dealerContactsTab table tr td:first-child,
.dark #dealerSettings #callsTab table tr td:first-child,
.dark #dealerSettings #additionalTab table tr td:first-child,
.dark #dealerSettings #web2callTable tr td:first-child,
.dark #dealerSettings #extractTable tr td:first-child,
.dark #dealerSettings #frontEndException tr td:first-child,
.dark #dealerSettings #generalTab table tr td:nth-child(odd) {
  color: #9ca3af;
}
.dark #dealerSettings #generalTab table tr td:nth-child(even) {
  color: #e5e7eb;
}
.dark #dealerSettings input[type="text"],
.dark #dealerSettings input[type="password"],
.dark #dealerSettings textarea,
.dark #dealerSettings select,
.dark #dealerSettings .form-control {
  background: #1f2937;
  border-color: #4b5563;
  color: #f9fafb;
}
.dark #dealerSettings .select2-container .select2-selection--single,
.dark #dealerSettings .select2-container .select2-selection--multiple {
  background: #1f2937;
  border-color: #4b5563;
}
.dark #dealerSettings .select2-container--default .select2-selection__rendered {
  color: #f9fafb;
}
.dark #dealerSettings .btnDisableDanger {
  background: #1f2937;
  border-color: #7f1d1d;
  color: #fca5a5;
}
.dark #dealerSettings .btnDisableDanger:hover {
  background: #450a0a;
}

/* ── Shared utilities (Backend and other converted pages) ───────────────── */

.hide {
  display: none !important;
}

/* TailAdmin form tokens — use instead of inline Tailwind strings in PHP */
.dc-input,
input.dc-input,
select.dc-input,
textarea.dc-input {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #d0d5dd;
  background-color: #ffffff;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #374151;
  box-sizing: border-box;
}

.dc-input:focus,
input.dc-input:focus,
select.dc-input:focus,
textarea.dc-input:focus {
  outline: none;
  border-color: #9cb9ff;
  box-shadow: 0 0 0 2px #dde9ff;
}

.dark .dc-input,
.dark input.dc-input,
.dark select.dc-input,
.dark textarea.dc-input {
  border-color: #374151;
  background-color: #111827;
  color: #ffffff;
}

.dark .dc-input:focus,
.dark input.dc-input:focus,
.dark select.dc-input:focus,
.dark textarea.dc-input:focus {
  border-color: #9cb9ff;
  box-shadow: 0 0 0 2px rgba(70, 95, 255, 0.2);
}

.dc-btn-primary,
input.dc-btn-primary,
button.dc-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border: none;
  border-radius: 0.5rem;
  background-color: #465fff;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;
}

.dc-btn-primary:hover,
input.dc-btn-primary:hover,
button.dc-btn-primary:hover {
  background-color: #3641f5;
}

.dark .dc-btn-primary,
.dark input.dc-btn-primary,
.dark button.dc-btn-primary {
  background-color: #3641f5;
}

.dark .dc-btn-primary:hover,
.dark input.dc-btn-primary:hover,
.dark button.dc-btn-primary:hover {
  background-color: #2a31d8;
}

.dc-btn-default,
input.dc-btn-default,
button.dc-btn-default,
a.dc-btn-default {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border: 1px solid #d0d5dd;
  border-radius: 0.5rem;
  background-color: #ffffff;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #374151;
  cursor: pointer;
  text-decoration: none;
}

.dc-btn-default:hover,
input.dc-btn-default:hover,
button.dc-btn-default:hover,
a.dc-btn-default:hover {
  background-color: #f9fafb;
}

.dark .dc-btn-default,
.dark input.dc-btn-default,
.dark button.dc-btn-default,
.dark a.dc-btn-default {
  border-color: #4b5563;
  background-color: #1f2937;
  color: #e5e7eb;
}

.dark .dc-btn-default:hover,
.dark input.dc-btn-default:hover,
.dark button.dc-btn-default:hover,
.dark a.dc-btn-default:hover {
  background-color: #374151;
}

/* Compact default button (+ / − field row actions, etc.) */
.dc-btn-sm,
input.dc-btn-sm,
button.dc-btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 0.25rem;
  border: 1px solid #d0d5dd;
  border-radius: 0.5rem;
  background-color: #ffffff;
  padding: 0.375rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #374151;
  cursor: pointer;
  text-decoration: none;
}

.dc-btn-sm:hover,
input.dc-btn-sm:hover,
button.dc-btn-sm:hover {
  background-color: #f9fafb;
}

.dark .dc-btn-sm,
.dark input.dc-btn-sm,
.dark button.dc-btn-sm {
  border-color: #374151;
  background-color: #1f2937;
  color: #ffffff;
}

.dark .dc-btn-sm:hover,
.dark input.dc-btn-sm:hover,
.dark button.dc-btn-sm:hover {
  background-color: #374151;
}

.dc-label {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #374151;
}

.dark .dc-label {
  color: #ffffff;
}

/* Compact inputs (recipient-management grid rows) */
.dc-input-sm,
input.dc-input-sm,
select.dc-input-sm,
textarea.dc-input-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1rem;
}

.dc-input-sm:focus,
input.dc-input-sm:focus,
select.dc-input-sm:focus,
textarea.dc-input-sm:focus {
  box-shadow: 0 0 0 1px #dde9ff;
}

.dark .dc-input-sm:focus,
.dark input.dc-input-sm:focus,
.dark select.dc-input-sm:focus,
.dark textarea.dc-input-sm:focus {
  box-shadow: 0 0 0 1px rgba(70, 95, 255, 0.2);
}

.dc-btn-danger,
input.dc-btn-danger,
button.dc-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border: none;
  border-radius: 0.5rem;
  background-color: #ef4444;
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #ffffff;
  cursor: pointer;
}

.dc-btn-danger:hover,
input.dc-btn-danger:hover,
button.dc-btn-danger:hover {
  background-color: #dc2626;
}

/* Bootstrap 3 glyphicons (legacy icon font — info button on add-trigger, etc.) */
@font-face {
  font-family: 'Glyphicons Halflings';
  src: url('../fonts/glyphicons-halflings-regular.woff') format('woff'),
       url('../fonts/glyphicons-halflings-regular.ttf') format('truetype');
}

.glyphicon {
  position: relative;
  top: 1px;
  display: inline-block;
  font-family: 'Glyphicons Halflings';
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.glyphicon-info-sign:before {
  content: "\e086";
}

/* ── Update User CC (template/page/backend/update-user-cc.php) ───────────── */

#updateUserCc .match {
  background-color: #fecdd3;
  border-color: #fda4af;
}

#updateUserCc #EmailAddressTop,
#updateUserCc #CC1Top,
#updateUserCc #CC2Top {
  background-color: #e4e7ec;
  border-color: #d0d5dd;
}

.dark #updateUserCc .match {
  background-color: rgba(127, 29, 29, 0.35);
  border-color: #991b1b;
}

.dark #updateUserCc #EmailAddressTop,
.dark #updateUserCc #CC1Top,
.dark #updateUserCc #CC2Top {
  background-color: #374151;
  border-color: #4b5563;
}

/* ── Enhance Data (template/page/backend/enhanceData.php) ───────────────── */

#enhanceData .draggableItem {
  cursor: move;
}

#enhanceData .draggableItem.selectedItem {
  background-color: rgb(70 95 255 / 0.15);
}

#enhanceData .droppable {
  height: 110px;
}

.dark #enhanceData .draggableItem.selectedItem {
  background-color: rgba(70, 95, 255, 0.25);
}

/* ── Manage CMS URL Dealers (template/page/backend/manage-cms-url-dealers.php) */

#cmsUrlDealers .select2.select2-container {
  max-width: 200px !important;
}

#cmsUrlDealers .cms-inline-value {
  width: 100%;
  border: none;
  background: transparent;
  box-shadow: none;
  font: inherit;
  color: inherit;
  display: inline-block;
}

#cmsUrlDealers .cms-email-preview {
  display: inline-block;
  max-width: 200px;
  white-space: pre-wrap;
}

/* ── Create CMS URL (template/page/backend/create-cms-url.php) */

#createCmsUrl .select2-container {
  width: 100% !important;
}

#createCmsUrl .cms-readonly,
#createCmsUrl input.cms-readonly {
  background-color: #f3f4f6;
  color: #6b7280;
}

.dark #createCmsUrl .cms-readonly,
.dark #createCmsUrl input.cms-readonly {
  background-color: #1f2937;
  color: #9ca3af;
}

/* ── Customer Update (module=backend, action=customerUpdate) ─ */

#customerUpdate .cu-report-panel,
.summary .cu-report-panel {
  max-height: 500px;
  overflow-y: auto;
}

#updateUserCc .match {
  border-color: #465fff;
  background-color: #eef2ff;
}

.dark #updateUserCc .match {
  border-color: #465fff;
  background-color: rgba(70, 95, 255, 0.15);
}

#ftpAutomaticDownload .select2-container {
  width: 100% !important;
}

/* ── Call Centre Support (module=callCentreSupport) ─────────────────────── */

/* Tablesorter sort icons — vendor CSS per page; dark mode sort highlight */
.dark table.tablesorter thead tr .headerSortDown,
.dark table.tablesorter thead tr .headerSortUp {
  background-color: rgba(70, 95, 255, 0.15);
}

/* ── Escalations (module=escalations) ───────────────────────────────────── */

.dc-textarea-lg {
  min-height: 250px;
}

.escalation-note-text.limited {
  height: 258px;
  overflow: hidden;
}

/* ── Imports (module=import) ────────────────────────────────────────────── */

.imp-cell-not-set {
  background-color: #ffc125;
}

.imp-cell-not-imported {
  background-color: #f97c7c;
}

.imp-cell-no-def {
  color: #fff;
  background-color: #1e5ae7;
}

.imp-cell-ok {
  background-color: #83f97c;
}

.dc-row-match {
  background-color: #cdffe9;
}

.dc-row-mismatch {
  background-color: #ffe8e8;
}

.dark #impManualMatch .dc-row-match,
.dark #impVerifyImportDetails .dc-row-match {
  background-color: rgba(34, 197, 94, 0.15);
}

.dark #impManualMatch .dc-row-mismatch,
.dark #impVerifyImportDetails .dc-row-mismatch {
  background-color: rgba(239, 68, 68, 0.15);
}

#impManualMatch .dc-textarea-sm {
  min-height: 80px;
  width: 100%;
  max-width: 280px;
}

/* Verify import details — scrollable field grid */
#impVerifyImportDetails #scrollDiv {
  position: relative;
  clear: both;
  width: 100%;
  max-width: 100%;
  height: 800px;
  overflow: auto;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #ffffff;
}

.dark #impVerifyImportDetails #scrollDiv {
  border-color: #1f2937;
  background: #111827;
}

#impVerifyImportDetails #bodytable {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
}

#impVerifyImportDetails #bodytable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f2f4f7;
  color: #344054;
  text-align: left;
  height: 40px;
  padding: 8px 10px;
  min-width: 60px;
  white-space: nowrap;
  border-top: solid 1px #000;
  border-right: dotted 1px #000;
  box-shadow: 0 1px 0 #000;
}

.dark #impVerifyImportDetails #bodytable thead th {
  background: #1f2937;
  color: #fff;
}

#impVerifyImportDetails #bodytable thead th:first-child {
  border-left: solid 1px #000;
}

#impVerifyImportDetails #bodytable thead th:last-child {
  border-right: solid 1px #000;
}

#impVerifyImportDetails #bodytable tbody td {
  color: #374151;
  text-align: left;
  padding: 4px 10px;
  min-width: 60px;
  white-space: nowrap;
}

.dark #impVerifyImportDetails table td,
.dark #impVerifyImportDetails table th,
.dark #impVerifyImportDetails table td div,
.dark #impVerifyImportDetails table th div {
  color: #fff !important;
}

.dark #impVerifyImportDetails table td font {
  color: #9cb9ff !important;
}

.dark #impVerifyImportDetails table a {
  color: #9cb9ff;
}

.dark #impVerifyImportDetails table a:hover {
  color: #c2d6ff;
}

#impVerifyImportDetails .even td {
  border-top: solid 1px #000;
  border-right: dotted 1px #000;
}

#impVerifyImportDetails .even td:first-child,
#impVerifyImportDetails .odd td:first-child,
#impVerifyImportDetails .blankRow td:first-child {
  border-left: solid 1px #000;
}

#impVerifyImportDetails .even td:last-child,
#impVerifyImportDetails .odd td:last-child,
#impVerifyImportDetails .blankRow td:last-child {
  border-right: solid 1px #000;
}

#impVerifyImportDetails .odd td {
  border-top: dotted 1px #000;
  border-right: dotted 1px #000;
  border-bottom: solid 1px #000;
}

#impVerifyImportDetails .blankRow {
  border-bottom: solid 1px #000;
  border-top: dotted 1px #000;
  height: 21px;
}

#impVerifyImportDetails .blankRow td {
  border-right: dotted 1px #000;
}

/* ── Call List Report — question setup (setupQuestionsByActionType.php) ─── */

#clrSetupQuestions {
  max-width: 100%;
}

#clrSetupQuestions > h2 {
  font-size: 18px;
  font-weight: 600;
  color: #101828;
  margin: 0 0 4px 0;
}

.dark #clrSetupQuestions > h2 {
  color: #f9fafb;
}

#clrSetupQuestions .clr-stack > * + * {
  margin-top: 20px;
}

#clrSetupQuestions .clr-card {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #e4e7ec;
  background: #ffffff;
}

.dark #clrSetupQuestions .clr-card {
  border-color: #1f2937;
  background: #111827;
}

#clrSetupQuestions .clr-card-body {
  padding: 20px;
}

#clrSetupQuestions .clr-card-body > * + * {
  margin-top: 16px;
}

#clrSetupQuestions .clr-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #101828;
  margin: 0;
}

.dark #clrSetupQuestions .clr-section-title {
  color: #f9fafb;
}

#clrSetupQuestions .clr-option-rows > * + * {
  margin-top: 12px;
}

#clrSetupQuestions .clr-option-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: #344054;
}

.dark #clrSetupQuestions .clr-option-row {
  color: #f9fafb;
}

#clrSetupQuestions .clr-option-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: normal;
}

#clrSetupQuestions .clr-field-rows > * + * {
  margin-top: 12px;
}

#clrSetupQuestions .clr-field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e4e7ec;
}

.dark #clrSetupQuestions .clr-field-row {
  border-color: #374151;
}

#clrSetupQuestions .clr-field-row--template {
  border-style: dashed;
}

#clrSetupQuestions .clr-field-group {
  min-width: 0;
}

#clrSetupQuestions .clr-field-group .clr-label {
  display: block;
  margin-bottom: 4px;
}

#clrSetupQuestions .clr-field-inline {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-bottom: 4px;
}

#clrSetupQuestions .clr-field-inline label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  color: #344054;
}

.dark #clrSetupQuestions .clr-field-inline label {
  color: #f9fafb;
}

#clrSetupQuestions .clr-ajax-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

#clrSetupQuestions .clr-label {
  font-size: 14px;
  font-weight: 500;
  color: #344054;
}

.dark #clrSetupQuestions .clr-label {
  color: #f9fafb;
}

#clrSetupQuestions input[type="text"],
#clrSetupQuestions select,
#clrSetupQuestions textarea {
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid #d0d5dd;
  background: #ffffff;
  padding: 6px 12px;
  font-size: 14px;
  color: #344054;
  min-width: 160px;
  max-width: 100%;
}

#clrSetupQuestions input[type="text"]:focus,
#clrSetupQuestions select:focus,
#clrSetupQuestions textarea:focus {
  border-color: #9cb9ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(70, 95, 255, 0.15);
}

.dark #clrSetupQuestions input[type="text"],
.dark #clrSetupQuestions select,
.dark #clrSetupQuestions textarea {
  border-color: #374151;
  background: #111827;
  color: #f9fafb;
}

.dark #clrSetupQuestions input[type="text"]:focus,
.dark #clrSetupQuestions select:focus,
.dark #clrSetupQuestions textarea:focus {
  border-color: #465fff;
  box-shadow: 0 0 0 2px rgba(70, 95, 255, 0.25);
}

#clrSetupQuestions .clr-input--full {
  width: 100%;
}

#clrSetupQuestions .clr-btn-primary,
#clrSetupQuestions .clr-btn-default,
#clrSetupQuestions .clr-btn-compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.25;
}

#clrSetupQuestions .clr-btn-primary {
  background: #465fff;
  color: #ffffff;
}

#clrSetupQuestions .clr-btn-primary:hover {
  background: #3641f5;
}

#clrSetupQuestions .clr-btn-default {
  background: #ffffff;
  border-color: #d0d5dd;
  color: #344054;
}

#clrSetupQuestions .clr-btn-default:hover {
  background: #f9fafb;
}

.dark #clrSetupQuestions .clr-btn-default {
  background: #1f2937;
  border-color: #4b5563;
  color: #f9fafb;
}

.dark #clrSetupQuestions .clr-btn-default:hover {
  background: #374151;
}

#clrSetupQuestions .clr-btn-compact {
  padding: 6px 10px;
  background: #ffffff;
  border-color: #d0d5dd;
  color: #344054;
}

#clrSetupQuestions .clr-btn-compact:hover {
  background: #f9fafb;
}

.dark #clrSetupQuestions .clr-btn-compact {
  background: #1f2937;
  border-color: #4b5563;
  color: #f9fafb;
}

.dark #clrSetupQuestions .clr-btn-compact:hover {
  background: #374151;
}

#clrSetupQuestions .clr-btn-compact.clr-btn-danger {
  color: #ef4444;
}

#clrSetupQuestions .clr-link {
  color: #465fff;
  text-decoration: none;
}

#clrSetupQuestions .clr-link:hover {
  color: #3641f5;
}

.dark #clrSetupQuestions .clr-link {
  color: #9cb9ff;
}

.dark #clrSetupQuestions .clr-link:hover {
  color: #c2d6ff;
}

#clrSetupQuestions .clr-remove {
  font-size: 14px;
  color: #ef4444;
  text-decoration: none;
}

#clrSetupQuestions .clr-remove:hover {
  color: #dc2626;
}

#clrSetupQuestions .clr-table-wrap {
  overflow-x: auto;
}

#clrSetupQuestions .dealershipQuestionsTable {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

#clrSetupQuestions .dealershipQuestionsTable thead tr {
  border-top: 1px solid #e4e7ec;
  border-bottom: 1px solid #e4e7ec;
  background: #f2f4f7;
}

.dark #clrSetupQuestions .dealershipQuestionsTable thead tr {
  border-color: #1f2937;
  background: #1f2937;
}

#clrSetupQuestions .dealershipQuestionsTable th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475467;
}

.dark #clrSetupQuestions .dealershipQuestionsTable th {
  color: #f9fafb;
}

#clrSetupQuestions .dealershipQuestionsTable td {
  padding: 10px 16px;
  vertical-align: top;
  color: #344054;
}

.dark #clrSetupQuestions .dealershipQuestionsTable td {
  color: #f9fafb;
}

#clrSetupQuestions .dealershipQuestionsTable tbody tr + tr {
  border-top: 1px solid #f2f4f7;
}

.dark #clrSetupQuestions .dealershipQuestionsTable tbody tr + tr {
  border-top-color: #1f2937;
}

#clrSetupQuestions .dealershipQuestionsTable th.clr-th-action {
  width: 5rem;
}

#clrSetupQuestions .dealershipQuestionsTable th.clr-th-num {
  width: 4rem;
}

#clrSetupQuestions .dealershipQuestionsTable th.clr-th-header {
  width: 10rem;
}

#clrSetupQuestions .dealer-question-row {
  cursor: pointer;
}

#clrSetupQuestions .dealer-question-row:hover td {
  background-color: rgba(70, 95, 255, 0.08);
}

.dark #clrSetupQuestions .dealer-question-row:hover td {
  background-color: rgba(70, 95, 255, 0.15);
}

#clrSetupQuestions .question-textarea {
  min-height: 4rem;
  resize: vertical;
  width: 100%;
}

#clrSetupQuestions .clr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#clrSetupQuestions #setupDetailPanel {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(16, 24, 40, 0.5);
}

#clrSetupQuestions #setupDetailPanel.hidden {
  display: none;
}

#clrSetupQuestions .clr-modal-dialog {
  width: 100%;
  max-width: 48rem;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid #e4e7ec;
  background: #ffffff;
  box-shadow: 0 20px 24px -4px rgba(16, 24, 40, 0.08), 0 8px 8px -4px rgba(16, 24, 40, 0.03);
}

.dark #clrSetupQuestions .clr-modal-dialog {
  border-color: #1f2937;
  background: #111827;
}

#clrSetupQuestions .clr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e4e7ec;
}

.dark #clrSetupQuestions .clr-modal-header {
  border-bottom-color: #1f2937;
}

#clrSetupQuestions .clr-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #101828;
}

.dark #clrSetupQuestions .clr-modal-header h3 {
  color: #f9fafb;
}

#clrSetupQuestions .clr-modal-close {
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  background: #3641f5;
  border: none;
  cursor: pointer;
}

#clrSetupQuestions .clr-modal-close:hover {
  background: #2a31c4;
}

#clrSetupQuestions .clr-modal-body > * + * {
  margin-top: 16px;
}

#clrSetupQuestions .clr-modal-body {
  padding: 20px;
}

#clrSetupQuestions .clr-setup-panel > * + * {
  margin-top: 16px;
}

#clrSetupQuestions .clr-setup-section {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e4e7ec;
}

.dark #clrSetupQuestions .clr-setup-section {
  border-color: #374151;
}

#clrSetupQuestions .clr-setup-section h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #101828;
}

.dark #clrSetupQuestions .clr-setup-section h4 {
  color: #f9fafb;
}

#clrSetupQuestions .clr-setup-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  font-size: 14px;
  color: #344054;
}

@media (min-width: 640px) {
  #clrSetupQuestions .clr-setup-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.dark #clrSetupQuestions .clr-setup-grid {
  color: #f9fafb;
}

#clrSetupQuestions .clr-setup-grid label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: normal;
}

/* ── CMS Leads: leadRoundRobin (module=cms-leads) ───────────────────────── */

#cmsLeadRoundRobin .lrr-card {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.dark #cmsLeadRoundRobin .lrr-card {
  border-color: #1f2937;
  background: #111827;
}

#cmsLeadRoundRobin .lrr-label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.dark #cmsLeadRoundRobin .lrr-label {
  color: #d1d5db;
}

#cmsLeadRoundRobin .lrr-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  padding: 6px 12px;
  font-size: 14px;
  color: #374151;
  box-sizing: border-box;
}

#cmsLeadRoundRobin .lrr-input:focus {
  border-color: #9cb9ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(70, 95, 255, 0.15);
}

.dark #cmsLeadRoundRobin .lrr-input {
  border-color: #374151;
  background: #111827;
  color: #ffffff;
}

.dark #cmsLeadRoundRobin .lrr-input:focus {
  border-color: #465fff;
  box-shadow: 0 0 0 2px rgba(70, 95, 255, 0.25);
}

#cmsLeadRoundRobin .lrr-select-list {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  padding: 4px 8px;
  font-size: 14px;
  color: #374151;
  box-sizing: border-box;
}

.dark #cmsLeadRoundRobin .lrr-select-list {
  border-color: #374151;
  background: #111827;
  color: #ffffff;
}

#cmsLeadRoundRobin .lrr-btn-default,
#cmsLeadRoundRobin .lrr-btn-primary,
#cmsLeadRoundRobin .lrr-btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.25;
  text-decoration: none;
}

#cmsLeadRoundRobin .lrr-btn-primary {
  padding: 8px 16px;
  background: #465fff;
  color: #ffffff;
}

#cmsLeadRoundRobin .lrr-btn-primary:hover {
  background: #3641f5;
}

#cmsLeadRoundRobin .lrr-btn-success {
  padding: 8px 16px;
  background: #22c55e;
  color: #ffffff;
}

#cmsLeadRoundRobin .lrr-btn-success:hover {
  background: #16a34a;
}

#cmsLeadRoundRobin .lrr-btn-default {
  background: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}

#cmsLeadRoundRobin .lrr-btn-default:hover {
  background: #f9fafb;
}

.dark #cmsLeadRoundRobin .lrr-btn-default {
  border-color: #374151;
  background: #1f2937;
  color: #ffffff;
}

.dark #cmsLeadRoundRobin .lrr-btn-default:hover {
  background: #374151;
}

#cmsLeadRoundRobin .lrr-btn-block {
  width: 100%;
}

/* ── Global CCP: add-trigger (module=global-ccp, action=add-trigger) ──────── */

/* Tall HTML / SMS textarea */
#gcpAddTrigger .htmlHeight {
  min-height: 200px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  resize: vertical;
}

/* Shot typeahead suggestion dropdown */
#gcpAddTrigger .suggestion-list {
  position: absolute;
  z-index: 50;
  width: 20rem;
  max-height: 250px;
  overflow-y: auto;
  padding: 2px 0;
  background: #4b5563;
  border: 1px solid #374151;
  border-radius: 6px;
  font-size: 13px;
  color: #f3f4f6;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

#gcpAddTrigger .suggestion-list li {
  padding: 4px 10px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#gcpAddTrigger .suggestion-list li:last-child {
  border-bottom: none;
}

#gcpAddTrigger .suggestion-list li:hover {
  background: rgba(255,255,255,0.1);
}

#gcpAddTrigger .gcp-error-msg {
  display: block;
  color: #dc2626;
  font-size: 12px;
  font-style: normal;
  margin-top: 4px;
}

.dark #gcpAddTrigger .gcp-error-msg {
  color: #f87171;
}

#gcpAddTrigger .gcp-field-error {
  border: 1px solid #dc2626;
  border-radius: 0.5rem;
  padding: 2px;
}

#gcpAddTrigger .gcp-preview-scroll {
  max-height: 400px;
}

/* Small action buttons inside variable clone rows */
#gcpAddTrigger .gcp-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  padding: 2px 8px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1.4;
}

#gcpAddTrigger .gcp-action-btn:hover {
  background: #f3f4f6;
}

.dark #gcpAddTrigger .gcp-action-btn {
  border-color: #374151;
  background: #1f2937;
  color: #d1d5db;
}

.dark #gcpAddTrigger .gcp-action-btn:hover {
  background: #374151;
}

/* Inline email preview iframe */
#gcpAddTrigger #mailer_preview,
#gcpAddTrigger iframe.mailer_preview_iframe {
  width: 100%;
  height: 300px;
  min-height: 300px;
  border: 1px solid #d1d5db;
  background: #ffffff;
}

.dark #gcpAddTrigger #mailer_preview,
.dark #gcpAddTrigger iframe.mailer_preview_iframe {
  border-color: #374151;
  background: #ffffff;
}

/* Fullscreen email preview overlay — above TailAdmin header (z-99999) / sidebar */
#gcpAddTrigger ~ .fullscreen,
.fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: #000;
}

.fullscreen iframe.mailer_preview_iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.fullscreen .fullscreen-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  user-select: none;
}

.fullscreen .fullscreen-close:hover {
  color: #f87171;
}

/* ── JLRSA: Find GFK Customer (module=jlrsa, action=find-gfk-customer) ─── */

#jlrsaFindGfkCustomer #resultTable th:not(:last-child),
#jlrsaFindGfkCustomer #resultTable td:not(:last-child) { min-width: 200px; }
#jlrsaFindGfkCustomer #resultTable th:first-child,
#jlrsaFindGfkCustomer #resultTable td:first-child { min-width: 80px; }
#jlrsaFindGfkCustomer #resultTable th:nth-child(4),
#jlrsaFindGfkCustomer #resultTable td:nth-child(4) { min-width: 80px; }
#jlrsaFindGfkCustomer #resultTable th:nth-child(8),
#jlrsaFindGfkCustomer #resultTable td:nth-child(8) { min-width: 100px; text-align: center; }
#jlrsaFindGfkCustomer #resultTable th:nth-child(9),
#jlrsaFindGfkCustomer #resultTable td:nth-child(9) { min-width: 100px; text-align: center; }
#jlrsaFindGfkCustomer #resultTable th:nth-child(10),
#jlrsaFindGfkCustomer #resultTable td:nth-child(10) { min-width: 100px; }
#jlrsaFindGfkCustomer #resultTable th:nth-child(12),
#jlrsaFindGfkCustomer #resultTable td:nth-child(12) { min-width: 120px; }
#jlrsaFindGfkCustomer #resultTable th:nth-child(13),
#jlrsaFindGfkCustomer #resultTable td:nth-child(13) { min-width: 120px; }
#jlrsaFindGfkCustomer #resultTable th:last-child,
#jlrsaFindGfkCustomer #resultTable td:last-child { min-width: 90px; text-align: center; }

/* ── JLRSA: Data Quality Breakdown (module=jlrsa, action=data-quality-breakdown) */

#jlrsaDataQualityBreakdown .dqb-results {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

#jlrsaDataQualityBreakdown .dqb-section-card {
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.dark #jlrsaDataQualityBreakdown .dqb-section-card {
  border-color: #1f2937;
  background: #111827;
}

#jlrsaDataQualityBreakdown .dqb-section-header {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1.25rem;
}

.dark #jlrsaDataQualityBreakdown .dqb-section-header {
  border-bottom-color: #1f2937;
}

#jlrsaDataQualityBreakdown .dqb-section-body {
  padding: 0 1.25rem 1.25rem;
}

#jlrsaDataQualityBreakdown .dqb-section-footer {
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 0.75rem 1.25rem;
}

.dark #jlrsaDataQualityBreakdown .dqb-section-footer {
  border-top-color: #1f2937;
  background: rgba(17, 24, 39, 0.5);
}

#jlrsaDataQualityBreakdown .dc-report-table th:nth-child(9),
#jlrsaDataQualityBreakdown .dc-report-table td:nth-child(9),
#jlrsaDataQualityBreakdown .dc-report-table th:nth-child(10),
#jlrsaDataQualityBreakdown .dc-report-table td:nth-child(10) {
  min-width: 90px;
}

#jlrsaDataQualityBreakdown .dc-report-table th:nth-child(11),
#jlrsaDataQualityBreakdown .dc-report-table td:nth-child(11),
#jlrsaDataQualityBreakdown .dc-report-table th:nth-child(12),
#jlrsaDataQualityBreakdown .dc-report-table td:nth-child(12) {
  min-width: 120px;
}

#jlrsaDataQualityBreakdown .dc-report-table th:last-child,
#jlrsaDataQualityBreakdown .dc-report-table td:last-child {
  min-width: 60px;
  text-align: right;
  font-weight: 600;
}

/* ── JLRSA: Data Release (module=jlrsa, action=data-release) */

#jlrsaDataRelease .dr-filter-card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.dark #jlrsaDataRelease .dr-filter-card {
  border-color: #1f2937;
  background: #111827;
}

.dark #jlrsaDataRelease label,
.dark #jlrsaDataRelease .text-sm {
  color: #e5e7eb;
}

#jlrsaDataRelease .select2-container {
  min-width: 14rem;
  width: 100% !important;
}

#jlrsaDataRelease .dc-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: #465fff;
  border-radius: 0.25rem;
}

.dark #jlrsaDataRelease .select2-container--default .select2-selection--single,
.dark #jlrsaDataRelease .select2-container--default .select2-selection--multiple {
  background-color: #111827;
  border-color: #374151;
  color: #ffffff;
}

.dark #jlrsaDataRelease .select2-container--default .select2-selection--single .select2-selection__rendered,
.dark #jlrsaDataRelease .select2-container--default .select2-selection--multiple .select2-selection__rendered {
  color: #ffffff;
}

.dark #jlrsaDataRelease .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: #252dae;
  border-color: #3641f5;
  color: #dde9ff;
}

.dark #jlrsaDataRelease .dc-checkbox {
  background-color: #111827;
  border-color: #4b5563;
}

/* ── JLRSA: Lead Report (module=jlrsa, action=lead-report) */

#jlrsaLeadReport .dr-filter-card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.dark #jlrsaLeadReport .dr-filter-card {
  border-color: #1f2937;
  background: #111827;
}

.dark #jlrsaLeadReport label,
.dark #jlrsaLeadReport .text-sm {
  color: #e5e7eb;
}

/* ── JLRSA: Service Retention Download (module=jlrsa, action=serviceRetentionDownload) */

#jlrsaServiceRetentionDownload .dr-filter-card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.dark #jlrsaServiceRetentionDownload .dr-filter-card {
  border-color: #1f2937;
  background: #111827;
}

.dark #jlrsaServiceRetentionDownload label,
.dark #jlrsaServiceRetentionDownload .text-sm {
  color: #e5e7eb;
}

#jlrsaServiceRetentionDownload .dc-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: #465fff;
}

.dark #jlrsaServiceRetentionDownload .dc-checkbox {
  background-color: #111827;
  border-color: #4b5563;
}

/* ── JLRSA: Vehicle Interactions (module=jlrsa, action=vehicle-interactions) */

#jlrsaVehicleInteractions .dr-filter-card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.dark #jlrsaVehicleInteractions .dr-filter-card {
  border-color: #1f2937;
  background: #111827;
}

.dark #jlrsaVehicleInteractions label,
.dark #jlrsaVehicleInteractions .text-sm {
  color: #e5e7eb;
}

#jlrsaVehicleInteractions select.dc-input {
  min-width: 10rem;
}

/* ── JLRSA: Data Quality 3 (module=jlrsa, action=data-quality3) */

#jlrsaDataQuality3 .dq3-results {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

#jlrsaDataQuality3 .dq3-section-card {
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.dark #jlrsaDataQuality3 .dq3-section-card {
  border-color: #1f2937;
  background: #111827;
}

#jlrsaDataQuality3 .dq3-section-header {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1.25rem;
}

.dark #jlrsaDataQuality3 .dq3-section-header {
  border-bottom-color: #1f2937;
}

#jlrsaDataQuality3 .dq3-section-body {
  padding: 0 1.25rem 1.25rem;
}

#jlrsaDataQuality3 .dc-report-table th:last-child,
#jlrsaDataQuality3 .dc-report-table td:last-child {
  text-align: right;
}

/* ── JLRSA: Data Quality 3 View Data (module=jlrsa, action=data-quality3-viewdata) */

#jlrsaDataQuality3Viewdata .dc-report-table th:first-child,
#jlrsaDataQuality3Viewdata .dc-report-table td:first-child {
  min-width: 50px;
}

#jlrsaDataQuality3Viewdata .dc-report-table th:nth-child(8),
#jlrsaDataQuality3Viewdata .dc-report-table td:nth-child(8) {
  min-width: 70px;
}

/* ── Global CCP: Send Report (module=global-ccp, action=global-ccp-send-report) */

#gccpSendReport .dc-report-table th {
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  vertical-align: middle;
  white-space: nowrap;
}

.dark #gccpSendReport .dc-report-table th {
  border-color: #374151;
}

#gccpSendReport .dc-report-table tr:first-child th,
#gccpSendReport .dc-report-table tr:nth-child(2) th {
  background: #172357;
  color: #fff;
  font-weight: 600;
  text-align: center;
}

#gccpSendReport .dc-report-table tr:first-child th:first-child,
#gccpSendReport .dc-report-table tr:nth-child(2) th:first-child {
  text-align: left;
}

#gccpSendReport .dc-report-table tr:nth-child(n+3):not(:last-child) th:first-child {
  text-align: left;
  font-weight: 500;
  background: #fff;
  color: #374151;
  min-width: 280px;
  max-width: 420px;
  white-space: normal;
}

.dark #gccpSendReport .dc-report-table tr:nth-child(n+3):not(:last-child) th:first-child {
  background: #111827;
  color: #d1d5db;
}

#gccpSendReport .dc-report-table tr:nth-child(n+3):not(:last-child) th:not(:first-child) {
  text-align: center;
  font-weight: normal;
  background: #fff;
  color: #374151;
}

.dark #gccpSendReport .dc-report-table tr:nth-child(n+3):not(:last-child) th:not(:first-child) {
  background: #111827;
  color: #d1d5db;
}

#gccpSendReport .dc-report-table tr:nth-child(n+3):not(:last-child):hover th {
  background: #f9fafb;
}

.dark #gccpSendReport .dc-report-table tr:nth-child(n+3):not(:last-child):hover th {
  background: #1f2937;
}

#gccpSendReport .dc-report-table tr:last-child th {
  background: #f3f4f6;
  font-weight: 700;
  text-align: center;
  color: #111827;
}

.dark #gccpSendReport .dc-report-table tr:last-child th {
  background: #1f2937;
  color: #f3f4f6;
}

#gccpSendReport .dc-report-table tr:last-child th:first-child {
  text-align: right;
}

#gccpSendReport .dc-report-table th.center {
  text-align: center;
}

/* ── JLR CCP: Send Stats (module=jlr-ccp, action=send-stats) */

#jlrCcpSendStats .dr-filter-card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.dark #jlrCcpSendStats .dr-filter-card {
  border-color: #1f2937;
  background: #111827;
}

#jlrCcpSendStats .dc-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: #465fff;
}

.dark #jlrCcpSendStats .dc-checkbox {
  background-color: #111827;
  border-color: #4b5563;
}

#jlrCcpSendStats .dc-report-table th {
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  vertical-align: middle;
  white-space: nowrap;
}

.dark #jlrCcpSendStats .dc-report-table th {
  border-color: #374151;
}

#jlrCcpSendStats .stats-title-row th,
#jlrCcpSendStats .stats-subject-row th,
#jlrCcpSendStats .stats-month-row th {
  background: #172357;
  color: #fff;
  font-weight: 600;
}

#jlrCcpSendStats .stats-title-row th:first-child,
#jlrCcpSendStats .stats-subject-row th:first-child,
#jlrCcpSendStats .stats-month-row th:first-child {
  text-align: left;
}

#jlrCcpSendStats .stats-title-row th:not(:first-child),
#jlrCcpSendStats .stats-subject-row th:not(:first-child),
#jlrCcpSendStats .stats-month-row th:not(:first-child) {
  text-align: center;
}

#jlrCcpSendStats .stats-data-row th:first-child {
  text-align: left;
  font-weight: 500;
  background: #fff;
  color: #374151;
  min-width: 160px;
  white-space: normal;
}

.dark #jlrCcpSendStats .stats-data-row th:first-child {
  background: #111827;
  color: #d1d5db;
}

#jlrCcpSendStats .stats-data-row th:not(:first-child) {
  text-align: center;
  font-weight: normal;
  background: #fff;
  color: #374151;
}

.dark #jlrCcpSendStats .stats-data-row th:not(:first-child) {
  background: #111827;
  color: #d1d5db;
}

#jlrCcpSendStats .stats-data-row:hover th {
  background: #f9fafb;
}

.dark #jlrCcpSendStats .stats-data-row:hover th {
  background: #1f2937;
}

/* ── JLR CCP: Find Customer (module=jlr-ccp, action=find-customer) */

#jlrCcpFindCustomer .dr-filter-card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.dark #jlrCcpFindCustomer .dr-filter-card {
  border-color: #1f2937;
  background: #111827;
}

#jlrCcpFindCustomer .actionLinks {
  color: #465fff;
  text-decoration: none;
}

#jlrCcpFindCustomer .actionLinks:hover {
  text-decoration: underline;
}

.dark #jlrCcpFindCustomer .actionLinks {
  color: #9cb9ff;
}

/* ── JLR CCP: SSA Test Drive (module=jlr-ccp, action=ssa-testdrive) */

#jlrCcpSsaTestdrive .dr-filter-card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.dark #jlrCcpSsaTestdrive .dr-filter-card {
  border-color: #1f2937;
  background: #111827;
}

#jlrCcpSsaTestdrive .select2-container {
  width: 100% !important;
}

/* ── JLR CCP: Send Report (module=jlr-ccp, action=ccp-send-report) */

#jlrCcpSendReport .dr-filter-card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.dark #jlrCcpSendReport .dr-filter-card {
  border-color: #1f2937;
  background: #111827;
}

#jlrCcpSendReport .dc-report-table th {
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  vertical-align: middle;
  white-space: nowrap;
}

.dark #jlrCcpSendReport .dc-report-table th {
  border-color: #374151;
}

#jlrCcpSendReport .dc-report-table tr:first-child th,
#jlrCcpSendReport .dc-report-table tr:nth-child(2) th {
  background: #172357;
  color: #fff;
  font-weight: 600;
  text-align: center;
}

#jlrCcpSendReport .dc-report-table tr:first-child th:first-child,
#jlrCcpSendReport .dc-report-table tr:nth-child(2) th:first-child {
  text-align: left;
}

#jlrCcpSendReport .dc-report-table tr:nth-child(n+3):not(:last-child) th:first-child {
  text-align: left;
  font-weight: 500;
  background: #fff;
  color: #374151;
  min-width: 280px;
  max-width: 420px;
  white-space: normal;
}

.dark #jlrCcpSendReport .dc-report-table tr:nth-child(n+3):not(:last-child) th:first-child {
  background: #111827;
  color: #d1d5db;
}

#jlrCcpSendReport .dc-report-table tr:nth-child(n+3):not(:last-child) th:not(:first-child) {
  text-align: center;
  font-weight: normal;
  background: #fff;
  color: #374151;
}

.dark #jlrCcpSendReport .dc-report-table tr:nth-child(n+3):not(:last-child) th:not(:first-child) {
  background: #111827;
  color: #d1d5db;
}

#jlrCcpSendReport .dc-report-table tr:nth-child(n+3):not(:last-child):hover th {
  background: #f9fafb;
}

.dark #jlrCcpSendReport .dc-report-table tr:nth-child(n+3):not(:last-child):hover th {
  background: #1f2937;
}

#jlrCcpSendReport .dc-report-table tr:last-child th {
  background: #f3f4f6;
  font-weight: 700;
  text-align: center;
  color: #111827;
}

.dark #jlrCcpSendReport .dc-report-table tr:last-child th {
  background: #1f2937;
  color: #f3f4f6;
}

#jlrCcpSendReport .dc-report-table tr:last-child th:first-child {
  text-align: right;
}

#jlrCcpSendReport .dc-report-table th.center {
  text-align: center;
}

/* ── JLR CCP: Triggers List (module=jlr-ccp, action=list) */

#jlrCcpList .dr-filter-card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.dark #jlrCcpList .dr-filter-card {
  border-color: #1f2937;
  background: #111827;
}

#jlrCcpList .actionLinks {
  color: #465fff;
  text-decoration: none;
}

#jlrCcpList .actionLinks:hover {
  text-decoration: underline;
}

.dark #jlrCcpList .actionLinks {
  color: #9cb9ff;
}

#jlrCcpList .dc-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: #465fff;
}

.dark #jlrCcpList .dc-checkbox {
  background-color: #111827;
  border-color: #4b5563;
}

#jlrCcpList .dc-report-table td.whitespace-nowrap {
  white-space: nowrap;
}

#jlrCcpList .dc-results-toolbar input[type="submit"],
#jlrCcpList .dc-results-toolbar a.dc-btn-default {
  margin: 0;
}

#jlrCcpList .dc-rpp-label {
  flex-shrink: 0;
  white-space: nowrap;
}

#jlrCcpList select.dc-rpp-select {
  width: auto;
  min-width: 5rem;
  max-width: 6rem;
}

/* ── JLR CCP: View Imports (module=jlr-ccp, action=viewImports) */

#jlrCcpViewImports .dr-filter-card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.dark #jlrCcpViewImports .dr-filter-card {
  border-color: #1f2937;
  background: #111827;
}

#jlrCcpViewImports .dc-tab-nav {
  margin-bottom: 0;
}

#jlrCcpViewImports .dc-tab-link {
  display: inline-block;
  border-bottom: 2px solid transparent;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
}

#jlrCcpViewImports .dc-tab-link:hover {
  color: #374151;
  border-bottom-color: #d1d5db;
}

.dark #jlrCcpViewImports .dc-tab-link {
  color: #9ca3af;
}

.dark #jlrCcpViewImports .dc-tab-link:hover {
  color: #e5e7eb;
  border-bottom-color: #4b5563;
}

#jlrCcpViewImports .dc-tab-link.active {
  border-bottom-color: #465fff;
  color: #465fff;
}

.dark #jlrCcpViewImports .dc-tab-link.active {
  border-bottom-color: #9cb9ff;
  color: #9cb9ff;
}

#jlrCcpViewImports .actionLinks {
  color: #465fff;
  text-decoration: none;
}

#jlrCcpViewImports .actionLinks:hover {
  text-decoration: underline;
}

.dark #jlrCcpViewImports .actionLinks {
  color: #9cb9ff;
}

#jlrCcpViewImports .dc-modal-wide {
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

#jlrCcpViewImports .dc-modal-body {
  max-height: calc(90vh - 8rem);
}

/* ── Super Extract: List (module=extract, action=list) */

#extractList .dr-filter-card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.dark #extractList .dr-filter-card {
  border-color: #1f2937;
  background: #111827;
}

#extractList .actionLinks {
  color: #465fff;
  text-decoration: none;
}

#extractList .actionLinks:hover {
  text-decoration: underline;
}

.dark #extractList .actionLinks {
  color: #9cb9ff;
}

#extractList .extract-actions {
  width: 7rem;
  vertical-align: top;
}

#extractList .extract-meta {
  display: inline-block;
  margin-top: 0.25rem;
}

#extractList .dc-report-table td {
  vertical-align: top;
}

/* ── Super Extract: Update Vehicle Range (module=extract, action=update-vehicle-range) */

#extractUpdateVehicleRange .dr-filter-card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.dark #extractUpdateVehicleRange .dr-filter-card {
  border-color: #1f2937;
  background: #111827;
}

#extractUpdateVehicleRange input[type="file"].dc-input {
  padding: 0.375rem 0.5rem;
}

/* ── Super Extract: Modify (module=extract, action=modify) */

#extractModify .extract-modify-card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.dark #extractModify .extract-modify-card {
  border-color: #1f2937;
  background: #111827;
}

#extractModify .extract-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: #344054;
  cursor: pointer;
}

.dark #extractModify .extract-radio-label {
  color: #d0d5dd;
}

#extractModify .extract-btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

#extractModify input.nameWidth,
#extractModify select.nameWidth {
  max-width: 100%;
  width: 100%;
}

/* Inclusions / exclusions — original bordered-box layout */
#extractModify .left {
  float: left;
  text-align: left;
}

#extractModify .inclusionsDiv {
  max-width: 750px;
  width: 100%;
  border: 1px solid #9ca3af;
  color: #6b7280;
  margin-top: 15px;
  margin-left: 15px;
  padding: 15px;
}

.dark #extractModify .inclusionsDiv {
  border-color: #4b5563;
  color: #9ca3af;
}

#extractModify .modelDiv {
  border: 1px solid #9ca3af;
  color: #6b7280;
  margin-top: 15px;
  margin-left: 15px;
  float: left;
  position: relative;
  padding: 10px;
}

.dark #extractModify .modelDiv {
  border-color: #4b5563;
  color: #9ca3af;
}

#extractModify .removeModelSpan {
  position: absolute;
  top: 0;
  right: 0;
}

#extractModify input[type="text"].medium,
#extractModify select.medium {
  width: 110px;
  max-width: 100%;
}

#extractModify .ddBrand {
  width: 110px;
  max-width: 100%;
}

/* Select2 — scope card width + multiselect with selected chips */
#extractModify .extract-modify-card .select2-container {
  width: 100% !important;
  max-width: 100%;
}

#extractModify .extract-modify-card .select2-container--default .select2-selection--multiple {
  min-height: 38px;
  height: auto;
  border: 1px solid #d0d5dd;
  border-radius: 0.5rem;
  background-color: #ffffff;
  padding: 2px 8px;
}

#extractModify .extract-modify-card .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: #ecf3ff;
  border: 1px solid #c2d6ff;
  border-radius: 0.375rem;
  color: #2a31d8;
  margin: 4px 4px 0 0;
  padding: 2px 6px;
  float: left;
  font-size: 0.8125rem;
  line-height: 1.25rem;
}

#extractModify .extract-modify-card .select2-container--default .select2-search--inline .select2-search__field {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  margin-top: 5px;
  height: 24px;
}

#extractModify .extract-modify-card .select2-container--default.select2-container--focus .select2-selection--multiple,
#extractModify .extract-modify-card .select2-container--default.select2-container--open .select2-selection--multiple {
  border-color: #9cb9ff;
  outline: 2px solid #dde9ff;
  outline-offset: 0;
}

.dark #extractModify .extract-modify-card .select2-container--default .select2-selection--multiple {
  background-color: #111827;
  border-color: #374151;
}

.dark #extractModify .extract-modify-card .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: #252dae;
  border-color: #3641f5;
  color: #dde9ff;
}

.dark #extractModify .extract-modify-card .select2-container--default .select2-search--inline .select2-search__field {
  color: #ffffff;
}

#extractModify .select2-container--default.select2-container--disabled .select2-selection--single,
#extractModify .select2-container--default.select2-container--disabled .select2-selection--multiple {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Brand selects in inclusion blocks stay compact (native select, not select2) */
#extractModify .modelDiv select.ddBrand,
#extractModify .modelDiv select.dc-input.ddBrand {
  width: 110px;
  max-width: 100%;
}

/* ── Login form (template/page/login/form.php) ─────────────────────────── */

#panel_login .select2-container .select2-selection--single {
  height: 42px !important;
  border-radius: 0.5rem !important;
  border-color: #d0d5dd !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
}

#panel_login .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 42px !important;
  padding-left: 12px !important;
  color: #344054 !important;
}

#panel_login .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 42px !important;
}

#panel_login .select2-container--default .select2-search--dropdown .select2-search__field {
  font-size: 14px !important;
  border-radius: 0.375rem !important;
}

#panel_login .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #465fff !important;
}

#panel_login .select2-dropdown {
  border-radius: 0.5rem !important;
  border-color: #d0d5dd !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1) !important;
}

/* ── Copy Questions (template/page/questions/copyQuestions.php) ────────── */

#copyQuestions .droppable li {
  padding: 6px 10px;
  border-radius: 0.375rem;
  cursor: grab;
  font-size: 14px;
  color: #344054;
}

#copyQuestions .droppable li:hover {
  background-color: #f2f4f7;
}

#copyQuestions .droppable li.selectedItem {
  background-color: #465fff;
  color: #ffffff;
}

#copyQuestions #draggingContainer {
  background: #ffffff;
  border: 1px solid #465fff;
  border-radius: 0.5rem;
  padding: 4px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1);
  z-index: 999999;
}

.dark #copyQuestions .droppable li { color: #d0d5dd; }
.dark #copyQuestions .droppable li:hover { background-color: rgba(255, 255, 255, .05); }
.dark #copyQuestions .droppable li.selectedItem { background-color: #465fff; color: #fff; }

/* ── Calls stats (module=stats, action=calls2) ─────────────────────────── */

#statsCalls2 .callsBehindBg {
  background: #d6d6d6;
}

.dark #statsCalls2 .callsBehindBg {
  background: rgba(208, 213, 221, 0.2);
}

/* ── Calls to Zero (module=stats, action=calls-to-zero) ───────────────── */

#statsCallsToZero .dc-table-scroll table.stats {
  width: 100%;
  min-width: 100%;
  border: none;
}

#statsCallsToZero .dc-table-scroll table.stats th,
#statsCallsToZero .dc-table-scroll table.stats td {
  white-space: nowrap;
}

#statsCallsToZero .dc-table-scroll table.stats > tr > th:first-child {
  width: 1%;
}

#statsCallsToZero .dc-table-scroll table.stats th.dow,
#statsCallsToZero .dc-table-scroll table.stats th.day,
#statsCallsToZero .dc-table-scroll table.stats th.month {
  text-align: center;
}

/* ── Escalation Send Stats (module=stats, action=escalation-send-stats) ─ */

#statsEscalationSendStats .dc-table-scroll table.stats {
  width: 100%;
  min-width: 100%;
  border: none;
}

#statsEscalationSendStats .dc-table-scroll table.stats th,
#statsEscalationSendStats .dc-table-scroll table.stats td {
  white-space: nowrap;
}

/* ── Imports (module=stats, action=imports) ───────────────────────────── */

#statsImports .dc-table-scroll table.stats {
  width: 100%;
  min-width: 100%;
  border: none;
}

#statsImports .dc-table-scroll table.stats th,
#statsImports .dc-table-scroll table.stats td {
  white-space: nowrap;
}

#statsImports #canvas-holder {
  margin: 0 auto 1rem;
  height: 200px;
}

/* ── API Management: App Manage (module=api-management, action=app-manage) ─ */

#apiAppManage .ms-parent {
  display: block;
  width: 100% !important;
}

#apiAppManage .ms-choice {
  height: 38px;
  line-height: 38px;
  border-radius: 0.5rem;
  border-color: #d1d5db;
}

#apiAppManage .ms-drop {
  border-radius: 0.5rem;
  width: 100% !important;
}

#apiAppManage input[readonly] {
  background-color: #f9fafb;
  word-break: break-all;
}

.dark #apiAppManage .ms-choice {
  border-color: #374151;
  background-color: #111827;
  color: #fff;
}

.dark #apiAppManage input[readonly] {
  background-color: #111827;
}

/* ── API Management: Dealer-Set Manage (module=api-management, action=dealerset-manage) ─ */

#apiDealersetManage .ms-parent {
  display: block;
  width: 100% !important;
}

#apiDealersetManage .ms-choice {
  height: 38px;
  line-height: 38px;
  border-radius: 0.5rem;
  border-color: #d1d5db;
}

#apiDealersetManage .ms-drop {
  border-radius: 0.5rem;
  width: 100% !important;
}

.dark #apiDealersetManage .ms-choice {
  border-color: #374151;
  background-color: #111827;
  color: #fff;
}

/* ── API Management: Endpoint Manage (module=api-management, action=endpoint-manage) ─ */

#apiEndpointManage .ms-parent {
  display: block;
  width: 100% !important;
}

#apiEndpointManage .ms-choice {
  height: 38px;
  line-height: 38px;
  border-radius: 0.5rem;
  border-color: #d1d5db;
}

#apiEndpointManage .ms-drop {
  border-radius: 0.5rem;
  width: 100% !important;
}

.dark #apiEndpointManage .ms-choice {
  border-color: #374151;
  background-color: #111827;
  color: #fff;
}

/* ── API Management: App Menu Manage (module=api-management, action=appmenu-manage) ─ */

#apiAppmenuManage .api-tab-btn {
  display: inline-flex;
  align-items: center;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 0.4rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

#apiAppmenuManage .api-tab-btn.is-active {
  border-color: transparent;
  background: #465fff;
  color: #fff;
}

.dark #apiAppmenuManage .api-tab-btn {
  border-color: #374151;
  background: #111827;
  color: #fff;
}

.dark #apiAppmenuManage .api-tab-btn.is-active {
  background: #465fff;
}

#apiAppmenuManage .ms-parent {
  display: block;
  width: 100% !important;
}

#apiAppmenuManage .ms-choice {
  height: 38px;
  line-height: 38px;
  border-radius: 0.5rem;
  border-color: #d1d5db;
}

#apiAppmenuManage .ms-drop {
  border-radius: 0.5rem;
  width: 100% !important;
}

.dark #apiAppmenuManage .ms-choice {
  border-color: #374151;
  background-color: #111827;
  color: #fff;
}

/* ── API Management: Endpoint Profile Manage (module=api-management, action=endpointprofile-manage) ─ */

#apiEndpointprofileManage .ms-parent {
  display: block;
  width: 100% !important;
}

#apiEndpointprofileManage .ms-choice {
  height: 38px;
  line-height: 38px;
  border-radius: 0.5rem;
  border-color: #d1d5db;
}

#apiEndpointprofileManage .ms-drop {
  border-radius: 0.5rem;
  width: 100% !important;
}

.dark #apiEndpointprofileManage .ms-choice {
  border-color: #374151;
  background-color: #111827;
  color: #fff;
}

/* ── Correspondence: Campaign Send View (module=correspondence) ─ */

#corrCampaignSendView .upload-btn-wrapper {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

#corrCampaignSendView .upload-btn-wrapper input[type=file] {
  font-size: 100px;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  cursor: pointer;
}

/* ── Correspondence: Queue (module=correspondence, action=correspondence-queue) ─ */

#corrCorrespondenceQueue .corr-queue-progress {
  height: 1.25rem;
  width: 100%;
  min-width: 8rem;
  overflow: hidden;
  border-radius: 9999px;
  background-color: #e5e7eb;
}

#corrCorrespondenceQueue .corr-queue-progress-bar {
  display: flex;
  height: 100%;
  min-width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: #465fff;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  transition: width 0.3s ease;
}

.dark #corrCorrespondenceQueue .corr-queue-progress {
  background-color: #374151;
}

/* ── Triggers: Index (module=trigger, action=index) ─ */

#triggerIndex .trigger-actions {
  white-space: nowrap;
}

#triggerIndex .trigger-actions a {
  display: inline-block;
  margin-right: 0.5rem;
  color: #465fff;
}

#triggerIndex .trigger-actions a:hover {
  text-decoration: underline;
}

#triggerIndex .trigger-actions a.text-error-500,
#triggerIndex .trigger-actions a.deleteLink {
  color: #f04438;
}

#triggerIndex .trigger-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

#triggerIndex .trigger-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

#triggerIndex .trigger-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #d1d5db;
  border-radius: 9999px;
  transition: 0.2s;
}

#triggerIndex .trigger-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 9999px;
  transition: 0.2s;
}

#triggerIndex .trigger-switch input:checked + .trigger-slider {
  background-color: #465fff;
}

#triggerIndex .trigger-switch input:checked + .trigger-slider:before {
  transform: translateX(20px);
}

.dark #triggerIndex .trigger-slider {
  background-color: #4b5563;
}

#triggerIndex .select2-container {
  width: 100% !important;
}

/* ── Triggers: Add / Edit (module=trigger, action=add) ─ */

#triggerAdd .step {
  display: none;
}

#triggerAdd .trigger-dual-list {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: end;
  max-width: 48rem;
}

#triggerAdd .trigger-dual-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 0.25rem;
}

#triggerAdd .trigger-listbox {
  min-height: 10rem;
  height: 10rem;
}

#triggerAdd .suggestion-list {
  position: absolute;
  z-index: 50;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  margin-top: 2px;
  padding: 2px 0;
  list-style: none;
  background: #1f2937;
  color: #f9fafb;
  border-radius: 0.5rem;
  font-size: 0.8rem;
}

#triggerAdd .suggestion-list li {
  padding: 4px 10px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#triggerAdd .suggestion-list li:last-child {
  border-bottom: none;
}

#triggerAdd .suggestion-list li:hover {
  background: rgba(255, 255, 255, 0.1);
}

#triggerAdd .suggestion-loading {
  cursor: default;
  opacity: 0.7;
}

#triggerAdd .select2-container {
  width: 100% !important;
}

@media (max-width: 768px) {
  #triggerAdd .trigger-dual-list {
    grid-template-columns: 1fr;
  }

  #triggerAdd .trigger-dual-actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* ── Triggers: Edit Shot (module=trigger, action=editShot) ─ */

#triggerEditShot .htmlHeight {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

#triggerEditShot .trigger-preview-scroll {
  max-height: 500px;
  overflow: auto;
}

#triggerEditShot #mailer_preview,
#triggerEditShot iframe.mailer_preview_iframe {
  width: 100%;
  height: 500px;
  min-height: 500px;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #ffffff;
}

.dark #triggerEditShot #mailer_preview,
.dark #triggerEditShot iframe.mailer_preview_iframe {
  border-color: #374151;
}

/* ── Correspondence: Email & SMS Stats (module=correspondence) ─ */

#corrEmailSmsStatsModify .select2-container {
  width: 100% !important;
}

/* ── Tools: Migrate Customer (module=tools, action=migrate-customer) ─ */

#toolsMigrateCustomer .select2-container {
  width: 100% !important;
}

#toolsMigrateCustomer .migration-results {
  height: 400px;
  overflow-y: auto;
  border-radius: 0.75rem;
  border: 1px solid #374151;
  background: #111827;
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 1rem;
}

#toolsMigrateCustomer .migration-results:not(.dc-collapsed) {
  display: block;
}

/* ── Pagination first/prev/next/last (class.pagination.php) ─ */

.page_first {
  background: url(../images/paging_first.gif) top left no-repeat;
  height: 25px;
  width: 42px;
  position: relative;
}

.page_prev {
  background: url(../images/paging_previous.gif) top left no-repeat;
  height: 25px;
  width: 42px;
  position: relative;
}

.page_next {
  background: url(../images/paging_next.gif) top left no-repeat;
  height: 25px;
  width: 42px;
  position: relative;
}

.page_last {
  background: url(../images/paging_last.gif) top left no-repeat;
  height: 25px;
  width: 42px;
  position: relative;
}

a.fillspace {
  outline: none;
  border: 0;
  display: block;
  text-decoration: none;
  cursor: pointer;
  z-index: 9999;
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
}

/* Accounts distribution selection highlight */
.greenBg {
  color: #15803d;
  font-weight: bold;
}
