:root {
  --bs-text-muted: #5e6278;
  --bs-gray-500: #5e6278;
  --bs-gray-400: #7e8299;
  --bs-gray-300: #a1a5b7;
}

[data-bs-theme="dark"] {
  --bs-text-muted: #a1a5b7;
  --bs-gray-500: #a1a5b7;
  --bs-gray-400: #b5b5c3;
  --bs-gray-300: #dbdfe9;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
}

#view-content {
  padding-top: 1.25rem;
}

.action-buttons>input[type="text"] {
  width: 40px;
  border: none;
  border-bottom: 1px solid black;
}

.action-buttons input[type="checkbox"]+label {
  font-weight: 700;
  color: #1f2937;
}

.action-buttons input[type="checkbox"][value="sent"]+label {
  color: #198754;
}

#tableInvite .action-buttons input[type="checkbox"][value="sent"]+label {
  color: #b45309;
}

.action-buttons input[type="checkbox"][value="holdoff"]+label,
.action-buttons input[type="checkbox"][value="onhold"]+label {
  color: #b5651d;
}

.action-buttons input[type="checkbox"][value="postpone"]+label {
  color: #dc3545;
}

.action-buttons input[type="checkbox"][value="skip"]+label,
.action-buttons input[type="checkbox"][value="sequence"]+label,
.action-buttons input[type="checkbox"][value="skip/sequence"]+label,
.action-buttons input[type="checkbox"][value="skip_sequence"]+label {
  color: #0d6efd;
}

.action-buttons input[type="checkbox"][value="remove"]+label {
  color: #dc3545;
}

.action-buttons input[type="checkbox"][value="read"]+label {
  color: #6f42c1;
}

.action-buttons input[type="checkbox"][value="none"]+label {
  color: #475467;
}

.action-buttons input[type="checkbox"][value="sentWithMessage"]+label,
.action-buttons input[type="checkbox"][value="sentwithmessage"]+label,
.action-buttons input[type="checkbox"][value="sent_with_message"]+label {
  color: #1d4ed8;
}

.action-buttons input[type="checkbox"][value="connected"]+label {
  color: #7c3aed;
}

.action-buttons input[type="checkbox"][value="declined"]+label {
  color: #b42318;
}

.action-buttons input[type="checkbox"][value="little-interest"]+label,
.action-buttons input[type="checkbox"][value="little_interest"]+label {
  color: #8b5e34;
}

.action-buttons input[type="checkbox"][value="mild-interest"]+label,
.action-buttons input[type="checkbox"][value="mild_interest"]+label {
  color: #1d4ed8;
}

.action-buttons input[type="checkbox"][value="great-interest"]+label,
.action-buttons input[type="checkbox"][value="great_interest"]+label {
  color: #15803d;
}

.table-edit {
  width: 100%;
  border: none;
}

input.table-edit {
  width: 100%;
  min-width: 100px;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.tableCustom .dataTable td,
.tableCustom .dataTable th {
  padding: 1.50rem 0.75rem !important;
  /* Adjust the padding as needed */
}

.campaign-dropdown-item {
  display: flex !important;
  gap: 25px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  margin-left: 10px !important;
  padding: 2px 1px !important;
  min-width: 100%;
  box-sizing: border-box;
  margin-right: auto;
}

.campaign-dropdown-item.dropdown-item:hover {
  background-color: transparent !important;
}

.campaign-dropdown-item.dropdown-item input {
  cursor: pointer;
}

.label-black {
  color: black;
  cursor: pointer;
}

.disabled-link {
  pointer-events: none;
  color: gray;
  text-decoration: none;
}

#filterIndicator {
  font-size: 15px;
}

.bg-blue-linkedin-text {
  color: #0A65C0 !important;
}

.dt-paging-button.active>a {
  background-color: #0A65C0 !important;
}

.btn-primary {
  background-color: #0A65C0 !important
}

.truncate-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5em;
  max-height: 3em;
  white-space: normal;
}

.dropdown-toggle {
  background-color: #0A65C0 !important;
  /* Match the light gray background */
  color: #fff !important;
  /* Ensure text is black */
}

.dropdown-btn:hover {
  background-color: #1B84FF !important;
}

#refreshBtn,
#refreshConnectionsBtn {
  background-color: forestgreen;
  color: white;
}

#refreshBtn:hover {
  background-color: darkgreen !important;
  color: white !important;
}

.menu-btn {
  border: 5px solid lightgray !important;
  border-radius: 5px !important;
  padding: 6px 0px !important;
  box-sizing: border-box !important;
}

.inbox-top-buttons>* {
  flex: 0 0 auto;
  min-width: 180px;
  width: auto !important;
}

.inbox-top-buttons>.dropdown,
.inbox-top-buttons>a.btn {
  width: auto !important;
}

.inbox-top-buttons>.dropdown>.btn,
.inbox-top-buttons>a.btn {
  width: auto !important;
  min-width: 180px;
  white-space: nowrap;
}

.home-count {
  color: yellow;
}

.tableCustom {
  width: 100% !important;
  table-layout: auto !important;
  height: auto;
  /* Only if required */
}

.tableCustom th {
  position: relative;
  padding-right: 10px !important;
  white-space: nowrap;
  min-width: 90px;
}

table.dataTable thead th,
.dataTables_wrapper table thead th,
.dt-container table thead th {
  font-size: 1.08rem !important;
}

.th-content-wrapper {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: inherit;
}

.light-pink {
  background-color: pink;
  color: black;
}

.light-pink:hover {
  background-color: #ffb6c1;
}

.light-yellow {
  background-color: rgb(255, 255, 158);
  color: black;
}

.light-yellow:hover {
  background-color: rgb(240, 240, 120);
}

.light-red {
  background-color: rgb(255, 148, 148);
  color: black;
}

.light-red:hover {
  background-color: rgb(240, 100, 100);
}

.light-green {
  background-color: rgb(181, 255, 181);
  color: black;
}

.light-green:hover {
  background-color: rgb(130, 230, 130);
}

.light-orange {
  background-color: rgb(255, 217, 146);
  color: black;
}

.light-orange:hover {
  background-color: rgb(240, 190, 100);
}

.light-blue {
  background-color: rgb(179, 179, 255);
  color: black;
}

.light-blue:hover {
  background-color: rgb(140, 140, 240);
}

.light-gray {
  background-color: lightgray;
  color: black;
}

.light-gray:hover {
  background-color: #a9a9a9;
  /* darkgray */
}

.pink-btn:hover {
  background-color: rgb(224, 87, 133);
  color: white;
}

.guide-text {
  font-size: 18px !important;
}

.dtfh-floatingparent {
  top: 100px !important;
}

#kt_app_header {
  height: 90px !important;
}

.linkedin-msg-link {
  cursor: pointer;
}

.header-help-text {
  color: rgb(53, 53, 53);
}

.count-report {
  font-weight: bold;
}

.menu-item .menu-link {
  padding: 0.40rem 0.5rem !important;
}

#kt_app_sidebar .menu .menu-item.hover:not(.here)>a.menu-link[href]:not(.disabled):not(.active):not(.here),
#kt_app_sidebar .menu .menu-item:not(.here) a.menu-link[href]:hover:not(.disabled):not(.active):not(.here) {
  background-color: #0966c2 !important;
}

.homeRefresh:hover {
  background-color: lightgreen !important;
}

.dtfh-floatingparent-head {
  top: 90px !important;
  z-index: 1050 !important;
}

.refresh-button {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  font-size: 10px;
  padding: 2px 5px;
  cursor: pointer;
  z-index: 10;
}

.refresh-button:hover {
  background-color: rgba(255, 255, 255, 1);
}


.move-arrow::after {
  order: -1;
  margin-right: 1rem;
  margin-left: 0;
}

.align-button {
  line-height: 1.5;
}

.filter-checkbox {
  vertical-align: middle;
  position: relative;
  top: -1px;

}

.campaign-checkbox {
  display: flex;
  vertical-align: middle;
  position: relative;
  width: 20px;
  height: 20px;
}

.campaign-item {
  padding: 8px 12px;
  border-bottom: 1px solid #eee;

}

.campaign-item:last-child {
  border-bottom: none;
}

.campaign-item:hover {
  background-color: #f8f9fa;
}

#sourceCampaignsList {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 8px;
}

.merge-modal .modal-dialog {
  max-width: 800px;
}

#colorHex {
  display: none;
}

#colorPalette {
  max-width: 100%;
}

.color-swatch:hover {
  transform: scale(1.1);
}

/* TinyMCE color palette: circular swatches with centered checkmark */
.tox .tox-swatches__row {
  display: flex;
  gap: 4px;
  margin: 2px 0;
}

.tox .tox-swatches__row .tox-swatch {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  border-radius: 50% !important;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tox .tox-swatches__row .tox-swatch:hover,
.tox .tox-swatches__row .tox-swatch:focus {
  transform: scale(1.05);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.tox .tox-swatches__row .tox-swatch__color {
  border-radius: 50% !important;
}

.tox .tox-swatches__row .tox-swatch .tox-collection__item-checkmark {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tox .tox-swatches__row .tox-swatch .tox-collection__item-checkmark svg {
  fill: #ffffff !important;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.65));
}

.tox .tox-swatch--remove {
  display: none !important;
}

.disabled-btn {
  opacity: 0.5;
  cursor: not-allowed;
}

.multi-select-dropdown {
  position: relative;
  width: 100%;
}

.multi-select-dropdown .relationship-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #ccc;
  z-index: 2000;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.multi-select-dropdown .dropdown-toggle {
  cursor: pointer;
}

.dropdown-item {
  padding: 8px 12px;
  display: flex;
  align-items: flex-start;
}

.dropdown-item input[type="checkbox"] {
  margin-top: 4px;
  margin-right: 8px;
  cursor: pointer;
}

#relationshipFilterMenu {
  max-width: 100%;
  overflow-x: hidden;
}

#relationshipFilterMenu .dropdown-item {
  width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

#relationshipFilterMenu .dropdown-item label {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.primary-star {
  display: inline-block;
  font-size: 14px;
}

.set-primary-btn {
  display: inline-block;
  padding: 0 3px;
  margin-top: 1px;
  visibility: hidden;
  cursor: pointer;
}

label:hover .set-primary-btn {
  visibility: visible;
}

.dropdown-divider {
  border-top: 1px solid rgb(110, 109, 109);
  width: 16.7vw !important;
  /* Use full viewport width */
  margin-left: -32px !important;
  /* Offset parent's horizontal padding */
  margin-right: -32px !important;
}

.company-input {
  min-width: 100px !important;
}

.occupation-input {
  min-width: 150px !important;
}

.disabled-select {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background-color: #f1f1f1;
}

.btn-loader .spinner-border {
  display: inline-block !important;
  margin-left: 5px;
}

.exclude-checkbox {
  border: 2px solid #f64e60 !important;
  position: relative;
  width: 20px;
  height: 20px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
  padding: 0 !important;
}

.exclude-checkbox:checked {
  background-color: #f64e60;
}

.exclude-checkbox:checked::after {
  content: "✕";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
  gap: 5px
}

#campaignFilterMenu {
  min-width: 250px !important;
  width: max-content !important;
  max-width: none !important;
  /* allow it to grow fully */
  white-space: nowrap;
  /* prevent wrapping */
  box-sizing: border-box;
  padding: 10px 32px !important;
}

.form-check-label.label-black {
  display: inline-block;
  vertical-align: middle;
  margin: -20px;
  padding: 0;
  white-space: nowrap;
  line-height: 1.2;
  cursor: pointer;
}

.campaigns-heading {
  margin-top: 09px;
}

.fw-bold.text-dark {
  margin-top: -8px;
}

.campaign-checkbox {
  border: 2px solid #acacac !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(50%) sepia(100%) saturate(300%) hue-rotate(180deg);
  cursor: pointer;
}

#tableSpecialDashboard thead tr th,
#tableResponses thead tr th,
#tableNewConnection thead tr th,
#tableInvite thead tr th,
#tableDashboard thead tr th,
#tableUserListsDashboard thead tr th,
#tableSequence thead tr th,
#tableInbox thead tr th {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.unsaved-indicator {
  position: relative;
}

.unsaved-indicator::after {
  content: "●";
  position: absolute;
  top: 0;
  right: 0;
  color: #f1416c;
  font-size: 12px;
}

.dt-scroll-body {
  background: none !important;
}

.dt-scroll-body,
.dataTables_scrollBody {
  min-height: 120px;
}

@media (min-width: 992px) {

  main,
  span,
  ol,
  ul,
  pre,
  div {
    scrollbar-width: thin;
    scrollbar-color: #5c5a59 transparent;
  }

  main :hover,
  span :hover,
  ol :hover,
  ul :hover,
  pre :hover,
  div :hover {
    scrollbar-width: thin;
    scrollbar-color: #5c5a59 transparent;
  }
}

#goTopBtn {
  display: none;
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 99;
  font-size: 18px;
  border: none;
  outline: none;
  background-color: #2665eb;
  color: white;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

#goTopBtn.is-visible {
  display: block;
}

#goTopBtn:hover {
  background-color: #2665eb;
  transform: scale(1.1);
}

.last-contact-combined,
.next-contact-combined {
  display: flex;
  flex-direction: row;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

.form-control,
.form-control-solid {
  border-color: gray !important;
}

thead,
tbody,
tfoot {
  border-color: gray !important;
}

.dropdown-menu,
.multi-select-dropdown {
  border: 1px solid gray !important;
}

.compact-input {
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
  overflow-x: auto;
  white-space: nowrap;
}

.info-value {
  font-weight: 600;
  font-size: 1rem;
}

.has-unsaved-changes {
  border-left: 3px solid #f1416c !important;
  background-color: rgba(250, 4, 66, 0.05) !important;
}

#loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
}

#loadingOverlay .spinner-border {
  width: 4rem;
  height: 4rem;
}

.scrapping-page td pre {
  max-width: 500px !important;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

#view-content table tbody tr:hover {
  background-color: #e9e9e9 !important;
  cursor: pointer;
}

#view-content table tbody tr {
  transition: background-color 0.1s ease;
}

.input-with-clear {
  position: relative;
  display: inline-block;
}

.input-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  line-height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.input-clear-btn:hover {
  color: #333;
}

.input-with-clear input {
  padding-right: 35px;
}

.redirect-link {
  color: #0A65C0 !important;
}

.colorSelectPriority,
.colorSelect {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
}

.sequence-status-dropdown-wrapper {
  position: relative;
  min-width: 150px;
  max-width: 400px;
}

.sequence-status-toggle {
  min-width: 150px;
  max-width: 400px;
  padding: 8px 12px;
  cursor: pointer;
  padding: 5px;
  background: #f9f9f9;
  border: 1px solid #ccc;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sequence-status-toggle:hover {
  background-color: #f1f3f5 !important;
}

.sequence-status-dropdown-menu {
  min-width: 300px;
  max-width: 350px;
}

.sequence-status-dropdown-menu .accordion-button:focus {
  box-shadow: none;
}

.sequence-status-dropdown-menu .accordion-button:not(.collapsed) {
  background-color: #e8f4f8;
  color: #009ef7;
}

.sequence-status-option:active {
  transform: scale(0.98);
}

.sequence-status-dropdown-menu {
  z-index: 1050 !important;
}

.custom-dropdown {
  min-width: 100px;
  position: relative;
  width: 100%;
  cursor: pointer;
}

.custom-dropdown-selected {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
}

.dropdown-arrow {
  font-size: 10px;
  margin-left: 5px;
}

.custom-dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.custom-option {
  padding: 8px 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.custom-option:hover {
  background-color: #f5f5f5;
}

.custom-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

td.status-column-wide {
  min-width: 150px;
  max-width: 400px;
}

.message-row td {
  padding: 10px 12px !important;
}

.message-title {
  font-size: 15px;
  font-weight: 600;
}

.message-preview {
  font-size: 13px;
  color: #6c757d;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

body[data-page-key="messages_template"] .card {
  width: auto;
  max-width: calc(100vw - 2rem);
  overflow: visible;
}

body[data-page-key="messages_template"] .card-header {
  overflow: visible;
  position: relative;
  z-index: 20;
}

body[data-page-key="messages_template"] .card-body {
  position: relative;
  z-index: 1;
}

body[data-page-key="messages_template"] .app-main,
body[data-page-key="messages_template"] #view-content {
  min-width: 0;
  max-width: 100vw;
  overflow-x: hidden;
}

body[data-page-key="messages_template"] .table-responsive {
  max-width: 100%;
  overflow-x: hidden;
}

body[data-page-key="messages_template"] .message-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

body[data-page-key="messages_template"] .message-template-card-cell,
body[data-page-key="messages_template"] .template-popover-trigger {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

body[data-page-key="messages_template"] .message-template-card-actions {
  min-width: 0;
  flex-wrap: wrap;
}

body[data-page-key="messages_template"] .message-template-title-row {
  min-width: 0;
}

body[data-page-key="messages_template"] .message-template-title-row .message-title {
  flex: 0 1 auto;
  min-width: 0;
}

body[data-page-key="messages_template"] .message-template-title-meta {
  flex: 0 1 auto;
  margin-left: auto;
  min-width: 0;
}

body[data-page-key="messages_template"] .message-template-title-row .badge {
  flex: 0 0 auto;
}

body[data-page-key="messages_template"] .message-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page-key="messages_template"] .message-preview {
  display: block;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: break-word;
}

.message-row .btn-icon {
  width: 30px;
  height: 30px;
}

.message-row:hover {
  background-color: #f9fafb;
}

.tooltip-inner {
  max-width: 400px;
  text-align: left;
  white-space: normal;
  background: #e3e9f1;
}

.msg-count-display {
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}

.msg-count-display:hover,
.msg-count-display:focus {
  background-color: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
  border-color: rgba(13, 110, 253, 0.2);
  transform: scale(1.05);
}

.msg-count-input {
  width: 70px !important;
  text-align: center;
  border: 2px solid #0d6efd !important;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95em;
  transition: border-color 0.2s ease;
}

.msg-count-input:focus {
  border-color: #0866ff !important;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.status-option-popover~.popover,
.status-option-popover+.popover {
  border: 3px solid var(--status-border-color, #e4e6ef) !important;
  margin-right: 25px !important;
}

.popover:not(.template-popover) {
  border: 4px solid var(--status-border-color, #e4e6ef) !important;
  margin-right: 25px !important;
}

.popover.template-popover {
  border-width: 4px !important;
  border-radius: 6px !important;
  margin-right: 25px !important;
}

.status-item.opacity-75 {
  opacity: 0.75 !important;
}

.badge-warning {
  background-color: #ffc107;
  color: #000;
}

.editable-name {
  border-bottom: 1px dashed transparent;
  cursor: pointer;
  padding: 2px;
}

.editable-name:hover {
  background-color: #f8f9fa;
  border-bottom: 1px solid #007bff !important;
  padding: 2px 4px;
  border-radius: 3px;
}

.editable-name input.form-control {
  height: 28px;
  padding: 4px 8px;
}

#tableInbox tbody tr.error-highlight td,
#tableSequence tbody tr.error-highlight td {
  background-color: #fff3cd !important;
}

.DTFC_LeftBodyLiner tbody tr.error-highlight td,
.DTFC_LeftBodyLiner tbody tr.error-highlight th {
  background-color: #fff3cd !important;
}

#tableSequence tbody tr.dropdown-active-highlight td {
  background-color: #e3f2fd !important;
}

table.dataTable tbody tr.profile-open-highlight td {
  background-color: #aed4fc !important;
}

.DTFC_LeftBodyLiner tbody tr.profile-open-highlight td,
.DTFC_LeftBodyLiner tbody tr.profile-open-highlight th {
  background-color: #aed4fc !important;
}

.category-accordion .accordion-button {
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem;
}

.template-row {
  margin-bottom: 10px;
}

.template-card {
  border-radius: 8px;
  padding: 8px;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  flex: 2;
  display: flex;
}

.template-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.template-card.dragging {
  opacity: 0.5;
}

.template-row .d-flex.flex-column {
  pointer-events: auto;
  z-index: 1;
}

.template-row .copy-btn,
.template-row .edit-sequence-status {
  pointer-events: auto;
}

.template-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1;
  cursor: pointer;
  display: inline-block;
}

.template-title.editing {
  border: 1px solid #007bff;
  padding: 4px 8px;
  border-radius: 4px;
  background: white;
  outline: none;
  min-width: 200px;
}

.template-preview {
  font-size: 1rem;
  color: #4a4a4a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.empty-category {
  padding: 20px;
  text-align: center;
  color: #999;
  font-style: italic;
}

.accordion-body {
  padding: 15px;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.template-count {
  background: rgba(255, 255, 255, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px;
}

.popover {
  max-width: 500px;
}

.popover.bs-popover-auto[data-popper-placement^="right"] .popover-arrow::before,
.popover.bs-popover-end .popover-arrow::before {
  border-right-color: inherit !important;
}

.popover.bs-popover-auto[data-popper-placement^="right"] .popover-arrow::after,
.popover.bs-popover-end .popover-arrow::after {
  border-right-color: inherit !important;
}

.popover-header {
  padding: 8px 12px;
  margin-bottom: 0;
  font-size: 0.95rem;
  font-weight: 600;
  background-color: #f8f9fa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.popover-body {
  padding: 10px 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.sort-alpha-btn {
  border: 1px solid gray !important;
  height: 38px;
  min-height: 38px;
  padding: 0.5rem 1rem;
}

.message-templates-table tbody tr:hover td {
  background-color: #ffffff !important;
}

.lead-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e4e6ef;
}

.lead-avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e4e6ef;
}

.lead-select {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lead-select-content {
  flex: 1;
}

.preview-card-with-image {
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-magnifier {
  left: 1.25rem;
  z-index: 5;
}

.new-message-template {
  height: 38px;
  min-height: 38px;
  width: 38px;
  padding: 0;
}

.dropdown-toggle-templates {
  height: 38px;
  min-height: 38px;
  padding: 0.5rem 1rem;
}

.search-suggestion-modern {
  padding: 0;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 10px;
  margin-bottom: 4px;
  overflow: hidden;
}

.search-suggestion-modern:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.suggestion-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: white;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.suggestion-content {
  flex: 1;
  min-width: 0;
}

.suggestion-title {
  font-weight: 600;
  font-size: 0.95em;
  color: #1e293b;
  line-height: 1.3;
}

.suggestion-type-badge {
  background: #e3f2fd;
  color: #1976d2;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 500;
  white-space: nowrap;
}

.suggestion-preview {
  color: #64748b;
  font-size: 0.875em;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.suggestion-action {
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.search-suggestion-modern:hover .suggestion-action {
  opacity: 1;
}

.search-red-highlight,
.search-red-highlight td {
  border: 5px solid black !important;
  color: rgb(0, 0, 0) !important;
}

.search-red-highlight h3 {
  color: rgb(0, 0, 0) !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.is-invalid {
  border-color: #f1416c;
}

.template-option {
  transition: all 0.2s ease;
  cursor: pointer;
}

.template-option:hover {
  border-color: #0d6efd !important;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, .25);
  background-color: #f8f9ff !important;
}

.message-cell {
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
  max-width: 500px;
}

.template-option.form-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.25rem;
}

.template-option .form-check-input {
  position: static !important;
  margin: 0;
  flex-shrink: 0;
}

.template-option .form-check-label {
  margin: 0;
  padding: 0;
  cursor: pointer;
  width: 100%;
}

.type-separator {
  background-color: #0d6efd !important;
  /* Bootstrap primary blue */
  pointer-events: none;
}

.type-separator td {
  text-align: center !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: 1px;
  padding: 16px 10px !important;
  text-transform: uppercase;
}

.table-template-report thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background-color: #ffffff;
}

.template-table-container {
  overflow-y: auto;
  overflow-x: auto;
  position: relative;
}

.message-cell {
  white-space: pre-line;
  line-height: 1.3;
}

@page {
  margin: 0 !important;
  size: A4 landscape !important;
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body,
  html {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  .kt-body,
  .kt-appwrapper,
  .app-container {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .full-width-container {
    max-width: 100% !important;
    width: 100vw !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .template-report-card {
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }

  .template-report-card-header {
    padding: 15px 20px !important;
    margin: 0 !important;
  }

  .template-report-card-body {
    padding: 20px !important;
    margin: 0 !important;
  }

  .no-print {
    display: none !important;
  }

  .table-template-report {
    width: 100% !important;
    margin: 0 !important;
    font-size: 10px !important;
    table-layout: fixed !important;
    position: static !important;
  }

  .message-cell {
    word-break: break-word !important;
    max-width: none !important;
  }

  @page :first {
    margin: 0 !important;
  }

  @page :left {
    margin: 0 !important;
  }

  @page :right {
    margin: 0 !important;
  }

  @page :blank {
    margin: 0 !important;
  }

  @page :top {
    margin: 0 !important;
  }
}

@media screen {
  .full-width-container {
    max-width: 100% !important;
    width: 100% !important;
  }

  .template-table-container {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
  }
}

.message-templates-table {
  border-collapse: separate !important;
  border-spacing: 0 8px;
}

.template-card {
  transition: transform .15s ease, box-shadow .15s ease;
}

.template-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.message-templates-table tbody tr>td {
  background-color: transparent !important;
  padding: 0 !important;
}

.message-templates-table tbody tr {
  border-radius: 20px !important;
}

.table-template-report tbody tr.hoverable {
  background-color: transparent;
}

.table-template-report tbody tr.hoverable:nth-of-type(odd) {
  background-color: #f8f9fa;
}

.table-template-report tbody tr.hoverable:nth-of-type(even) {
  background-color: #d8dee6;
}

.search-suggestions-dropdown {
  z-index: 1050;
  max-height: 70vh;
  overflow-y: auto;
  display: none;
  top: 100%;
  left: 0;
}

.tag-dropdown {
  position: relative;
}

.tag-dropdown-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 9999;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .15);
}

.tag-filter-row {
  cursor: pointer;
}

.tag-filter-row:hover {
  background-color: #f5f8fa;
}

.tag-exclude-red {
  border: 2px solid #dc3545;
}

.tag-exclude-red:checked {
  background-color: #dc3545;
  border-color: #dc3545;
}

.campaign-select {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-pills-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 160px;
}

.tag-pill {
  width: auto;
  max-width: 100%;
  padding: 2px 8px;
  white-space: nowrap;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  align-items: end;
  margin-bottom: 10px;
}

.filter-item {
  display: flex;
  flex-direction: column;
}

.saved-search-item {
  gap: 0.35rem;
}

.saved-search-dropdown {
  width: 100%;
}

.saved-search-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

.saved-search-dropdown-menu {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

.saved-search-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #e4e6ef;
  border-radius: 0.475rem;
  background: #ffffff;
  padding: 4px;
}

.saved-search-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 0.375rem;
  padding: 0.55rem 0.65rem;
  white-space: nowrap;
}

.saved-search-option-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-search-option.active {
  background-color: #e8f0ff;
  color: #0a58ca;
}

.saved-search-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  width: 100%;
}

.saved-search-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  min-width: 0;
}

#view-content {
  overflow-x: hidden;
}

.search-responders-filter {
  justify-content: flex-end;
}

.search-responders-filter-control {
  justify-content: flex-start;
  min-height: calc(1.5em + 1.65rem + 2px);
}

.search-responders-filter .form-check-input {
  margin-top: 0;
  flex-shrink: 0;
}

.search-responders-filter-label {
  color: #181c32;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.filters-dropdown-menu {
  min-width: 260px;
  padding: 0.75rem;
}

.filters-dropdown-menu .status-filters-scroll {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.filters-dropdown-menu .status-filter-btn,
.filters-dropdown-menu .priority-filter-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.35rem;
}

.filters-dropdown-menu .status-filter-btn label,
.filters-dropdown-menu .priority-filter-btn label {
  margin-bottom: 0;
  cursor: pointer;
}

.prospect-filters-dropdown-menu {
  min-width: 320px;
}

.prospect-filters-section {
  padding-top: 0.5rem;
}

.prospect-filters-dropdown-menu.prospect-filters-tabbed .prospect-filters-section {
  display: none;
}

.prospect-filters-dropdown-menu.prospect-filters-tabbed .prospect-filters-section.active {
  display: block;
}

.prospect-filters-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.prospect-filter-tab-btn {
  border: 1px solid #e4e6ef;
  background: #f5f8fa;
  color: #3f4254;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.5rem 0.6rem;
  line-height: 1.2;
  border-radius: 0.475rem;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
}

.prospect-filter-tab-btn:hover {
  background: #eef3f7;
}

.prospect-filter-tab-btn.active {
  background: #0966c2;
  border-color: #0966c2;
  color: #ffffff;
}

.prospect-filter-tab-btn.active .text-danger {
  color: #ffc700 !important;
}

.prospect-tag-filter-menu {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.find-prospect-filter-list {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #e4e6ef;
  border-radius: 0.475rem;
  background: #ffffff;
}

.find-prospect-filter-list .dropdown-item {
  white-space: normal;
}

.color-swatch {
  width: 35px;
  height: 35px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.color-swatch.selected {
  border: 3px solid #000;
  box-shadow: 0 0 0 2px #fff inset;
}

.status-item {
  transition: all 0.3s ease;
}

.status-item:hover {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.color-swatch {
  width: 35px;
  height: 35px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.color-swatch.selected {
  border: 2px solid #000;
  box-shadow: 0 0 0 2px #fff inset;
}

#tagsModal .modal-title,
#tagsModal .form-label,
#tagsModal label {
  color: #000 !important;
}

.pdf-export-hide {
  display: none !important;
}

.pdf-export-show {
  display: block !important;
}

.pdf-page-spacer {
  height: 25mm;
  width: 100%;
}

@media print {
  .pdf-page-spacer {
    display: block;
    page-break-before: always;
  }
}

.status-filter-all {
  background-color: #e5e7eb !important;
  color: #111827 !important;
  border: 1px solid #d1d5db;
}

.dark-check {
  border: 2px solid #333;
}

#campaignSearchFilterMenu {
  min-width: 250px !important;
  width: max-content !important;
  max-width: none !important;
  white-space: nowrap;
  box-sizing: border-box;
  max-height: 60vh;
  overflow-y: auto;
}

.single-line-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.single-line-card .template-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.single-line-card .controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.apply-tag-to-all {
  opacity: 0.7;
}

.apply-tag-to-all:hover {
  opacity: 1;
  transform: scale(1.1);
}

.custom-card-bg {
  background-color: lightgray;
}

.truncate-text-2 {
  max-width: 230px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.red-star {
  color: red !important;
  margin: 0px 2px 0px 2px;
}

.fit-width {
  width: fit-content;
  max-width: 100%;
  outline: none;
}

.manual-edited {
  background-color: #fff8e1 !important;
}

.lock-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #f59e0b;
  cursor: pointer;
}

.description-preview {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.text-brown {
  color: #c58205 !important;
}

.tooltip-inner {
  border: 2px solid #0966c2 !important;
}

.tooltip-inner> :first-child {
  margin-top: 0;
}

.tooltip-inner> :last-child {
  margin-bottom: 0;
}

.find-prospect-bulk-panel {
  border: 1px solid #d8e2f1;
  border-radius: 1rem;
  background: linear-gradient(135deg, #f7fbff 0%, #eef6ff 100%);
}

.bulk-priority-select,
.bulk-status-select {
  min-width: 220px;
  border: 1px solid #d8e2f1;
  font-weight: 600;
}

#bulkTagDropdownButton {
  min-width: 220px;
}

#bulkSelectionPanel .dropdown-menu {
  max-height: 280px;
  overflow-y: auto;
}

.prospect-row-selector,
.prospect-select-all {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.sequence-templates-page .template-row {
  position: relative;
  z-index: 1;
}

.sequence-templates-page .template-row.template-row-dropdown-open {
  z-index: 1200;
}

.sequence-templates-page .template-card {
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.sequence-templates-page .template-preview {
  color: #333;
  margin-top: 4px;
  max-height: 40px;
  overflow: hidden;
  line-height: 1.25;
}

.sequence-copy-alert {
  z-index: 9999;
  top: 20px;
  right: 20px;
}

.sequence-templates-page .sequence-template-tags-dropdown .dropdown-menu {
  z-index: 1210 !important;
}

.sequence-templates-page .template-row-dropdown-open .template-card {
  transform: none !important;
}

.sequence-templates-page .tooltip {
  z-index: 2000 !important;
}

.sequence-templates-page .popover {
  z-index: 2001 !important;
}

.sequence-templates-page .popover.template-popover {
  z-index: 2002 !important;
}

.sequence-templates-page .sequence-template-tag-filter-menu {
  min-width: 250px;
  z-index: 2000;
}

.sequence-templates-page .sequence-template-tag-menu {
  min-width: 240px;
  z-index: 2000;
}

.messages-templates-page .message-templates-table tbody tr {
  position: relative;
  z-index: 1;
}

.messages-templates-page .message-templates-table tbody tr.template-row-dropdown-open {
  z-index: 1200;
}

.messages-templates-page .message-templates-table .template-tags-dropdown .dropdown-menu {
  z-index: 1210 !important;
}

.messages-templates-page .message-templates-table .template-row-dropdown-open .template-card {
  transform: none !important;
  overflow: visible;
}

.messages-templates-page .message-templates-table tr.template-row-dropdown-open td {
  overflow: visible;
}

.messages-templates-page .tooltip {
  z-index: 2000 !important;
}

.messages-templates-page .popover {
  z-index: 2001 !important;
}

.messages-templates-page .popover.template-popover {
  z-index: 2002 !important;
}

.messages-templates-page .message-template-search-wrap {
  width: 350px;
}

.messages-templates-page .messages-template-tag-menu {
  min-width: 240px;
  z-index: 2000;
}

.messages-templates-page .messages-template-tag-filter-menu {
  z-index: 2300 !important;
}

.messages-templates-page .message-templates-table thead .dropdown {
  position: relative;
  z-index: 2200;
}

.messages-templates-page .message-templates-table {
  table-layout: fixed;
  width: 100%;
}

.messages-templates-page .messages-template-admin-wrap {
  width: 100%;
}

.messages-templates-page .message-template-search-control {
  flex: 0 1 320px;
  max-width: 320px;
  width: 320px;
}

.messages-templates-page .message-template-accordion-section .message-template-accordion-toggle {
  cursor: pointer;
}

.messages-templates-page .message-template-accordion-section .accordion-icon {
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

.messages-templates-page .message-template-accordion-section .message-template-accordion-toggle:not(.collapsed) .accordion-icon {
  transform: rotate(90deg);
}

.messages-templates-page .message-template-accordion-section .accordion-header h3 {
  min-width: 0;
}

.messages-templates-page .template-card {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.messages-templates-page .message-template-card {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.messages-templates-page .card-header {
  flex-wrap: wrap;
}

.messages-templates-page .card-header>.d-flex {
  flex-wrap: wrap;
}

.messages-templates-page .template-card-main,
.messages-templates-page .template-card-text,
.messages-templates-page .template-card-copy {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}

.messages-templates-page .template-card-actions {
  flex: 0 0 auto;
}

.messages-templates-page .template-card-title-row {
  min-width: 0;
}

.messages-templates-page .template-card-title-row .template-popover-target {
  max-width: 100%;
}

.messages-templates-page .template-preview-max {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messages-templates-page .message-template-card .message-preview {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 575.98px) {

  .messages-templates-page .message-template-search-wrap,
  .messages-templates-page .message-template-search-control,
  .messages-templates-page .card-header .position-relative {
    width: 100%;
  }

  .messages-templates-page .message-template-search-control {
    max-width: 100%;
  }

  .messages-templates-page .message-template-card-actions {
    align-items: flex-start !important;
    flex-direction: column;
  }

  .messages-templates-page .message-template-accordion-section .accordion-header {
    align-items: flex-start !important;
    flex-direction: column;
  }
}

body[data-page-key="messages_template"] .template-row {
  position: relative;
  z-index: 1;
}

body[data-page-key="messages_template"] .table-responsive {
  overflow: visible;
}

body[data-page-key="messages_template"] .template-row.template-row-dropdown-open {
  z-index: 1200;
}

body[data-page-key="messages_template"] .template-row.template-row-dropdown-open .message-template-card-cell {
  position: relative;
  z-index: 2200;
  overflow: visible;
}

body[data-page-key="messages_template"] .template-row.template-row-dropdown-open .message-template-card {
  position: relative;
  z-index: 2210;
  overflow: visible;
}

body[data-page-key="messages_template"] .template-tags-dropdown .dropdown-menu,
body[data-page-key="messages_template"] .messages-template-tag-menu {
  z-index: 2000 !important;
}

body[data-page-key="messages_template"] .messages-template-tag-filter-menu,
body[data-page-key="messages_template"] .messages-template-tags-menu {
  z-index: 2300 !important;
}

body[data-page-key="messages_template"] .messages-template-tags-menu {
  max-height: min(70vh, 520px);
  min-width: min(360px, calc(100vw - 2rem));
  overflow-y: auto;
  width: min(360px, calc(100vw - 2rem));
}

.message-tag-edit-dialog .swal2-html-container {
  overflow-x: hidden;
}

.message-tag-edit-dialog .message-tag-edit-name {
  width: min(100%, 260px);
  margin: 0 auto 0.75rem;
}

.template-tag-chip,
.message-tag-preview-badge {
  background-color: #eef0f3 !important;
  border: 1px solid rgba(31, 41, 55, 0.14);
  color: #1f2937;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

#pageTable tbody tr {
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

#pageTable tbody tr.sortable-ghost {
  opacity: 0.5;
}

#pageTable tbody tr.sortable-chosen {
  background: #f8f5ff;
}

#pageTable tbody tr.sortable-drag {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-order-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.drag-page-handle {
  width: 30px;
  height: 30px;
  border: 1px solid #e4e6ef;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  background: #fff;
  color: #5e6278;
  font-size: 14px;
  line-height: 1;
  user-select: none;
}

.drag-page-handle:active {
  cursor: grabbing;
}

.page-order-badge {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef3f7;
  color: #5e6278;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-body {
  padding: 1rem !important;
}

.sequence-tab-toggle.active {
  color: var(--bs-primary) !important;
  border-bottom: 2px solid var(--bs-primary) !important;
  font-weight: 700;
}

.sequence-tab-toggle {
  font-size: 1.3rem !important;
}

/* Scrub pages toolbar */
.scrub-controls-shell {
  position: sticky;
  top: calc(var(--kt-app-header-height, 70px) + 6px);
  z-index: 120;
  width: 100%;
  background: var(--bs-card-bg, #fff);
}

.scrub-controls-grid {
  width: 100%;
}

.scrub-controls-grid .scrub-search-field,
.scrub-controls-grid .scrub-global-search-field {
  position: relative;
  min-width: 0;
}

.scrub-controls-grid .form-control {
  width: 100%;
}

.scrub-input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #98a2b3;
  pointer-events: none;
  z-index: 2;
}

.scrub-icon-field .form-control {
  min-height: 36px;
  padding-left: 2rem !important;
}

.scrub-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.scrub-action-item {
  flex: 0 0 auto;
  min-width: fit-content;
}

.scrub-action-item .btn {
  width: auto;
  white-space: nowrap;
}

.scrub-status-counts h2 {
  margin: 0 !important;
  font-size: 1.25rem !important;
  font-weight: 700;
}

.scrub-status-counts .badge {
  font-size: 1rem !important;
}

.scrub-search-field label {
  display: none;
}

.scrub-global-search-field #clearSearch {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
  z-index: 3;
}

.scrub-table-wrap {
  overflow: hidden;
}

.scrub-table-wrap .dataTables_scrollBody {
  max-height: 58vh !important;
  overflow-y: auto !important;
}

.scrub-table-wrap .dataTables_scrollHeadInner,
.scrub-table-wrap table.dataTable {
  width: 100% !important;
}

@media (max-width: 992px) {
  .scrub-action-item .btn {
    max-width: 100%;
  }
}

/* Saleshelper-style app shell */
:root {
  --ch-highlight: #0966c2;
  --ch-sidebar: #faf9f4;
  --ch-sidebar-active: #0966c2;
  --ch-sidebar-text: #0f1720;
  --ch-sidebar-muted: #69737d;
  --ch-sidebar-border: rgba(15, 23, 32, 0.12);
}

body.app-default {
  background: #f5f8fa;
}

.app-header {
  border-bottom: 1px solid #eff2f5;
  background: #fff;
}

#kt_app_header_container {
  min-height: 70px;
}

.ch-header-page-title {
  max-width: min(58vw, 760px);
  overflow: hidden;
  font-size: 1.45rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-header-subtitle {
  letter-spacing: 0;
}

.ch-sidebar-logo-link {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .app-sidebar-logo {
  min-height: 92px;
}

#kt_app_sidebar {
  background: var(--ch-sidebar) !important;
  border-right: 1px solid rgba(15, 23, 32, 0.08) !important;
  box-shadow: 10px 0 30px rgba(15, 23, 32, 0.08);
}

#kt_app_sidebar_logo {
  min-height: 92px;
  padding: 0.8rem 0.9rem !important;
  border-bottom: 0 !important;
}

#kt_app_sidebar_logo .app-sidebar-logo-default {
  height: 72px !important;
  max-width: 220px;
  object-fit: contain;
}

#kt_app_sidebar_toggle {
  width: 30px !important;
  height: 30px !important;
  border: 1px solid rgba(15, 23, 32, 0.08) !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  box-shadow: 0 7px 16px rgba(15, 23, 32, 0.16) !important;
}

#kt_app_sidebar_menu_scroll {
  margin: 0 !important;
  padding: 0 0.45rem 1rem;
}

#kt_app_sidebar .menu {
  gap: 0.18rem;
}

#kt_app_sidebar .menu-item .menu-link {
  min-height: 42px;
  margin: 0.12rem 0 !important;
  padding: 0.58rem 0.65rem !important;
  border-radius: 6px !important;
  color: var(--ch-sidebar-text) !important;
  transition: background-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

#kt_app_sidebar .menu-item .menu-icon {
  width: 2.2rem;
  min-width: 2.2rem;
  color: #6d7882 !important;
}

#kt_app_sidebar .menu-item .menu-icon i,
#kt_app_sidebar .menu-item .menu-title,
#kt_app_sidebar .menu-item .menu-link .badge {
  color: var(--ch-sidebar-text) !important;
}

#kt_app_sidebar .menu-item .menu-icon i {
  font-size: 1.22rem !important;
}

#kt_app_sidebar .menu-item .menu-title {
  font-size: 1.12rem !important;
  font-weight: 500;
  letter-spacing: 0;
}

#kt_app_sidebar .menu .menu-item .menu-heading {
  color: #53606a !important;
  font-size: 1.18rem !important;
  font-weight: 800;
  letter-spacing: 0;
}

#kt_app_sidebar .menu .menu-item.hover:not(.here)>a.menu-link[href]:not(.disabled):not(.active):not(.here),
#kt_app_sidebar .menu .menu-item:not(.here) a.menu-link[href]:hover:not(.disabled):not(.active):not(.here),
#kt_app_sidebar .menu-item .menu-link:hover,
#kt_app_sidebar .menu-item .menu-link.active,
#kt_app_sidebar .menu-item .menu-link.here {
  background: var(--ch-sidebar-active) !important;
  color: #ffffff !important;
  transform: none;
}

#kt_app_sidebar .menu-item .menu-link:hover .menu-icon,
#kt_app_sidebar .menu-item .menu-link:hover .menu-icon i,
#kt_app_sidebar .menu-item .menu-link:hover .menu-title,
#kt_app_sidebar .menu-item .menu-link:hover .badge,
#kt_app_sidebar .menu-item .menu-link.active .menu-icon,
#kt_app_sidebar .menu-item .menu-link.active .menu-icon i,
#kt_app_sidebar .menu-item .menu-link.active .menu-title,
#kt_app_sidebar .menu-item .menu-link.active .badge,
#kt_app_sidebar .menu-item .menu-link.here .menu-icon,
#kt_app_sidebar .menu-item .menu-link.here .menu-icon i,
#kt_app_sidebar .menu-item .menu-link.here .menu-title,
#kt_app_sidebar .menu-item .menu-link.here .badge {
  color: #ffffff !important;
}

#kt_app_sidebar .badge-light-primary {
  background: rgba(9, 102, 194, 0.12) !important;
}

#kt_app_sidebar .menu-item .menu-link:hover .badge-light-primary,
#kt_app_sidebar .menu-item .menu-link.active .badge-light-primary,
#kt_app_sidebar .menu-item .menu-link.here .badge-light-primary {
  background: rgba(255, 255, 255, 0.18) !important;
}

[data-kt-app-sidebar-minimize=on] .app-sidebar:not(:hover) .ch-sidebar-logo-link {
  justify-content: center;
  width: 100%;
}

/* Login greeting messages */
#kt_app_header_container {
  gap: 12px;
  position: relative;
}

.mh-header-title-area {
  display: flex;
  align-items: center;
  align-self: stretch;
  padding: 8px 0;
  min-width: 0;
}

.mh-header-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}

.mh-header-brand-logo {
  width: 180px;
  max-width: 42vw;
  height: auto;
  object-fit: contain;
}

.mh-header-brand-text {
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

.mh-header-center-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(52vw, 560px);
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  overflow: hidden;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mh-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mh-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f4f6fa;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
}

.mh-user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.mh-user-menu-trigger {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.mh-user-menu-trigger i {
  color: #4b5563;
  font-size: 11px;
}

.mh-user-menu-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mh-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1050;
  min-width: 230px;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.mh-user-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

.mh-user-menu:hover .mh-user-dropdown,
.mh-user-menu:focus-within .mh-user-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mh-user-email {
  padding: 8px 10px 10px;
  border-bottom: 1px solid #eef0f4;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.mh-user-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 6px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.mh-user-menu-link:hover,
.mh-user-menu-link:focus {
  background: #f4f6fa;
  color: #0d6efd;
  text-decoration: none;
}

.mh-user-menu-link.text-danger:hover,
.mh-user-menu-link.text-danger:focus {
  background: #fff5f5;
  color: #dc3545 !important;
}

.mh-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
  background: #e5e7eb;
  flex-shrink: 0;
}

.mh-header-info-content {
  color: #1f2937;
  font-size: 14px;
  line-height: 1.6;
  max-height: 70vh;
  overflow-y: auto;
}

.mh-header-info-content img {
  max-width: 100%;
  height: auto;
}

.mh-header-info-content table {
  width: 100%;
}

.mh-greeting-message-title {
  max-width: 280px;
}

.mh-greeting-table {
  min-width: 840px;
}

.mh-login-greeting-modal .modal-content {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.mh-login-greeting-hero {
  position: relative;
  padding: 34px 34px 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(10, 101, 192, 0.96), rgba(20, 184, 166, 0.92)),
    url('/assets/media/misc/pattern-2.png');
  background-size: cover;
}

.mh-first-login-welcome-hero {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.97), rgba(37, 99, 235, 0.92), rgba(5, 150, 105, 0.88)),
    url('/assets/media/misc/pattern-4.jpg');
  background-size: cover;
}

.mh-login-greeting-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 24px;
  margin-bottom: 16px;
}

.mh-login-greeting-title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff;
  font-size: 1.55rem;
  font-weight: 800;
}

.mh-login-greeting-content {
  padding: 28px 34px 8px;
  color: #1f2937;
  font-size: 15px;
  line-height: 1.7;
}

.mh-login-greeting-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.mh-login-greeting-content table {
  width: 100%;
}

.mh-login-greeting-footer {
  padding: 10px 34px 30px;
  border-top: 0;
}

@media (max-width: 991.98px) {
  #kt_app_header_container {
    flex-wrap: nowrap;
  }

  .mh-header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .mh-header-brand-text {
    font-size: 0.9rem;
  }

  .mh-header-center-title {
    position: static;
    transform: none;
    width: 100%;
    max-width: none;
    margin-top: -4px;
  }

  .mh-user-menu-name {
    max-width: 140px;
  }

  .ch-header-page-title {
    max-width: 42vw;
    font-size: 1.1rem;
  }

  .ch-header-subtitle {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .mh-user-pill {
    padding: 7px;
  }

  .mh-user-menu-name,
  .mh-user-menu-trigger .fa-chevron-down {
    display: none;
  }

  .ch-header-page-title {
    max-width: 38vw;
  }
}

body.mh-user-home-page.app-default {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34rem),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.mh-home-hero {
  min-height: 173px;
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 54%, #059669 100%);
}

.mh-home-hero::after {
  content: "";
  position: absolute;
  right: -84px;
  top: -72px;
  width: 310px;
  height: 310px;
  border: 42px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  animation: mh-home-float 8s ease-in-out infinite;
}

.mh-home-hero::before {
  content: "";
  position: absolute;
  left: 42%;
  bottom: -110px;
  width: 260px;
  height: 260px;
  background: rgba(245, 158, 11, 0.2);
  border-radius: 999px;
  animation: mh-home-float 9s ease-in-out infinite reverse;
}

.mh-home-hero-content {
  z-index: 1;
  max-width: none;
}

.mh-home-title {
  font-size: clamp(1.75rem, 4vw, 2.7rem);
  line-height: 1.14;
  letter-spacing: 0;
}

.mh-home-subtitle {
  max-width: none;
  width: 100%;
  color: rgba(255, 255, 255, 0.82);
}

.mh-home-action {
  min-height: 150px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

body.mh-admin-home-page .mh-home-action {
  min-height: 140px;
}

.mh-home-action:hover {
  transform: translateY(-3px);
  border-color: #93c5fd !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1) !important;
}

.mh-animate-in {
  opacity: 0;
  transform: translateY(18px);
}

.mh-home-ready .mh-animate-in {
  animation: mh-home-rise 0.58s ease forwards;
}

.mh-delay-1 {
  animation-delay: 0.08s !important;
}

.mh-delay-2 {
  animation-delay: 0.16s !important;
}

.mh-delay-3 {
  animation-delay: 0.24s !important;
}

.mh-delay-4 {
  animation-delay: 0.32s !important;
}

@keyframes mh-home-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mh-home-float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(18px) rotate(7deg);
  }
}

@media (prefers-reduced-motion: reduce) {

  .mh-home-hero::before,
  .mh-home-hero::after,
  .mh-home-ready .mh-animate-in {
    animation: none;
  }

  .mh-animate-in {
    opacity: 1;
    transform: none;
  }
}

body.home-dashboard-page.app-default {
  --ch-home-highlight: #0966c2;
  --ch-home-ink: #07111e;
  --ch-home-card-shadow: 0 14px 35px rgba(32, 50, 71, 0.13);
  background: #eef3f8;
}

.home-dashboard-page #view-content {
  position: relative;
  min-height: calc(100vh - 64px);
  overflow: hidden;
  padding: 3.75rem 1.25rem 2rem;
  background:
    linear-gradient(180deg, rgba(245, 248, 251, 0.72), rgba(235, 241, 247, 0.84)),
    #eef3f8;
}

.home-dashboard-page #view-content::before {
  content: "";
  position: absolute;
  inset: 4rem 4rem 2rem 4rem;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 26% 38%, rgba(28, 112, 123, 0.32) 0 4rem, transparent 8rem),
    radial-gradient(ellipse at 56% 64%, rgba(64, 94, 108, 0.22) 0 4.2rem, transparent 8rem),
    radial-gradient(ellipse at 77% 28%, rgba(9, 102, 194, 0.18) 0 4rem, transparent 8rem),
    radial-gradient(ellipse at 85% 58%, rgba(28, 112, 123, 0.28) 0 3.2rem, transparent 7rem),
    linear-gradient(90deg, transparent 0 16%, rgba(255, 255, 255, 0.55) 16% 18%, transparent 18% 34%, rgba(255, 255, 255, 0.5) 34% 36%, transparent 36% 100%);
  filter: blur(16px);
  opacity: 0.55;
}

.home-dashboard-page #view-content::after {
  content: "";
  position: absolute;
  right: 1.9rem;
  bottom: 1.7rem;
  width: 46px;
  height: 46px;
  pointer-events: none;
  background: #ffffff;
  clip-path: polygon(50% 0, 61% 34%, 100% 50%, 61% 66%, 50% 100%, 39% 66%, 0 50%, 39% 34%);
  opacity: 0.8;
}

.home-dashboard-page #view-content>* {
  position: relative;
  z-index: 1;
}

.home-dashboard-shell {
  width: min(100%, 980px);
  margin: 0 auto;
}

.home-dashboard-heading {
  width: min(100%, 980px);
  margin: 0 auto 1.75rem;
  text-align: center;
}

.home-dashboard-heading h2 {
  margin: 0;
  color: var(--ch-home-ink);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0;
}

.home-dashboard-heading p {
  margin: 0;
  color: #111827;
  font-size: 1.8rem;
  font-weight: 400;
}

.home-refresh-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.3rem;
}

#homeRefreshResponsesBtn.homeRefresh {
  min-height: 54px;
  padding: 0.8rem 1.8rem;
  border: 1px solid rgba(16, 126, 62, 0.28);
  border-radius: 6px;
  background: #3b9853;
  color: #ffffff;
  box-shadow: 0 4px 7px rgba(0, 0, 0, 0.22);
  font-size: 1.22rem;
  font-weight: 600;
}

#homeRefreshResponsesBtn.homeRefresh:hover,
#homeRefreshResponsesBtn.homeRefresh:focus {
  background: #2f8646 !important;
  color: #ffffff !important;
}

.home-last-refresh {
  color: #20252b;
  font-size: 1.22rem;
  font-weight: 400;
}

.home-last-refresh span {
  font-weight: 500;
}

.home-task-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.35rem;
  align-items: stretch;
}

.home-task-card {
  height: 100%;
  min-height: 270px;
  padding: 1.75rem 1.9rem 1.35rem;
  border: 1px solid rgba(15, 23, 32, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--ch-home-card-shadow);
  backdrop-filter: blur(10px);
}

.home-task-card h3 {
  margin: 0 0 0.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(15, 23, 32, 0.13);
  color: #111111;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0;
}

.home-task-row {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(15, 23, 32, 0.12);
  color: #111111;
  font-size: 1.28rem;
  font-weight: 400;
  line-height: 1.25;
  text-decoration: none;
}

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

.home-task-row:hover,
.home-task-row:focus {
  color: var(--ch-home-highlight);
  font-weight: 700;
}

.home-initial-csv-panel {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 2rem;
  border: 1px solid rgba(15, 23, 32, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--ch-home-card-shadow);
  backdrop-filter: blur(10px);
  text-align: center;
}

.home-initial-csv-icon {
  display: inline-flex;
  width: 62px;
  height: 62px;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  border-radius: 8px;
  background: #e8f2ff;
  color: var(--ch-home-highlight);
  font-size: 2rem;
}

.home-initial-csv-copy h3 {
  margin: 0 0 0.85rem;
  color: #111111;
  font-size: 1.85rem;
  font-weight: 750;
  letter-spacing: 0;
}

.home-initial-csv-instructions {
  max-width: 620px;
  margin: 0 auto 1.65rem;
  color: #27313d;
  font-size: 1.08rem;
  line-height: 1.6;
}

.home-initial-csv-instructions p:last-child {
  margin-bottom: 0;
}

.home-initial-csv-button {
  min-height: 52px;
  padding: 0.85rem 1.45rem;
  border: 1px solid rgba(9, 102, 194, 0.25);
  border-radius: 6px;
  background: var(--ch-home-highlight);
  color: #ffffff;
  box-shadow: 0 4px 7px rgba(0, 0, 0, 0.18);
  font-size: 1.08rem;
  font-weight: 700;
}

.home-initial-csv-button:hover,
.home-initial-csv-button:focus {
  background: #07539e !important;
  color: #ffffff !important;
}

.home-dashboard-page .home-count {
  flex: 0 0 auto;
  min-width: 34px;
  padding: 0.24rem 0.58rem;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--ch-home-highlight), #07539e);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 5px rgba(15, 23, 32, 0.2);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

@media (max-width: 991.98px) {
  .home-dashboard-page #view-content {
    padding: 1.25rem 0.85rem;
  }

  .home-dashboard-page #view-content::before {
    inset: 2rem 1rem;
  }

  .home-dashboard-heading h2 {
    font-size: 1.75rem;
  }

  .home-dashboard-heading p {
    font-size: 1.35rem;
  }

  .home-task-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-initial-csv-panel {
    padding: 1.5rem 1.1rem;
  }

  .home-initial-csv-copy h3 {
    font-size: 1.5rem;
  }

  .home-initial-csv-instructions {
    font-size: 1rem;
  }
}

.ch-upload-dropzone {
  border: 1px dashed #9db7df;
  background: #f8fbff;
  transition: border-color 0.18s ease, background 0.18s ease;
  cursor: pointer;
}

.ch-upload-dropzone.is-dragging {
  border-color: #0a66c2;
  background: #eef6ff;
}

.ch-upload-progress {
  height: 8px;
}

.ch-upload-file-name {
  min-height: 1.25rem;
}

.ch-process-progress {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.ch-process-progress-compact {
  margin-top: 1.25rem;
}

.ch-process-step {
  padding: 0.9rem 1rem;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.ch-process-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: #1f2937;
  font-size: 0.86rem;
  font-weight: 800;
}

.ch-process-step-header span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.ch-process-step-header strong {
  color: #3f4254;
  font-size: 0.78rem;
  white-space: nowrap;
}

.ch-process-bar {
  height: 9px;
  margin-top: 0.7rem;
  overflow: hidden;
  border-radius: 999px;
  background: #eef3f8;
}

.ch-process-bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0a66c2, #16a34a);
  transition: width 0.28s ease;
}

.ch-process-step-message {
  margin-top: 0.45rem;
  color: #4b5563;
  font-size: 0.76rem;
  font-weight: 650;
}

.ch-process-step.is-active {
  border-color: #9fc5ee;
  background: #f8fbff;
}

.ch-process-step.is-active .ch-process-bar-fill {
  background-image: linear-gradient(90deg, #0a66c2, #16a34a, #0a66c2);
  background-size: 180% 100%;
  animation: ch-process-flow 1.4s linear infinite;
}

.ch-process-step.is-indeterminate .ch-process-bar-fill {
  background-image: repeating-linear-gradient(45deg,
      #0a66c2 0,
      #0a66c2 10px,
      #16a34a 10px,
      #16a34a 20px);
  background-size: 160% 100%;
  animation: ch-process-flow 1.1s linear infinite;
}

.ch-process-step.is-complete {
  border-color: #a7e0bd;
  background: #f7fff9;
}

.ch-process-step.is-complete .ch-process-bar-fill {
  background: #16a34a;
}

.ch-process-step.is-error {
  border-color: #f1b5b5;
  background: #fff8f8;
}

.ch-process-step.is-error .ch-process-bar-fill {
  background: #dc3545;
}

@keyframes ch-process-flow {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 180% 0;
  }
}

#tableConnections .connection-name-link {
  color: #0a66c2;
  font-weight: 700;
  text-decoration: none;
}

#tableConnections .connection-name-link:hover {
  text-decoration: underline;
}

.connection-name-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-width: 0;
}

.connection-location-line {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.connection-location-line::before {
  content: "\f3c5";
  margin-right: 0.35rem;
  color: #475569;
  font-family: "Font Awesome 6 Free";
  font-size: 0.72rem;
  font-weight: 900;
}

.btn.btn-light-success {
  background-color: #166534;
  border-color: #166534;
  color: #fff;
}

.btn.btn-light-success:hover,
.btn.btn-light-success:focus {
  background-color: #14532d;
  border-color: #14532d;
  color: #fff;
}

.btn.btn-light-success i,
.btn.btn-light-success .svg-icon,
.btn.btn-light-warning i,
.btn.btn-light-warning .svg-icon,
.btn.btn-light-info i,
.btn.btn-light-info .svg-icon {
  color: #fff;
}

.btn.btn-light-warning {
  background-color: #92400e;
  border-color: #92400e;
  color: #fff;
}

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

.btn.btn-light-info {
  background-color: #075985;
  border-color: #075985;
  color: #fff;
}

.btn.btn-light-info:hover,
.btn.btn-light-info:focus {
  background-color: #0c4a6e;
  border-color: #0c4a6e;
  color: #fff;
}

.btn.btn-success {
  background-color: #15803d;
  border-color: #15803d;
}

.btn.btn-success:hover,
.btn.btn-success:focus {
  background-color: #166534;
  border-color: #166534;
}

.connection-url-cell {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-category-tree {
  display: grid;
  gap: 12px;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-category-node {
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-category-node-main,
:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-subcategory-node {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-category-node-main {
  padding: 14px 16px;
  background: #f8fbff;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-category-node-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #1f2937;
  font-weight: 700;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-category-node-description,
:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-category-node-examples {
  margin-top: 3px;
  color: #4b5563;
  font-size: 0.78rem;
  line-height: 1.35;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-category-node-examples {
  color: #4b5563;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-category-count {
  min-width: 54px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #1f2937;
  color: #ffffff;
  font-weight: 700;
  text-align: center;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-category-count-sm {
  background: #0a66c2;
}

.ch-category-share-badge,
.ch-category-volume-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ch-category-share-badge {
  background: #e8f6ef;
  color: #087443;
}

.ch-category-volume-badge {
  background: #fff4df;
  color: #9a5b00;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-category-evaluation-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-category-evaluation-badge-done {
  background: #e8f6ef;
  color: #087443;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-category-evaluation-badge-needed {
  background: #fff4df;
  color: #9a5b00;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-subcategory-list {
  display: grid;
  gap: 0;
  padding: 0 16px 12px;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-subcategory-node {
  position: relative;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  padding: 12px 0 0;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-subcategory-branch {
  align-self: stretch;
  border-left: 2px solid #bdd4ee;
  border-bottom: 2px solid #bdd4ee;
  border-bottom-left-radius: 8px;
  min-height: 22px;
}

:where(body[data-page-key="connections"], body[data-page-key="upload_csv"]) .ch-subcategory-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #243b53;
  font-weight: 700;
}

body[data-page-key="upload_csv"] .ch-report-category-toggle {
  width: 100%;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

body[data-page-key="upload_csv"] .ch-report-category-toggle>div {
  min-width: 0;
}

body[data-page-key="upload_csv"] .ch-report-category-toggle:hover,
body[data-page-key="upload_csv"] .ch-report-category-toggle:focus {
  outline: none;
  background: #eef6ff;
}

body[data-page-key="upload_csv"] .ch-report-category-toggle[aria-expanded="true"] .ch-report-category-chevron {
  transform: rotate(90deg);
}

body[data-page-key="upload_csv"] .ch-report-category-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(470px, 46vw);
}

body[data-page-key="upload_csv"] .ch-report-people-search-inline {
  display: flex;
  flex: 1 1 350px;
  justify-content: flex-end;
  max-width: 390px;
}

body[data-page-key="upload_csv"] #connectionUploadAiReportModal .modal-header {
  padding-top: 14px;
  padding-bottom: 10px;
}

body[data-page-key="upload_csv"] #connectionUploadAiReportModal .modal-header>div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

body[data-page-key="upload_csv"] .ch-report-guidance {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  margin-top: 8px;
  color: #4b5563;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.32;
}

body[data-page-key="upload_csv"] .ch-report-summary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}

body[data-page-key="upload_csv"] .ch-report-summary-compact {
  display: contents;
}

body[data-page-key="upload_csv"] #connectionUploadAiReportSourceFilter {
  width: 225px;
  min-height: 54px;
  margin-left: auto;
}

body[data-page-key="upload_csv"] .ch-report-stat {
  display: grid;
  flex: 1 1 150px;
  min-height: 54px;
  align-content: center;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid #e4e6ef;
  border-radius: 6px;
  background: #fbfcfe;
}

body[data-page-key="upload_csv"] .ch-report-stat-label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
}

body[data-page-key="upload_csv"] .ch-report-stat-value {
  color: #111827;
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1;
}

@media (max-width: 575.98px) {
  body[data-page-key="upload_csv"] #connectionUploadAiReportSourceFilter {
    width: 100%;
    margin-left: 0;
  }

  body[data-page-key="upload_csv"] .ch-category-node-main {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page-key="upload_csv"] .ch-subcategory-node {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  body[data-page-key="upload_csv"] .ch-subcategory-node .ch-report-category-controls {
    grid-column: 2;
  }

  body[data-page-key="upload_csv"] .ch-report-people-search .ch-table-search-field {
    flex: 1 1 100%;
    width: 100%;
  }
}

body[data-page-key="upload_csv"] .ch-report-guidance>div {
  min-width: 0;
}

body[data-page-key="upload_csv"] .ch-category-node.ch-report-category-open {
  border-color: #0a66c2;
  box-shadow: 0 0 0 2px rgba(10, 102, 194, 0.16);
}

body[data-page-key="upload_csv"] .ch-category-node.ch-report-category-open>.ch-category-node-main {
  background: #eef6ff;
}

body[data-page-key="upload_csv"] .ch-subcategory-node.ch-report-category-open .ch-subcategory-content {
  border-radius: 6px;
  outline: 2px solid rgba(10, 102, 194, 0.34);
  outline-offset: 5px;
}

body[data-page-key="upload_csv"] .ch-report-category-chevron {
  color: #0a66c2;
  font-size: 0.78rem;
  transition: transform 0.18s ease;
}

body[data-page-key="upload_csv"] .ch-small-categories-header {
  padding-top: 10px;
  color: #1f2937;
  font-size: 1rem;
  font-weight: 800;
}

body[data-page-key="upload_csv"] .ch-subcategory-content.ch-report-category-toggle {
  padding: 0;
  background: transparent;
}

body[data-page-key="upload_csv"] .ch-subcategory-content.ch-report-category-toggle:hover,
body[data-page-key="upload_csv"] .ch-subcategory-content.ch-report-category-toggle:focus {
  background: transparent;
}

body[data-page-key="upload_csv"] .ch-report-category-people-panel {
  grid-column: 1 / -1;
  padding: 0 16px 14px;
}

body[data-page-key="upload_csv"] .ch-subcategory-node .ch-report-category-people-panel {
  grid-column: 2 / -1;
  padding: 0;
  padding-top: 10px;
}

body[data-page-key="upload_csv"] .ch-category-people-panel-inner {
  padding: 14px 16px;
  border: 1px solid #e4e6ef;
  border-radius: 8px;
  background: #fbfcfe;
}

body[data-page-key="upload_csv"] .ch-report-people-search,
body[data-page-key="upload_csv"] .ch-report-people-search .dataTables_filter,
body[data-page-key="upload_csv"] .ch-report-people-search .dataTables_filter label {
  width: auto;
}

body[data-page-key="upload_csv"] .ch-report-people-search {
  flex-wrap: wrap;
}

body[data-page-key="upload_csv"] .ch-report-people-search .ch-table-search-field {
  flex: 0 1 350px;
  width: 350px;
  max-width: 100%;
}

body[data-page-key="upload_csv"] .ch-report-people-search .dataTables_filter {
  float: none;
  text-align: left;
}

body[data-page-key="upload_csv"] .ch-report-people-search .dataTables_filter label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
}

body[data-page-key="upload_csv"] .ch-report-people-search .dataTables_filter input {
  width: 100% !important;
  margin-left: 0;
}

@media (max-width: 575.98px) {
  body[data-page-key="upload_csv"] .ch-report-people-search .ch-table-search-field {
    flex: 1 1 100%;
    width: 100%;
  }

  body[data-page-key="upload_csv"] .ch-report-category-controls {
    min-width: 0;
    width: 100%;
  }

  body[data-page-key="upload_csv"] .ch-report-people-search-inline {
    max-width: none;
  }
}

body[data-page-key="upload_csv"] .ch-category-people-scroll {
  max-height: 340px;
  overflow: auto;
}

body[data-page-key="upload_csv"] .ch-category-people-table {
  width: 100% !important;
}

body[data-page-key="upload_csv"] .ch-category-people-name,
body[data-page-key="upload_csv"] .ch-category-people-text {
  min-width: 130px;
  max-width: 320px;
  white-space: normal;
  overflow-wrap: anywhere;
}

body[data-page-key="categories-management"] .ch-category-management-list {
  display: grid;
  gap: 12px;
}

body[data-page-key="categories-management"] .ch-category-management-card {
  border-radius: 8px;
}

body[data-page-key="categories-management"] .ch-category-management-row,
body[data-page-key="categories-management"] .ch-category-management-subrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

body[data-page-key="categories-management"] .ch-category-management-sublist {
  display: grid;
  gap: 0;
  margin-top: 12px;
  padding-left: 4px;
}

body[data-page-key="categories-management"] .ch-category-management-subrow {
  grid-template-columns: 22px minmax(0, 1fr) auto;
  padding-top: 12px;
}

body[data-page-key="categories-management"] .ch-category-management-branch {
  align-self: stretch;
  min-height: 22px;
  border-left: 2px solid #bdd4ee;
  border-bottom: 2px solid #bdd4ee;
  border-bottom-left-radius: 8px;
}

body[data-page-key="categories-management"] .ch-category-clickable-row {
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

body[data-page-key="categories-management"] .ch-category-clickable-row:hover,
body[data-page-key="categories-management"] .ch-category-clickable-row:focus {
  background: #f8fbff;
  box-shadow: 0 0 0 6px #f8fbff;
  outline: none;
}

body[data-page-key="categories-management"] .ch-category-approval-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

body[data-page-key="categories-management"] .ch-category-approval-badge-approved {
  background: #e8f6ef;
  color: #087443;
}

body[data-page-key="categories-management"] .ch-category-approval-badge-not_approved {
  background: #fff4df;
  color: #9a5b00;
}

body[data-page-key="categories-management"] .ch-category-people-panel {
  margin-top: 12px;
}

body[data-page-key="categories-management"] .ch-category-people-panel-sub {
  margin-left: 22px;
}

body[data-page-key="categories-management"] .ch-category-people-panel-inner {
  padding: 14px 16px;
  border: 1px solid #e4e6ef;
  border-radius: 8px;
  background: #fbfcfe;
}

body[data-page-key="categories-management"] .ch-category-people-panel-inner .dataTables_wrapper {
  min-width: 0;
}

body[data-page-key="categories-management"] .ch-category-people-scroll {
  max-height: 360px;
  overflow: auto;
}

body[data-page-key="categories-management"] .ch-category-people-table {
  width: 100% !important;
}

body[data-page-key="categories-management"] .ch-category-people-table th,
body[data-page-key="categories-management"] .ch-category-people-table td {
  vertical-align: middle;
}

body[data-page-key="categories-management"] .ch-category-people-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fbfcfe;
}

body[data-page-key="categories-management"] .ch-category-people-name,
body[data-page-key="categories-management"] .ch-category-people-text {
  min-width: 130px;
  max-width: 280px;
  white-space: normal;
  overflow-wrap: anywhere;
}

body[data-page-key="categories-management"] .ch-category-entry-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

body[data-page-key="categories-management"] .ch-category-entry-status-needs_evaluation {
  background: #eef3f8;
  color: #3f4254;
}

body[data-page-key="categories-management"] .ch-category-entry-status-approved {
  background: #e8f6ef;
  color: #087443;
}

body[data-page-key="categories-management"] .ch-category-entry-status-not_approved {
  background: #fff4df;
  color: #9a5b00;
}

body[data-page-key="categories-management"] .ch-category-job-titles-meta {
  border-bottom: 1px solid #e4e6ef;
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
}

body[data-page-key="categories-management"] .ch-category-job-titles-item {
  min-width: 0;
  flex: 1 1 220px;
  padding: 0.6rem 0.85rem;
  border: 1px solid #e4e6ef;
  border-radius: 8px;
  background: #f0f9ff;
  border-left: 3px solid #0a66c2;
}

body[data-page-key="categories-management"] .ch-category-job-titles-item-excluded {
  background: #fff8f0;
  border-left-color: #dc6803;
}

body[data-page-key="categories-management"] .ch-category-job-titles-label {
  margin-bottom: 0.2rem;
  color: #5e6278;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

body[data-page-key="categories-management"] .ch-category-job-titles-item-excluded .ch-category-job-titles-label {
  color: #7a4018;
}

body[data-page-key="categories-management"] .ch-category-job-titles-value {
  color: #181c32;
  font-size: 0.88rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {

  body[data-page-key="categories-management"] .ch-category-management-row,
  body[data-page-key="categories-management"] .ch-category-management-subrow {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page-key="categories-management"] .ch-category-management-branch {
    display: none;
  }

  body[data-page-key="categories-management"] .ch-category-people-panel-sub {
    margin-left: 0;
  }

}

body[data-page-key="connections-from-pool"] .ch-pool-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
  justify-content: flex-start;
}

body[data-page-key="connections-from-pool"] .ch-pool-summary>div {
  min-width: 172px;
  max-width: 320px;
  padding: 0.85rem 1rem;
  border: 1px solid #e4e6ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

body[data-page-key="connections-from-pool"] .ch-pool-summary span {
  display: block;
  color: #5e6278;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

body[data-page-key="connections-from-pool"] .ch-pool-summary strong {
  display: block;
  color: #181c32;
  font-size: 1.65rem;
  line-height: 1.1;
}

body[data-page-key="connections-from-pool"] .ch-pool-category-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

body[data-page-key="connections-from-pool"] .ch-pool-category,
body[data-page-key="connections-from-pool"] .ch-pool-subcategory {
  border: 1px solid #e4e6ef;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

body[data-page-key="connections-from-pool"] .ch-pool-subcategory {
  margin-left: 1.5rem;
  background: #fbfcfe;
}

body[data-page-key="connections-from-pool"] .ch-pool-category-main {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: stretch;
  padding: 0.9rem 1.15rem;
}

body[data-page-key="connections-from-pool"] .ch-pool-category-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

body[data-page-key="connections-from-pool"] .ch-pool-category-title {
  display: block;
  color: #181c32;
  font-size: 1.1rem;
  font-weight: 800;
}

body[data-page-key="connections-from-pool"] .ch-pool-category-description {
  display: block;
  color: #5e6278;
  font-size: 0.86rem;
  font-weight: 500;
}

body[data-page-key="connections-from-pool"] .ch-pool-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 1rem;
  align-items: center;
}

body[data-page-key="connections-from-pool"] .ch-pool-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

body[data-page-key="connections-from-pool"] .ch-pool-counts span {
  padding: 0.28rem 0.5rem;
  border-radius: 6px;
  background: #f5f8fa;
  color: #5e6278;
  font-size: 0.82rem;
  font-weight: 700;
}

body[data-page-key="connections-from-pool"] .ch-pool-counts strong {
  color: #0966c2;
}

body[data-page-key="connections-from-pool"] .ch-pool-empty-row {
  padding: 0.75rem 0 0;
  color: #7e8299;
  font-size: 0.9rem;
}

body[data-page-key="connections-from-pool"] #poolConnectionsTable {
  min-width: 720px;
}

@media (max-width: 767.98px) {

  body[data-page-key="connections-from-pool"] .ch-pool-summary,
  body[data-page-key="connections-from-pool"] .ch-pool-category-main,
  body[data-page-key="connections-from-pool"] .ch-pool-actions {
    flex-direction: column;
    align-items: stretch;
  }

  body[data-page-key="connections-from-pool"] .ch-pool-subcategory {
    margin-left: 0.75rem;
  }

  body[data-page-key="connections-from-pool"] .ch-pool-counts {
    justify-content: flex-start;
  }
}

body[data-page-key="connections"] .ch-person-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  max-width: 230px;
}

body[data-page-key="connections"] .ch-person-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 210px;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #bdd4ee;
  border-radius: 6px;
  background: #edf6ff;
  color: #0f3d63;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

body[data-page-key="connections"] .ch-person-category-chip-sub {
  border-color: #d6c8ff;
  background: #f4f0ff;
  color: #3f2d75;
}

body[data-page-key="connections"] .ch-person-category-parent {
  color: #5f6b7a;
  font-weight: 600;
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page-key="connections"] .ch-person-category-child {
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page-key="connections"] .ch-person-category-arrow {
  color: #4b5563;
}

body[data-page-key="connections"] .ch-person-category-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0a66c2;
  flex: 0 0 auto;
}

body[data-page-key="connections"] .ch-category-editor-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  max-width: 270px;
}

body[data-page-key="connections"] .ch-category-editor-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body[data-page-key="connections"] .ch-category-edit-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  flex: 0 0 auto;
}

body[data-page-key="connections"] .ch-person-category-summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 220px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

body[data-page-key="connections"] .ch-person-category-summary .ch-person-category-chip {
  max-width: 190px;
}

body[data-page-key="connections"] .ch-person-category-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef3f8;
  color: #3f4254;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

body[data-page-key="connections"] #connectionQuickFiltersBtn {
  max-width: 290px;
}

body[data-page-key="connections"] #connectionQuickFiltersLabel {
  display: inline-block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.ch-category-tree-popup {
  position: absolute;
  z-index: 1095;
  width: min(280px, calc(100vw - 24px));
  padding: 0.75rem;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.ch-category-tree-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.ch-category-tree-popup-title {
  color: #181c32;
  font-size: 0.86rem;
  font-weight: 800;
}

.ch-category-tree-popup-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f3f5;
  color: #5e6278;
  cursor: pointer;
}

.ch-category-tree-popup-close:hover {
  background: #e4e6ef;
  color: #181c32;
}

.ch-category-tree-popup-body {
  display: grid;
  gap: 0.55rem;
  max-height: 260px;
  overflow: auto;
}

.ch-category-tree-popup-parent {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #0f3d63;
  font-size: 0.84rem;
  font-weight: 800;
}

.ch-category-tree-popup-children {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.35rem;
  margin-left: 0.65rem;
  padding-left: 0.8rem;
  border-left: 2px solid #bdd4ee;
}

.ch-category-tree-popup-child {
  color: #3f4254;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.25;
}

body[data-page-key="connections"] #tableConnections .ch-connection-text-wrap {
  max-width: 220px;
  min-width: 150px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.35;
}

body[data-page-key="connections"] #analyzeConnectionTagsStatus:empty {
  display: none;
}

body[data-page-key="connections"] .ch-connections-table-card {
  border-radius: 8px;
}

body[data-page-key="connections"] .ch-connections-table-header.card-header {
  min-height: auto;
  flex-direction: column;
  align-items: stretch;
}

body[data-page-key="connections"] .ch-connections-table-toolbar {
  min-width: 0;
  margin-top: 0.45rem;
  margin-bottom: 0.45rem;
}

@media (min-width: 768px) {
  body[data-page-key="connections"] .ch-connections-table-toolbar {
    flex-wrap: nowrap !important;
  }
}

body[data-page-key="connections"] .ch-connections-table-toolbar>.btn,
body[data-page-key="connections"] .ch-connections-table-toolbar>.dropdown {
  flex: 0 0 auto;
}

body[data-page-key="connections"] .ch-connections-table-toolbar #connectionOwnerUserSelect {
  flex: 0 1 260px;
  width: auto !important;
  min-width: 180px;
}

body[data-page-key="connections"] .ch-connections-table-header .ch-table-search-wrap {
  flex: 0 1 320px;
  min-width: 120px;
  max-width: 320px;
  margin-left: auto !important;
  justify-content: flex-end;
}

body[data-page-key="connections"] .ch-connections-table-header .ch-table-search-field {
  width: 100%;
  max-width: none;
}

body[data-page-key="connections"] .ch-connections-table-header #searchInput {
  min-width: 0;
}

@media (max-width: 767.98px) {
  body[data-page-key="connections"] .ch-connections-table-header .ch-table-search-wrap {
    width: 100%;
    max-width: none;
    margin-left: 0 !important;
  }
}

body[data-page-key="connections"] .ch-connections-summary-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  gap: 0.5rem;
  width: 100%;
  margin: 0.35rem 0 0.45rem;
}

body[data-page-key="connections"] .ch-connections-summary-item {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #e4e6ef;
  border-left-width: 3px;
  border-radius: 6px;
  background: #ffffff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

body[data-page-key="connections"] .ch-connections-summary-item:hover,
body[data-page-key="connections"] .ch-connections-summary-item:focus {
  border-color: #b5c8e6;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

body[data-page-key="connections"] .ch-connections-summary-active {
  border-color: #0a66c2;
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.12);
}

body[data-page-key="connections"] .ch-connections-summary-label {
  min-width: 0;
  color: #3f4254;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.2;
}

body[data-page-key="connections"] .ch-connections-summary-value {
  color: #181c32;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

body[data-page-key="connections"] .ch-connections-summary-primary {
  border-left-color: #0a66c2;
}

body[data-page-key="connections"] .ch-connections-summary-muted {
  border-left-color: #5e6278;
}

body[data-page-key="connections"] .ch-connections-summary-success {
  border-left-color: #198754;
}

body[data-page-key="connections"] .ch-connections-summary-warning {
  border-left-color: #f1bc00;
}

body[data-page-key="connections"] .ch-connections-summary-danger {
  border-left-color: #dc3545;
}

body[data-page-key="connections"] .ch-connections-summary-info {
  border-left-color: #0dcaf0;
}

body[data-page-key="connections"] .ch-connections-summary-dark {
  border-left-color: #343a40;
}

body[data-page-key="connections"] .connection-quick-filters-menu {
  min-width: min(720px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}

body[data-page-key="connections"] .connection-quick-filters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  gap: 14px;
}

body[data-page-key="connections"] .ch-subcategory-filter-item {
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

body[data-page-key="connections"] .ch-subcategory-filter-empty {
  border-color: #e4e6ef;
  background: #f5f6f8;
  opacity: 0.72;
}

body[data-page-key="connections"] .ch-subcategory-filter-empty .form-label {
  color: #5e6278;
}

body[data-page-key="connections"] .ch-subcategory-filter-has-options {
  border-color: #bdd4ee;
  background: #f7fbff;
}

body[data-page-key="connections"] .ch-subcategory-filter-has-options .form-label,
body[data-page-key="connections"] .ch-subcategory-filter-has-options .form-select {
  font-weight: 800;
}

body[data-page-key="connections"].ch-connection-evaluation-mode {
  --connection-evaluation-row-height: 46px;
  overflow: hidden;
  background: #ffffff;
}

body[data-page-key="connections"] .ch-evaluation-action-bar {
  display: none;
}

body[data-page-key="connections"] .ch-evaluation-next-page-btn {
  display: none;
}

body[data-page-key="connections"].ch-connection-evaluation-mode .ch-evaluation-action-bar {
  display: none !important;
}

body[data-page-key="connections"].ch-connection-evaluation-mode .ch-evaluation-table-footer-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 38px;
  min-height: 38px;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
}

body[data-page-key="connections"].ch-connection-evaluation-mode .ch-evaluation-info-btn {
  background-color: #7239ea !important;
  border-color: #7239ea !important;
  color: #ffffff !important;
}

body[data-page-key="connections"].ch-connection-evaluation-mode .ch-evaluation-info-btn:hover,
body[data-page-key="connections"].ch-connection-evaluation-mode .ch-evaluation-info-btn:focus {
  background-color: #5a20d0 !important;
  border-color: #5a20d0 !important;
  color: #ffffff !important;
}

body[data-page-key="connections"].ch-connection-evaluation-mode .ch-evaluation-info-btn i {
  color: #ffffff !important;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections_wrapper .dt-info.ch-evaluation-table-footer-actions,
body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections_wrapper .dataTables_info.ch-evaluation-table-footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  min-height: 38px;
}

body[data-page-key="connections"].ch-connection-evaluation-mode .ch-evaluation-save-btn,
body[data-page-key="connections"].ch-connection-evaluation-mode .ch-evaluation-save-btn:disabled {
  border-color: #064e3b;
  background-color: #064e3b;
  color: #ffffff;
  opacity: 1;
}

body[data-page-key="connections"].ch-connection-evaluation-mode .ch-evaluation-save-btn:hover,
body[data-page-key="connections"].ch-connection-evaluation-mode .ch-evaluation-save-btn:focus {
  border-color: #043b2c;
  background-color: #043b2c;
  color: #ffffff;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #kt_app_header,
body[data-page-key="connections"].ch-connection-evaluation-mode #kt_app_sidebar,
body[data-page-key="connections"].ch-connection-evaluation-mode #kt_app_footer,
body[data-page-key="connections"].ch-connection-evaluation-mode #view-content>.container-fluid>.d-flex,
body[data-page-key="connections"].ch-connection-evaluation-mode #analyzeConnectionTagsStatus,
body[data-page-key="connections"].ch-connection-evaluation-mode #view-content>.container-fluid>.alert,
body[data-page-key="connections"].ch-connection-evaluation-mode #goTopBtn,
body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections_wrapper .dt-length,
body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections_wrapper .dataTables_length,
body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections_wrapper .dt-paging,
body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections_wrapper .dataTables_paginate,
body[data-page-key="connections"].ch-connection-evaluation-mode .card-header {
  display: none !important;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #kt_app_wrapper,
body[data-page-key="connections"].ch-connection-evaluation-mode #kt_app_main,
body[data-page-key="connections"].ch-connection-evaluation-mode #view-content {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #view-content>.container-fluid {
  width: 100%;
  max-width: none;
  height: 100vh;
  padding: 0 !important;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #view-content>.container-fluid>.card {
  height: 100vh;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
}

body[data-page-key="connections"].ch-connection-evaluation-mode .card-body {
  height: 100vh;
  padding: 10px 12px 0 !important;
}

body[data-page-key="connections"].ch-connection-evaluation-mode .table-responsive {
  height: 100%;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections_wrapper {
  height: 100%;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections {
  font-size: 1.10rem;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections th,
body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections td {
  padding: 5px 10px !important;
  line-height: 1.22;
  vertical-align: middle;
}

.evaluation-approve-header-text {
  display: none;
}

body[data-page-key="connections"].ch-connection-evaluation-mode .evaluation-approve-header-text {
  display: inline-block;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections tbody tr {
  height: var(--connection-evaluation-row-height);
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .form-check-input {
  width: 16px;
  height: 16px;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .connection-known-checkbox-wrap {
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .connection-known-checkbox-wrap.form-check {
  min-height: 18px;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .connection-known-checkbox-wrap .form-check-label {
  font-size: 0.8rem !important;
  line-height: 1;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .ch-category-editor-cell {
  max-width: 330px;
  gap: 4px;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .ch-person-category-chips {
  flex-wrap: nowrap;
  align-items: center;
  max-width: 285px;
  max-height: 28px;
  overflow: hidden;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .ch-person-category-chip {
  max-width: 180px;
  min-height: 24px;
  padding: 3px 7px;
  gap: 4px;
  font-size: 0.76rem;
  line-height: 1.1;
  flex: 0 0 auto;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .ch-person-category-chip-sub {
  max-width: 205px;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .ch-person-category-parent,
body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .ch-person-category-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .ch-person-category-dot {
  width: 6px;
  height: 6px;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .ch-category-edit-btn,
body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .ch-remove-connection-btn {
  width: 26px;
  height: 26px;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .connection-priority-dropdown {
  min-width: 96px;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .custom-dropdown-selected {
  min-height: 28px;
  padding: 4px 8px;
}

body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections .ch-connection-text-wrap {
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767.98px) {
  body[data-page-key="connections"].ch-connection-evaluation-mode #tableConnections_wrapper .ch-evaluation-table-footer-actions {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    max-width: calc(100vw - 24px);
  }

  body[data-page-key="connections"] .connection-quick-filters-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.ch-category-path-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #bdd4ee;
  border-radius: 6px;
  background: #edf6ff;
  color: #0f3d63;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  vertical-align: middle;
}

.ch-category-path-chip-sub {
  border-color: #d6c8ff;
  background: #f4f0ff;
  color: #3f2d75;
}

.ch-category-path-parent {
  color: #5f6b7a;
  font-weight: 600;
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-category-path-child {
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-category-path-arrow {
  color: #4b5563;
  flex: 0 0 auto;
}

.ch-category-path-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0a66c2;
  flex: 0 0 auto;
}

.ch-table-search-wrap {
  flex: 0 1 auto;
  min-width: 0;
}

.ch-table-search-field {
  width: 350px;
  max-width: min(350px, 100%);
}

.ch-search-result-count {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid #d8e4f2;
  border-radius: 6px;
  background: #f3f8fe;
  color: #31516f;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.ch-search-result-count.d-none {
  display: none;
}

.connection-photo-hover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.connection-photo-popover {
  position: fixed;
  z-index: 20000;
  display: none;
  max-width: min(320px, calc(100vw - 24px));
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: #111827;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.connection-photo-popover::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 10px;
  height: 10px;
  background: #111827;
  transform: translateX(-50%) rotate(45deg);
}

.connection-photo-popover--above {
  transform: translateY(4px);
}

.connection-photo-popover--above::before {
  bottom: -5px;
}

.connection-photo-popover--below {
  transform: translateY(-4px);
}

.connection-photo-popover--below::before {
  top: -5px;
}

.connection-photo-popover.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 575.98px) {
  .ch-table-search-wrap {
    width: 100%;
    margin-left: 0 !important;
  }

  .ch-table-search-field {
    width: 100%;
  }
}

/* Connection workflow pages */
#tableConnectionWorkflow {
  width: 100% !important;
}

#tableConnectionWorkflow thead th {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-width: 0 !important;
  white-space: nowrap;
  vertical-align: middle;
}

#tableConnectionWorkflow_wrapper table.dataTable thead>tr>th.dt-orderable-asc,
#tableConnectionWorkflow_wrapper table.dataTable thead>tr>th.dt-orderable-desc,
#tableConnectionWorkflow_wrapper table.dataTable thead>tr>th.dt-ordering-asc,
#tableConnectionWorkflow_wrapper table.dataTable thead>tr>th.dt-ordering-desc {
  padding-right: 22px !important;
  vertical-align: middle !important;
}

#tableConnectionWorkflow_wrapper thead th .th-content-wrapper u,
.dataTables_scrollHead thead th .th-content-wrapper u,
.dt-scroll-head thead th .th-content-wrapper u {
  font-size: inherit !important;
  line-height: inherit;
}

#tableConnectionWorkflow_wrapper table.dataTable thead>tr>th span.dt-column-order,
#tableConnectionWorkflow_wrapper .dataTables_scrollHead table.dataTable thead>tr>th span.dt-column-order,
#tableConnectionWorkflow_wrapper .dt-scroll-head table.dataTable thead>tr>th span.dt-column-order {
  top: 50% !important;
  bottom: auto !important;
  right: 6px !important;
  height: 18px;
  transform: translateY(-50%);
}

#tableConnectionWorkflow_wrapper table.dataTable thead>tr>th span.dt-column-order::before,
#tableConnectionWorkflow_wrapper table.dataTable thead>tr>th span.dt-column-order::after,
#tableConnectionWorkflow_wrapper .dataTables_scrollHead table.dataTable thead>tr>th span.dt-column-order::before,
#tableConnectionWorkflow_wrapper .dataTables_scrollHead table.dataTable thead>tr>th span.dt-column-order::after,
#tableConnectionWorkflow_wrapper .dt-scroll-head table.dataTable thead>tr>th span.dt-column-order::before,
#tableConnectionWorkflow_wrapper .dt-scroll-head table.dataTable thead>tr>th span.dt-column-order::after {
  left: 0 !important;
  line-height: 8px !important;
}

.workflow-action-cell {
  min-width: 150px;
}

.workflow-action-cell .form-check {
  min-height: 20px !important;
  margin-bottom: 2px !important;
  padding-left: 1.55rem !important;
}

.workflow-action-cell .form-check:last-child {
  margin-bottom: 0 !important;
}

.workflow-action-cell .form-check-input {
  width: 16px !important;
  height: 16px !important;
  border-radius: 2px !important;
  margin-top: 0.15rem !important;
  margin-left: -1.55rem !important;
}

.workflow-action-cell .form-check-label {
  font-size: 0.95rem !important;
  line-height: 1.35 !important;
  padding-left: 2px !important;
}

.workflow-notes {
  width: 100%;
  max-width: 160px;
  min-height: 38px;
  box-sizing: border-box;
  resize: vertical;
}

.workflow-days-input {
  width: 3ch;
  min-width: 3ch;
  text-align: center;
}

#followUpDays.workflow-days-input {
  width: 84px;
  min-width: 84px;
}

.workflow-photo {
  width: 50px;
  height: 50px;
  object-fit: cover;
}

.workflow-priority-dropdown {
  min-width: 104px;
  font-weight: 600;
}

.next-contact-combined {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  align-items: center;
  white-space: normal;
}

.next-contact-combined .action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.workflow-col-photo {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  text-align: center;
}

.workflow-col-name {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
}

#tableConnections .ch-connection-name-column,
#tableAssignedConnections .ch-connection-name-column {
  min-width: 220px;
  max-width: 280px;
}

.workflow-col-company {
  width: 170px;
  min-width: 170px;
  max-width: 170px;
}

.workflow-col-position {
  width: 230px;
  min-width: 230px;
  max-width: 230px;
}

.workflow-col-category {
  width: 210px;
  min-width: 210px;
  max-width: 210px;
}

#tableConnectionWorkflow .ch-connection-text-wrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workflow-col-tags {
  width: 200px;
  min-width: 200px;
  max-width: 200px;
}

.workflow-col-priority {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
}

.workflow-col-next-contact {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
  white-space: normal;
}

#tableConnectionWorkflow_wrapper thead th.workflow-col-next-contact,
.dataTables_scrollHead thead th.workflow-col-next-contact,
.dt-scroll-head thead th.workflow-col-next-contact {
  text-align: center !important;
}

#tableConnectionWorkflow_wrapper thead th.workflow-col-next-contact .th-content-wrapper,
.dataTables_scrollHead thead th.workflow-col-next-contact .th-content-wrapper,
.dt-scroll-head thead th.workflow-col-next-contact .th-content-wrapper {
  display: flex !important;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.workflow-col-last-message {
  width: 190px;
  min-width: 190px;
  max-width: 190px;
  white-space: nowrap;
}

.workflow-col-action {
  width: 165px;
  min-width: 165px;
  max-width: 165px;
}

.workflow-col-notes {
  width: 165px;
  min-width: 165px;
  max-width: 165px;
}

.workflow-col-timeline {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
}

.next-contact-date-overdue {
  color: #dc3545;
  font-weight: 700;
}

.next-contact-date-emphasis {
  color: #000;
  font-weight: 700;
}

.workflow-summary-card {
  height: 100%;
}

.workflow-overview-card .card-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.workflow-overview-metric {
  min-width: 138px;
  padding-right: 18px;
  border-right: 1px solid #e4e6ef;
}

.workflow-response-refresh-stat {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 260px;
  padding-right: 18px;
  border-right: 1px solid #e4e6ef;
}

.workflow-response-refresh-stat .listing-stat-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid forestgreen;
  border-radius: 50%;
  color: #ffffff;
  background-color: forestgreen;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workflow-response-refresh-stat .listing-stat-button {
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.workflow-response-refresh-stat .listing-stat-button:hover,
.workflow-response-refresh-stat .listing-stat-button:focus {
  background-color: darkgreen !important;
  border-color: darkgreen !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(34, 139, 34, 0.18);
}

.workflow-response-refresh-stat .listing-stat-button:disabled {
  opacity: 0.75;
  cursor: progress;
}

.workflow-response-refresh-stat .listing-stat-button .spinner-border {
  color: #ffffff !important;
}

.workflow-response-refresh-copy {
  min-width: 0;
}

.workflow-response-refresh-copy span {
  display: block;
  color: #625f7c;
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.2;
}

.workflow-response-refresh-copy strong {
  display: block;
  margin-top: 0.35rem;
  color: #120b3d;
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.25;
}

.workflow-overview-controls {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.workflow-quick-filters-menu {
  min-width: min(680px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}

.workflow-quick-filters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  gap: 14px;
  align-items: end;
}

.workflow-followup-filter {
  grid-column: 1 / -1;
}

.workflow-filter-tabs.btn-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-filter-tabs.btn-group>.btn {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.workflow-filter-tabs.btn-group>.btn .badge {
  margin-left: 0 !important;
  min-width: 1.45rem;
}

@media (max-width: 767.98px) {
  .workflow-overview-metric {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid #e4e6ef;
    padding: 0 0 12px 0;
  }

  .workflow-response-refresh-stat {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid #e4e6ef;
    padding: 0 0 12px 0;
  }

  .workflow-overview-controls {
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
  }

  .workflow-quick-filters-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.workflow-follow-card-body {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.workflow-toolbar-card .card-body {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
}

.workflow-holdoff-select {
  width: 18px;
  height: 18px;
}

.timeline-list {
  position: relative;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #e4e6ef;
}

.timeline-item {
  position: relative;
  padding-left: 28px;
  margin-bottom: 18px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1b84ff;
  border: 3px solid #eef6ff;
}

.ch-default-tree {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ch-default-tree-node,
.ch-default-tree-child {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-gray-300);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.ch-default-tree-node {
  overflow: hidden;
}

.ch-default-tree-header,
.ch-default-tree-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}

.ch-default-tree-header {
  background: linear-gradient(180deg, rgba(247, 250, 252, 0.9), rgba(255, 255, 255, 0));
}

.ch-default-tree-children {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0 1.25rem 1.25rem 2rem;
  padding-left: 1.5rem;
}

.ch-default-tree-children::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 1.25rem;
  left: 0;
  width: 2px;
  background: var(--bs-gray-300);
}

.ch-default-tree-child {
  position: relative;
}

.ch-default-tree-child::before {
  content: "";
  position: absolute;
  top: 1.75rem;
  left: -1.5rem;
  width: 1.5rem;
  height: 2px;
  background: var(--bs-gray-300);
}

.ch-evaluation-meta {
  color: var(--bs-gray-700);
  font-size: 0.85rem;
  line-height: 1.45;
  word-break: break-word;
}

.ch-evaluation-summary-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2rem;
  max-width: 100%;
}

.ch-evaluation-summary-row .badge {
  padding: 0.42rem 0.7rem;
  font-size: 0.88rem;
  line-height: 1;
}

.ch-evaluation-kind-label {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.ch-evaluation-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 0.75rem;
  padding-top: 0.75rem;
}

.ch-evaluation-detail-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bs-primary);
  font-size: 0.82rem;
  font-weight: 700;
}

.ch-evaluation-detail-toggle i {
  font-size: 0.68rem;
  transition: transform 0.15s ease;
}

.ch-evaluation-detail-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.ch-evaluation-detail-item {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--bs-gray-200);
  border-radius: 8px;
  background: var(--bs-gray-100);
}

.ch-evaluation-detail-label {
  margin-bottom: 0.25rem;
  color: var(--bs-gray-600);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ch-evaluation-detail-value {
  color: var(--bs-gray-800);
  font-size: 0.82rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ch-evaluation-card-actions {
  min-width: 150px;
}

@media (max-width: 767.98px) {

  .ch-default-tree-header,
  .ch-default-tree-child {
    grid-template-columns: minmax(0, 1fr);
  }

  .ch-default-tree-children {
    margin-left: 0.75rem;
    padding-left: 1rem;
  }

  .ch-evaluation-card-actions {
    min-width: 0;
    width: 100%;
  }
}

/* Darker label colors for action plan checkboxes (yellow/green) */
.workflow-action-cell .form-check-label.text-warning {
  color: #92400e !important;
}

.workflow-action-cell .form-check-label.text-success {
  color: #166534 !important;
}

/* Purple badge for Standard tag on evaluation page */
.ch-badge-purple {
  color: #7239ea;
  background-color: #f0e6ff;
}

.btn.btn-light-purple {
  color: #ffffff;
  background-color: #5b21b6;
  border-color: #5b21b6;
}

.btn.btn-light-purple i,
.btn.btn-light-purple .svg-icon {
  color: #ffffff;
}

.btn-check:checked+.btn.btn-light-purple,
.btn-check:active+.btn.btn-light-purple,
.btn.btn-light-purple:focus:not(.btn-active),
.btn.btn-light-purple:hover:not(.btn-active),
.btn.btn-light-purple:active:not(.btn-active),
.btn.btn-light-purple.active,
.btn.btn-light-purple.show,
.show>.btn.btn-light-purple {
  color: #ffffff;
  background-color: #4c1d95 !important;
  border-color: #4c1d95;
}

.btn-check:checked+.btn.btn-light-purple i,
.btn-check:active+.btn.btn-light-purple i,
.btn.btn-light-purple:focus:not(.btn-active) i,
.btn.btn-light-purple:hover:not(.btn-active) i,
.btn.btn-light-purple:active:not(.btn-active) i,
.btn.btn-light-purple.active i,
.btn.btn-light-purple.show i,
.show>.btn.btn-light-purple i {
  color: #ffffff;
}

/* Custom purple button styling */

.ch-prospect-tags-dropdown {
  min-width: 150px;
}

.ch-prospect-tags-trigger {
  min-height: 34px;
  max-width: 240px;
  overflow: hidden;
}

.ch-prospect-tags-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.ch-prospect-tags-menu {
  min-width: 220px;
  max-height: 280px;
  overflow-y: auto;
}

.ch-prospect-tags-menu .dropdown-item {
  border-radius: 6px;
}

.ch-prospect-tag-filter-toggle {
  min-height: 42px;
}

.ch-prospect-tag-filter-menu {
  min-width: 260px;
  max-height: 280px;
  overflow-y: auto;
}

.ch-prospect-tag-filter-menu .dropdown-item {
  border-radius: 6px;
}

/* Popup mode styling for message templates */
.messages-templates-popup {
  background-color: #ffffff !important;
}

.messages-templates-popup .messages-template-popup-container {
  padding: 1rem;
}

.messages-templates-popup .card {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.messages-templates-popup .card-body {
  padding: 0 !important;
}

.messages-templates-popup .table-responsive {
  overflow-x: hidden !important;
}

.messages-templates-popup .message-templates-table {
  width: 100% !important;
}

.messages-templates-popup .message-template-card {
  margin-bottom: 1.25rem !important;
}

body[data-page-key="connections"].ch-connection-evaluation-mode.ch-connection-overview-mode #tableConnections_wrapper .dt-paging,
body[data-page-key="connections"].ch-connection-evaluation-mode.ch-connection-overview-mode #tableConnections_wrapper .dataTables_paginate {
  display: inline-flex !important;
}