/* DI-3 Contact segment page: copied from assetsUI/data-integration-06-11-2026/data-integration-06-11-2026/assets/css/view-contact-segment.css.
   Selectors without a vcs class are scoped under :where(.vcs-page) (no added specificity) so they stay on this page. */
/* ============================================================================
   VIEW CONTACT SEGMENT (assets/css/view-contact-segment.css)
   ----------------------------------------------------------------------------
   Pixel-perfect CRM segment viewer consistent with contacts.php.
   Uses shared CRM design tokens from base.css and list-page.css:
     - Card container .lp
     - Table layout (44px headers, 48px rows, sticky frozen columns)
     - Standard inputs, buttons, dropdowns, and modals
     - Responsive across all viewports
   ============================================================================ */

/* ---------------------------------------------------------------- Container */
.lp.vcs-page {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: calc(100vh - var(--header-h, 64px) - 48px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  color: var(--text);
  overflow: hidden;
}

/* ---------------------------------------------------------------- Header */
.vcs-header-wrap {
  display: flex;
  flex-direction: column;
  padding: 20px 24px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.vcs-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color var(--fast, 0.15s) ease;
}

.vcs-breadcrumb:hover {
  color: var(--brand);
  text-decoration: none;
}

.vcs-breadcrumb .icon {
  width: 14px;
  height: 14px;
}

.vcs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.vcs-header__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vcs-header__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* QA #637: the title renames the segment (design-check-24-nov view-contact-segment.css). */
.vcs-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  max-width: 100%;
  min-width: 0;
}

.vcs-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius-sm, 6px);
  padding: 2px 6px;
  margin: -2px -6px;
  border: 1px solid transparent;
  transition: background-color var(--fast, 0.15s), border-color var(--fast, 0.15s);
}

.vcs-title:hover {
  background-color: var(--surface-hover);
  border-color: var(--border);
}

.vcs-title-input {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm, 6px);
  padding: 2px 8px;
  min-width: 220px;
  max-width: 100%;
  width: auto;
  field-sizing: content;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
  box-shadow: var(--focus-ring);
  transition: border-color var(--fast, 0.15s), box-shadow var(--fast, 0.15s);
}

.vcs-title-input:focus {
  border-color: var(--brand);
}


.vcs-subtitle {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.vcs-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill, 999px);
  background: var(--surface-3);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.vcs-badge--static {
  background: var(--surface-2);
  color: var(--text);
}

.vcs-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  /* QA #623: the design's overflow-x:auto clipped the Use in / Actions menus (an overflowing
     box clips its absolutely placed children); wrap instead so the menus open over the page. */
  flex-wrap: wrap;
  overflow: visible;
}

/* ---------------------------------------------------------------- Subnav Tabs */
.vcs-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.vcs-tabs::-webkit-scrollbar {
  display: none;
}

.vcs-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color var(--fast, 0.15s) ease,
    border-color var(--fast, 0.15s) ease;
}

.vcs-tab:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.vcs-tab.is-active {
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--brand);
}

/* ---------------------------------------------------------------- Main Split Layout */
.vcs-layout {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--surface);
  position: relative;
}

/* ---------------------------------------------------------------- Left Filters Pane */
.vcs-filter-pane {
  display: flex;
  flex-direction: column;
  width: 260px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transition:
    width 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.15s ease;
  overflow: hidden;
}

.vcs-filter-pane.is-collapsed {
  width: 0;
  border-right-color: transparent;
  opacity: 0;
  pointer-events: none;
}

.vcs-filter-pane__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.vcs-filter-pane__title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vcs-filter-pane__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.vcs-filter-pane__edit {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.vcs-filter-pane__edit:hover {
  text-decoration: underline;
}

.vcs-filter-pane__collapse-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm, 6px);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background var(--fast, 0.15s) ease,
    color var(--fast, 0.15s) ease;
}

.vcs-filter-pane__collapse-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.vcs-filter-pane__body {
  padding: 20px 16px;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- Main Content Area */
.vcs-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  overflow-y: auto;
  container-type: inline-size;
  container-name: vcsMain;
}

.vcs-tab-pane {
  display: none;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.vcs-tab-pane.is-active {
  display: flex;
}

.vcs-tab-pane[data-vcs-tab-pane="overview"].is-active {
  overflow: hidden;
}

.vcs-tab-pane[data-vcs-tab-pane="performance"].is-active,
.vcs-tab-pane[data-vcs-tab-pane="activity"].is-active,
.vcs-tab-pane[data-vcs-tab-pane="settings"].is-active {
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  -webkit-overflow-scrolling: touch;
}

/* ---------------------------------------------------------------- Metrics Summary Bar */
.vcs-metrics-bar {
  margin: 14px 24px 12px;
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px 20px;
  transition: opacity 0.2s ease;
}

.vcs-metrics-bar.is-hidden {
  display: none !important;
}
.vcs-metrics-bar.is-hidden + .vcs-toolbar {
  margin-top: 10px !important;
}

.vcs-metric-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.vcs-metric-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.vcs-metric-label--wrap {
  white-space: normal;
  text-overflow: clip;
}

.vcs-metric-val {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.vcs-metric-sub {
  font-size: 12px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* "View details" is a button: same look as the links beside it. */
button.vcs-metric-sub {
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.vcs-metric-sub:hover {
  text-decoration: underline;
}

.vcs-metric-sub--muted {
  color: var(--text-muted);
}

/* Container Query Responsive Grid for Metrics: Adapts to real available width */
@container vcsMain (min-width: 1080px) {
  .vcs-metrics-bar {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
  }
  .vcs-metric-cell:not(:last-child) {
    border-right: 1px solid var(--border);
    padding-right: 16px;
  }
}

@container vcsMain (min-width: 680px) and (max-width: 1079px) {
  .vcs-metrics-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 24px;
  }
  .vcs-metric-cell:not(:nth-child(3n)) {
    border-right: 1px solid var(--border);
    padding-right: 16px;
  }
  .vcs-metric-cell:nth-child(-n + 3) {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }
}

@container vcsMain (max-width: 679px) {
  .vcs-metrics-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
  }
  .vcs-metric-cell:not(:nth-child(2n)) {
    border-right: 1px solid var(--border);
    padding-right: 14px;
  }
  .vcs-metric-cell:nth-child(-n + 4) {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
}

@container vcsMain (max-width: 420px) {
  .vcs-metrics-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .vcs-metric-cell {
    border-right: none !important;
    padding-right: 0 !important;
  }
  .vcs-metric-cell:not(:last-child) {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
}

/* ---------------------------------------------------------------- Table Toolbar */
.vcs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 24px 12px;
}

.vcs-toolbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 280px;
  max-width: 320px;
}

.vcs-search-input {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.vcs-search-input .icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.vcs-search-input input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm, 8px);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition:
    border-color var(--fast, 0.15s),
    box-shadow var(--fast, 0.15s);
}

.vcs-search-input input:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

.vcs-toolbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

/* ---------------------------------------------------------------- Bulk Selection Bar */
.lp-bulk.vcs-bulk-toolbar,
.vcs-bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 24px 10px;
  padding: 6px 12px;
  border-radius: var(--radius-sm, 8px);
  background: var(--brand-soft);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.lp-bulk.vcs-bulk-toolbar .lp-bulk__left,
.vcs-bulk-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.lp-bulk.vcs-bulk-toolbar .lp-bulk__acts,
.vcs-bulk-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

:where(.vcs-page) .lp-bulkbtn,
.vcs-bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--fast, 0.12s);
}

:where(.vcs-page) .lp-bulkbtn .icon,
:where(.vcs-page) .lp-bulkbtn .lp-i,
.vcs-bulk-btn .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

:where(.vcs-page) .lp-bulkbtn:hover,
:where(.vcs-page) .lp-bulkbtn.is-open,
.vcs-bulk-btn:hover,
.vcs-bulk-btn.is-open {
  background: rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] :where(.vcs-page) .lp-bulkbtn:hover,
[data-theme="dark"] :where(.vcs-page) .lp-bulkbtn.is-open,
[data-theme="dark"] .vcs-bulk-btn:hover,
[data-theme="dark"] .vcs-bulk-btn.is-open {
  background: var(--surface-hover);
}

:where(.vcs-page) .lp-bulkbtn--danger{
  color: var(--danger);
}

:where(.vcs-page) .lp-bulk__x{
  margin-left: auto;
}

/* Ensure button icons and sizing inside .vcs-page match contacts.php */
.vcs-page .lp-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  gap: 6px;
}

.vcs-page .lp-btn .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Tooltip on bulk action items */
.vcs-tooltip-trigger {
  position: relative;
  display: inline-flex;
}

.vcs-tooltip-trigger:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel, #0e1629);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10050;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

/* ---------------------------------------------------------------- Table & Cards */
.vcs-table-card {
  display: flex;
  flex-direction: column;
  margin: 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  background: var(--surface);
  overflow: hidden;
}

.vcs-table-wrap {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 280px;
  max-height: calc(100vh - 360px);
  overflow: auto;
  position: relative;
}

.vcs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

/* Table Header */
.vcs-th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  user-select: none;
}

.vcs-th--sortable {
  cursor: pointer;
}

.vcs-th--sortable:hover {
  background: var(--surface-hover);
}

.vcs-th__inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vcs-th-sort-icon {
  font-size: 10px;
  color: var(--text-subtle);
  transition: opacity var(--fast, 0.12s);
}

/* Table Body Cells */
.vcs-td {
  height: 48px;
  max-width: 320px;
  padding: 0 14px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 400;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.vcs-row:hover .vcs-td {
  background: var(--surface-hover);
}

.vcs-row.is-selected .vcs-td {
  background: var(--brand-soft);
}

/* Sticky Checkbox Column */
.vcs-th--sticky-cb,
.vcs-td--sticky-cb {
  position: sticky;
  left: 0;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  padding: 0;
  text-align: center;
  z-index: 3;
  background: var(--surface);
}

.vcs-th--sticky-cb {
  z-index: 5;
  background: var(--surface-2);
}

/* Sticky Name Column */
.vcs-th--sticky-name,
.vcs-td--sticky-name {
  position: sticky;
  left: 48px;
  min-width: 260px;
  z-index: 3;
  box-shadow: inset -1px 0 0 var(--border-strong);
}

.vcs-th--sticky-name {
  z-index: 5;
  background: var(--surface-2);
}

.vcs-td--sticky-name {
  background: var(--surface);
  box-shadow: inset -1px 0 0 var(--border);
}

.vcs-row:hover .vcs-td--sticky-cb,
.vcs-row:hover .vcs-td--sticky-name {
  background: var(--surface-hover);
}

/* Checkbox control */
.vcs-row-cb,
#vcsSelectAll {
  width: 18px;
  height: 18px;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--brand);
  cursor: pointer;
}

/* Name cell + hover Preview button matching contacts.php */
.vcs-name-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.vcs-name-main {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vcs-contact-name {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.vcs-contact-name:hover {
  text-decoration: underline;
}

.vcs-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  height: 28px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm, 8px);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--fast, 0.12s),
    background var(--fast, 0.12s);
}

.vcs-row:hover .vcs-preview-btn,
.vcs-preview-btn:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.vcs-preview-btn:hover {
  background: var(--surface-hover);
}

/* Company Badge / Logo inside table */
.vcs-company-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.vcs-co-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: var(--panel, #0e1629);
  flex-shrink: 0;
}

.vcs-co-icon--apple {
  background: #000000;
}
.vcs-co-icon--expedia {
  background: #00355f;
}
.vcs-co-icon--zillow {
  background: #1274ed;
}
.vcs-co-icon--hasbro {
  background: #d02028;
}
.vcs-co-icon--activision {
  background: #1a1a1a;
}
.vcs-co-icon--austin {
  background: #059669;
}
.vcs-co-icon--stars {
  background: #d97706;
}
.vcs-co-icon--ellepotle {
  background: #7c3aed;
}
.vcs-co-icon--actsocial {
  background: #2563eb;
}
.vcs-co-icon--lg {
  width: 28px;
  height: 28px;
  font-size: 13.5px;
  border-radius: 6px;
}

.vcs-drawer-body {
  padding: 0 !important;
}

/* Owner Avatar badge matching contacts.php */
.vcs-owner-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vcs-owner-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 11px;
  font-weight: 700;
}

/* ---------------------------------------------------------------- Pagination (matching contacts.php) */
.vcs-pagination-bar,
.vcs-access-pager,
.vcs-pagination-bar.lp-pager,
.vcs-access-pager.lp-pager {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  padding: 14px 24px !important;
  border-top: 1px solid var(--border);
  background: var(--surface);
  box-sizing: border-box;
  width: 100%;
}

.vcs-pagination-bar[hidden],
.vcs-access-pager[hidden],
.vcs-pagination-bar:empty,
.vcs-access-pager:empty {
  display: none !important;
}

.vcs-pager-nums,
.vcs-pagination-bar .crm-pager__nums,
.vcs-access-pager .crm-pager__nums {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
}

.vcs-pagination-bar .dropdown,
.vcs-access-pager .dropdown,
.vcs-pagination-bar .crm-pager__perwrap,
.vcs-access-pager .crm-pager__perwrap {
  display: inline-flex !important;
  align-items: center !important;
  position: relative;
  margin-left: 14px;
}

.vcs-pagination-bar .lp-pg,
.vcs-access-pager .lp-pg,
.vcs-pagination-bar .crm-pager__btn,
.vcs-access-pager .crm-pager__btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap !important;
  cursor: pointer;
  box-sizing: border-box;
  transition:
    background var(--fast, 0.12s),
    border-color var(--fast, 0.12s);
}

.vcs-pagination-bar .lp-pg:hover:not(:disabled),
.vcs-access-pager .lp-pg:hover:not(:disabled),
.vcs-pagination-bar .lp-pg[aria-expanded="true"],
.vcs-access-pager .lp-pg[aria-expanded="true"],
.vcs-pagination-bar .crm-pager__btn:hover:not(:disabled),
.vcs-access-pager .crm-pager__btn:hover:not(:disabled),
.vcs-pagination-bar .crm-pager__btn[aria-expanded="true"],
.vcs-access-pager .crm-pager__btn[aria-expanded="true"] {
  background: var(--surface-hover);
}

.vcs-pagination-bar .lp-pg:focus-visible,
.vcs-access-pager .lp-pg:focus-visible,
.vcs-pagination-bar .crm-pager__btn:focus-visible,
.vcs-access-pager .crm-pager__btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring, 0 0 0 3px rgba(21, 94, 239, 0.35));
}

.vcs-pagination-bar .lp-pg:disabled,
.vcs-access-pager .lp-pg:disabled,
.vcs-pagination-bar .crm-pager__btn:disabled,
.vcs-access-pager .crm-pager__btn:disabled {
  color: var(--text-subtle, var(--text-muted));
  cursor: default;
}

.vcs-pagination-bar .lp-pg--n,
.vcs-access-pager .lp-pg--n,
.vcs-pagination-bar .crm-pager__btn--num,
.vcs-access-pager .crm-pager__btn--num {
  padding: 0;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.vcs-pagination-bar .lp-pg--n[aria-current="page"],
.vcs-access-pager .lp-pg--n[aria-current="page"],
.vcs-pagination-bar .crm-pager__btn--num[aria-current="page"],
.vcs-access-pager .crm-pager__btn--num[aria-current="page"] {
  border-color: var(--text-muted);
  font-weight: 700;
}

.vcs-pagination-bar .lp-pg#vcsPagerPrev,
.vcs-pagination-bar .lp-pg#vcsPagerNext,
.vcs-access-pager .lp-pg#vcsAccessUsersPrev,
.vcs-access-pager .lp-pg#vcsAccessUsersNext,
.vcs-pagination-bar .crm-pager__btn--step,
.vcs-access-pager .crm-pager__btn--step {
  padding: 0 8px;
}

.vcs-pagination-bar .lp-pg__gap,
.vcs-access-pager .lp-pg__gap,
.vcs-pagination-bar .crm-pager__gap,
.vcs-access-pager .crm-pager__gap {
  padding: 0 4px;
  color: var(--text-muted);
  user-select: none;
}

.vcs-pagination-bar .lp-pg--per,
.vcs-access-pager .lp-pg--per {
  padding: 0 10px;
  font-weight: 500;
}

.vcs-pagination-bar .crm-pager__i,
.vcs-access-pager .crm-pager__i,
.vcs-pagination-bar .lp-pg .icon,
.vcs-access-pager .lp-pg .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.vcs-pagination-bar .crm-pager__caret,
.vcs-access-pager .crm-pager__caret,
.vcs-pagination-bar .lp-pg--per .icon,
.vcs-access-pager .lp-pg--per .icon {
  width: 12px;
  height: 12px;
  margin-left: 2px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .vcs-pagination-bar,
  .vcs-pagination-bar.lp-pager {
    gap: 2px;
    padding: 10px 14px;
  }
  .vcs-pagination-bar .lp-pg--n:not([aria-current]),
  .vcs-pagination-bar .lp-pg__gap {
    display: none;
  }
  .vcs-pagination-bar .lp-pg#vcsPagerPrev span,
  .vcs-pagination-bar .lp-pg#vcsPagerNext span {
    display: none;
  }
  .vcs-pagination-bar .dropdown {
    margin-left: 6px;
  }
}

/* ---------------------------------------------------------------- Column Chooser Modal */
/* Leverages .lp-modal, .lp-modal--wide, .lp-cols, .lp-cols__left, .lp-cols__right,
   .lp-cols__groups, .lp-cols__sel, .lp-cols__item, .lp-check from list-page.css */
:where(.vcs-page) .lp-modal-ov[hidden]{
  display: none !important;
}

/* ---------------------------------------------------------------- SVG Icon Size Normalizers */
:where(.vcs-page) .iconSize-10{
  width: 10px !important;
  height: 10px !important;
}
:where(.vcs-page) .iconSize-12{
  width: 12px !important;
  height: 12px !important;
}
:where(.vcs-page) .iconSize-14{
  width: 14px !important;
  height: 14px !important;
}
:where(.vcs-page) .iconSize-16{
  width: 16px !important;
  height: 16px !important;
}
:where(.vcs-page) .iconSize-18{
  width: 18px !important;
  height: 18px !important;
}
:where(.vcs-page) .iconSize-20{
  width: 20px !important;
  height: 20px !important;
}

:where(.vcs-page) .lp-btn svg,
:where(.vcs-page) .dropdown button svg,
:where(.vcs-page) [data-dropdown-toggle] svg,
.vcs-accordion__chevron svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------- Side Drawers (Contact Preview & Segment Details) */
.vcs-drawer-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  background: #fffbeb;
  color: #92400e;
  border-bottom: 1px solid #fef3c7;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.vcs-drawer-alert .icon,
.vcs-drawer-alert svg {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0;
  color: #d97706;
}

[data-theme="dark"] .vcs-drawer-alert {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border-bottom-color: rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .vcs-drawer-alert .icon,
[data-theme="dark"] .vcs-drawer-alert svg {
  color: #fbbf24;
}

/* Accordion sections inside drawer (Unified with contacts.php .lp-pv__*) */
:where(.vcs-page) .lp-pv__sh{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 6px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

:where(.vcs-page) .lp-pv__sh-tools{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
}

:where(.vcs-page) .lp-pv__sh .icon{
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

:where(.vcs-page) .lp-pv__sh[aria-expanded="false"] .icon{
  transform: rotate(-90deg);
}

:where(.vcs-page) .lp-pv__sh[aria-expanded="true"] .icon{
  transform: rotate(0deg);
}

:where(.vcs-page) .lp-pv__sec:has(.lp-pv__sh[aria-expanded="false"]) .lp-pv__fields{
  display: none !important;
}

:where(.vcs-page) .lp-pv__sec h3{
  margin: 0;
}

/* Activity Toolbar inside Drawer */
.vcs-act-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.vcs-act-search {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  flex: 1 1 130px;
  min-width: 120px;
}

.vcs-act-search:focus {
  outline: 0;
  border-color: var(--brand);
}

/* Activity Cards inside Drawer */
.vcs-act-card {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.45;
  transition: background var(--fast, 0.12s);
}

.vcs-act-card:hover {
  background: var(--surface-hover);
}

.vcs-act-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.vcs-act-body {
  font-size: 12.5px;
  color: var(--text-muted);
  word-break: break-word;
  line-height: 1.45;
}

.vcs-assoc-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--fast, 0.12s);
}

.vcs-assoc-tag:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* Attribution Donut Chart */
.vcs-donut-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.vcs-donut-svg {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  transform: rotate(-90deg);
}

.vcs-donut-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.vcs-donut-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Drawer Empty States */
.vcs-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
}

.vcs-empty-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Segment Details Drawer Tabs */
.vcs-drawer-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.vcs-drawer-tab {
  padding: 8px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition:
    color var(--fast, 0.12s),
    border-color var(--fast, 0.12s);
}

.vcs-drawer-tab:hover {
  color: var(--text);
}

.vcs-drawer-tab.is-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.vcs-drawer-tab-content {
  display: block;
}

.vcs-drawer-tab-content[hidden] {
  display: none !important;
}

.vcs-seg-detail-section {
  padding: 20px;
}

.vcs-seg-detail-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

/* Floating Quick Note Composer */
.vcs-floating-composer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1060;
  width: min(440px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.vcs-floating-composer[hidden] {
  display: none !important;
}

.vcs-floating-composer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface-hover);
  border-bottom: 1px solid var(--border);
}

.vcs-floating-composer__body {
  padding: 14px 16px;
}

.vcs-prop-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vcs-prop-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vcs-prop-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.vcs-prop-val {
  font-size: 13.5px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.vcs-assoc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  background: var(--surface);
  transition: background var(--fast, 0.12s);
}

.vcs-assoc-card:hover {
  background: var(--surface-hover);
}

.vcs-timeline-month {
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.vcs-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 20px;
}

.vcs-timeline::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 2px;
  background: var(--border);
}

.vcs-timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  line-height: 1.4;
}

.vcs-timeline-dot {
  position: absolute;
  top: 4px;
  left: -20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 2px var(--surface);
}

.vcs-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 12px;
}

.vcs-empty-state__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2, #f3f4f6);
  color: var(--text-muted);
  margin-bottom: 8px;
}

[data-theme="dark"] .vcs-empty-state__icon {
  background: var(--surface-hover);
}

/* ---------------------------------------------------------------- Responsive */
@supports not (container-type: inline-size) {
  @media (max-width: 1200px) {
    .vcs-metrics-bar {
      grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }
  }
}

@media (max-width: 991px) {
  .vcs-filter-pane {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: 280px;
    max-width: 85vw;
    background: var(--surface);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.18);
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    transition:
      transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.2s ease;
  }

  .vcs-filter-pane.is-collapsed {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    width: 280px;
    border-right-color: transparent;
  }
}

@media (max-width: 899px) {
  .vcs-header-wrap,
  .vcs-toolbar,
  .vcs-pagination-bar {
    padding-left: 16px;
    padding-right: 16px;
  }
  .vcs-metrics-bar,
  .vcs-bulk-toolbar,
  .vcs-table-card {
    margin-left: 16px;
    margin-right: 16px;
  }
}

@media (max-width: 639px) {
  .vcs-metrics-bar {
    margin: 12px 12px 10px;
    padding: 10px 14px;
  }
  .vcs-header-wrap,
  .vcs-toolbar,
  .vcs-pagination-bar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .vcs-bulk-toolbar,
  .vcs-table-card {
    margin-left: 12px;
    margin-right: 12px;
  }
  .vcs-pagination-bar {
    gap: 4px;
    padding: 10px 12px;
  }
}

/* ---------------------------------------------------------------- Desktop Viewport Lock (No Page Scroll) */
@media (min-width: 992px) {
  html:has(.vcs-page),
  body:has(.vcs-page) {
    height: 100vh !important;
    overflow: hidden !important;
  }

  .app:has(.vcs-page),
  .app__body:has(.vcs-page) {
    height: 100vh !important;
    overflow: hidden !important;
  }

  .app__main:has(.vcs-page) {
    height: calc(100vh - var(--header-h, 64px)) !important;
    max-height: calc(100vh - var(--header-h, 64px)) !important;
    padding: 16px 20px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .lp.vcs-page {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .vcs-header-wrap {
    flex: 0 0 auto !important;
    padding: 16px 20px 0 !important;
  }

  .vcs-layout {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    overflow: hidden !important;
  }

  .vcs-filter-pane {
    overflow-y: auto !important;
  }

  /* S-07: the table keeps a usable height on short laptop screens; the page part scrolls instead. */
  .vcs-main {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding-bottom: 12px !important;
    container-type: inline-size;
    container-name: vcsMain;
  }

  .vcs-tab-pane[data-vcs-tab-pane="overview"].is-active {
    flex: 1 0 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
  }

  .vcs-tab-pane[data-vcs-tab-pane="performance"].is-active,
  .vcs-tab-pane[data-vcs-tab-pane="activity"].is-active,
  .vcs-tab-pane[data-vcs-tab-pane="settings"].is-active {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  .vcs-main:has([data-vcs-tab-pane="performance"].is-active),
  .vcs-main:has([data-vcs-tab-pane="activity"].is-active),
  .vcs-main:has([data-vcs-tab-pane="settings"].is-active) {
    padding-bottom: 0 !important;
  }

  .vcs-layout:has([data-vcs-tab-pane="performance"].is-active) .vcs-filter-pane,
  .vcs-layout:has([data-vcs-tab-pane="activity"].is-active) .vcs-filter-pane,
  .vcs-layout:has([data-vcs-tab-pane="settings"].is-active) .vcs-filter-pane,
  .vcs-filter-pane.vcs-filter-pane--hidden {
    display: none !important;
  }

  .vcs-metrics-bar {
    flex: 0 0 auto !important;
    margin: 12px 20px 10px !important;
    padding: 10px 16px !important;
  }

  .vcs-toolbar {
    flex: 0 0 auto !important;
    padding: 0 20px 10px !important;
  }

  .vcs-bulk-toolbar {
    flex: 0 0 auto !important;
    margin: 0 20px 10px !important;
  }

  .vcs-table-card {
    flex: 1 1 0 !important;
    min-height: 240px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    margin: 0 20px !important;
  }

  .vcs-table-wrap {
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: auto !important;
  }

  .vcs-pagination-bar {
    flex: 0 0 auto !important;
    padding: 10px 20px !important;
  }
}

/* ==========================================================================
   PREVIEW SIDE DRAWER - CONSISTENT ACCORDION & DROPDOWNS
   ========================================================================== */
:where(.vcs-page) .lp-pv__sh-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

:where(.vcs-page) .lp-pv__sh-row h3{
  margin: 0;
  display: flex;
  align-items: center;
  min-width: 0;
}

:where(.vcs-page) .lp-pv__sh-row .lp-pv__sh{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  padding: 4px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: color var(--fast, 0.12s);
}

:where(.vcs-page) .lp-pv__sh-row .lp-pv__sh:hover{
  color: var(--brand);
}

:where(.vcs-page) .lp-pv__sh-tools{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Ensure all dropdown menus appear above side drawer (.lp-side is z-index: 10031) */
:where(.vcs-page) .dropdown__menu,
body :where(.vcs-page) > .dropdown__menu{
  z-index: 10050 !important;
}

/* Link action styling */
.vcs-link-action {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vcs-link-action:hover {
  text-decoration: underline;
}

/* Activity Toolbar & Cards */
.vcs-act-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.vcs-act-search {
  flex: 1 1 140px;
  min-width: 120px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
}

.vcs-act-search:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

.vcs-act-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 8px;
}

.vcs-act-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.vcs-act-body {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text);
  word-break: break-word;
}

.vcs-assoc-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: pointer;
}

.vcs-assoc-tag:hover {
  color: var(--text);
}

.vcs-donut-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.vcs-donut-svg {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  transform: rotate(-90deg);
}

.vcs-donut-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  font-size: 12.5px;
}

.vcs-donut-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vcs-empty-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2, #f3f4f6);
  color: var(--text-muted);
  margin-bottom: 6px;
}

[data-theme="dark"] .vcs-empty-icon {
  background: var(--surface-hover);
}

.vcs-donut-chart-box {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  position: relative;
}

/* ---------------------------------------------------------------- Drawer Subbar & Actions (Screenshot 1) */
.vcs-drawer-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.vcs-drawer-rec-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand, #007a87);
  text-decoration: none;
}

.vcs-drawer-rec-link:hover {
  text-decoration: underline;
}

.vcs-actions-menu {
  width: 230px;
  max-height: 420px;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 6px 0;
  z-index: 10050;
}

.vcs-about-actions-menu {
  width: 220px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 6px 0;
  z-index: 10050;
}

/* ---------------------------------------------------------------- Quick Actions Reused from record.php */
:where(.vcs-page) .lp-side--preview .rp-quick{
  margin-top: 14px;
  margin-bottom: 12px;
}

:where(.vcs-page) .lp-side--preview .rp-quick__icon{
  border-radius: var(--radius-sm, 8px);
  width: 38px;
  height: 38px;
}

/* Ensure record popups and dropdowns sit above side drawer (z-index: 10031) */
:where(.vcs-page) .hx-amenu{
  z-index: 10050;
}

:where(.vcs-page) .hx-amenu--sub{
  z-index: 10051;
}

:where(.vcs-page) .hx-li{
  z-index: 10040;
}

:where(.vcs-page) .rpx-overlay,
:where(.vcs-page) .popup-overlay{
  z-index: 10040;
}

:where(.vcs-page) .rpx-drawer,
:where(.vcs-page) .popup-drawer{
  z-index: 10041;
}

/* ---------------------------------------------------------------- Section 13: Attribution Card & Chart (Screenshot 3) */
.vcs-attr-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 16px;
  margin-top: 10px;
}

.vcs-attr-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 14px;
  background: var(--surface-2, #e9ecef);
  color: var(--text-muted, #495057);
  font-size: 12.5px;
  font-weight: 500;
}

.vcs-attr-chart-box {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 0 22px;
  min-height: 170px;
}

.vcs-attr-chart-box canvas {
  width: 160px !important;
  height: 160px !important;
  max-width: 160px !important;
  max-height: 160px !important;
}

.vcs-attr-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text);
}

.vcs-attr-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #006666;
  flex-shrink: 0;
}

.vcs-perf-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.vcs-perf-chart-box {
  height: 240px;
  position: relative;
}

.vcs-stat-grid {
  --crm-columns: 3;
}

.vcs-dd-menu-w200 {
  min-width: 200px;
}

.vcs-btn-mini {
  height: 24px;
  padding: 0 6px;
  font-size: 11.5px;
}

.vcs-settings-card {
  max-width: 720px;
}

.vcs-sub-tx {
  font-size: 9px;
}

:where(.vcs-page) .crm-cursor-help{
  cursor: help;
}

/* ---------------------------------------------------------------- Field Hover Tools (Screenshot 5) */
:where(.vcs-page) .lp-pv__field-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  position: relative;
  width: 100%;
}

:where(.vcs-page) .lp-pv__field-row .lp-pv__val{
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 2px 4px;
}

:where(.vcs-page) .lp-pv__hover-tools{
  display: inline-flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  margin-left: auto;
  flex-shrink: 0;
}

:where(.vcs-page) .lp-pv__field:hover .lp-pv__hover-tools,
:where(.vcs-page) .lp-pv__field-row:hover .lp-pv__hover-tools,
:where(.vcs-page) .lp-pv__hover-tools.is-active{
  opacity: 1;
  pointer-events: auto;
}

:where(.vcs-page) .lp-pv__hover-tools .lp-icon-btn{
  width: 22px;
  height: 22px;
  color: var(--text-muted);
}

:where(.vcs-page) .lp-pv__hover-tools .lp-icon-btn:hover,
:where(.vcs-page) .lp-pv__hover-tools .lp-icon-btn[aria-expanded="true"],
:where(.vcs-page) .lp-pv__hover-tools .lp-icon-btn.is-active{
  color: var(--text);
  background: var(--surface-hover);
}

/* About this contact - Settings / Gear button */
.vcs-about-gear-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-strong, #cbd5e1);
  border-radius: 50%;
  color: var(--text-muted, #64748b);
  background: var(--surface, #ffffff);
  text-decoration: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.vcs-about-gear-btn:hover {
  background: var(--surface-hover, #f1f5f9);
  color: var(--text, #1e293b);
  border-color: var(--text-subtle, #94a3b8);
}

/* Field row hover â‹¯ options dropdown menu */
.vcs-field-menu {
  position: fixed;
  z-index: 10070;
  display: flex;
  flex-direction: column;
  min-width: 230px;
  padding: 6px 0;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}

.vcs-field-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: var(--text, #1e293b);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.vcs-field-menu__item:hover,
.vcs-field-menu__item:focus-visible {
  background: var(--surface-hover, #f1f5f9);
  color: var(--text, #0f172a);
  outline: none;
}

.vcs-field-menu__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #64748b);
  flex-shrink: 0;
}
/* ---------------------------------------------------------------- Drawer Textarea & Field Consistency */
.vcs-drawer-textarea,
:where(.vcs-page) textarea.input{
  display: block;
  width: 100%;
  height: auto;
  min-height: 72px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm, 6px);
  resize: none;
  transition:
    border-color var(--fast, 0.15s) ease,
    box-shadow var(--fast, 0.15s) ease;
}

.vcs-drawer-textarea:focus,
:where(.vcs-page) textarea.input:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-subtle, rgba(0, 102, 102, 0.15));
  outline: none;
}

.vcs-drawer-textarea[readonly],
:where(.vcs-page) textarea.input[readonly]{
  background: var(--surface-subtle, rgba(0, 0, 0, 0.02));
  color: var(--text);
  cursor: default;
}

[data-theme="dark"] .vcs-drawer-textarea[readonly],
[data-theme="dark"] :where(.vcs-page) textarea.input[readonly]{
  background: rgba(255, 255, 255, 0.04);
}

/* Ensure activity composer modal, its popups, search/menus, and file pickers sit above the preview side drawer and overlay */
:where(.vcs-page) .acx{
  z-index: 10050 !important;
}

:where(.vcs-page) .acx-pop{
  z-index: 10060 !important;
}

:where(.vcs-page) .acx-pop.is-open{
  z-index: 10060 !important;
}

:where(.vcs-page) .acx-menu{
  z-index: 10065 !important;
}

:where(.vcs-page) .acx-fp-ov{
  z-index: 10070 !important;
}

/* ======================================================================== */
/* PERFORMANCE TAB (matching reference screenshots)                         */
/* ======================================================================== */
.vcs-perf-layout {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  padding: 20px 24px 40px !important;
  align-items: stretch !important;
  min-height: min-content !important;
  width: 100% !important;
}

@media (max-width: 991px) {
  .vcs-perf-layout {
    padding: 16px !important;
    gap: 16px !important;
  }
}

/* Custom Scrollbars for tab panes */
.vcs-tab-pane[data-vcs-tab-pane="performance"]::-webkit-scrollbar,
.vcs-tab-pane[data-vcs-tab-pane="activity"]::-webkit-scrollbar,
.vcs-tab-pane[data-vcs-tab-pane="settings"]::-webkit-scrollbar {
  width: 8px;
}

.vcs-tab-pane[data-vcs-tab-pane="performance"]::-webkit-scrollbar-track,
.vcs-tab-pane[data-vcs-tab-pane="activity"]::-webkit-scrollbar-track,
.vcs-tab-pane[data-vcs-tab-pane="settings"]::-webkit-scrollbar-track {
  background: transparent;
}

.vcs-tab-pane[data-vcs-tab-pane="performance"]::-webkit-scrollbar-thumb,
.vcs-tab-pane[data-vcs-tab-pane="activity"]::-webkit-scrollbar-thumb,
.vcs-tab-pane[data-vcs-tab-pane="settings"]::-webkit-scrollbar-thumb {
  background: var(--border-strong, #cbd5e1);
  border-radius: 4px;
}

.vcs-tab-pane[data-vcs-tab-pane="performance"]::-webkit-scrollbar-thumb:hover,
.vcs-tab-pane[data-vcs-tab-pane="activity"]::-webkit-scrollbar-thumb:hover,
.vcs-tab-pane[data-vcs-tab-pane="settings"]::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted, #94a3b8);
}

.vcs-perf-nav-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vcs-perf-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vcs-perf-nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
}

.vcs-perf-nav-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.vcs-perf-nav-btn.is-active {
  background: var(--surface-2, #f1f5f9);
  color: var(--brand);
  font-weight: 600;
  border-left-color: var(--brand);
}

[data-theme="dark"] .vcs-perf-nav-btn.is-active {
  background: rgba(255, 255, 255, 0.08);
}

.vcs-perf-dot-purple {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #8b5cf6;
  flex-shrink: 0;
}

.vcs-perf-nav-empty {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
  padding: 4px 12px;
}

.vcs-perf-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.vcs-perf-nav-action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  text-align: left;
  transition:
    color 0.12s ease,
    background 0.12s ease;
}

.vcs-perf-nav-action:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* Main Content Area */
.vcs-perf-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* Topbar: Title + Date Range */
.vcs-perf-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.vcs-perf-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.vcs-perf-date-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  position: relative;
}

.vcs-perf-date-label {
  color: var(--text-muted);
  font-weight: 500;
}

/* Custom Calendar Date Range Picker matching reports-dashboard / quick-filters */
.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp {
  position: relative;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__inputs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: none;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border-strong, #cbd5e1);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  color: var(--text-muted, #64748b);
  transition:
    border-color var(--fast, 0.15s) ease,
    box-shadow var(--fast, 0.15s) ease;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__input.is-active,
.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__input:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__input svg,
.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__input .icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted, #64748b);
  flex: none;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__input input {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text, #111827);
  width: 86px;
  padding: 0;
  outline: none;
  cursor: pointer;
}

.vcs-perf-date-picker .cad-date-picker-wrap .cad-date-sep {
  font-size: 12.5px;
  color: var(--text-muted, #64748b);
  font-weight: 500;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__body {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  z-index: 1050;
  display: grid;
  grid-template-columns: 160px 280px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-lg, 8px);
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.12),
    0 8px 10px -6px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  width: 440px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__body[hidden] {
  display: none !important;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__presets {
  display: flex;
  flex-direction: column;
  max-height: 330px;
  overflow-y: auto;
  padding: 6px 0;
  border-right: 1px solid var(--border, #e5e7eb);
  background: var(--surface-2, #f8fafc);
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__preset {
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  color: var(--text, #111827);
  padding: 7px 14px;
  cursor: pointer;
  transition: background var(--fast, 0.15s) ease;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__preset:hover,
.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__preset:focus-visible,
.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__preset.is-active {
  background: var(--surface-hover, #edf2f7);
  outline: none;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__preset.is-active {
  color: var(--brand);
  font-weight: 600;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__cal {
  padding: 12px;
  box-sizing: border-box;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text, #111827);
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__nav {
  width: 28px;
  height: 28px;
  border: 0;
  background: none;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  color: var(--text, #111827);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__nav:hover {
  background: var(--surface-hover, #f1f5f9);
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__wd {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  padding: 4px 0;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__day {
  position: relative;
  height: 30px;
  border: 0;
  background: none;
  border-radius: var(--radius-sm, 4px);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text, #111827);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  display: inline-grid;
  place-items: center;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__day:hover {
  background: var(--surface-hover, #f1f5f9);
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__day.is-out {
  color: var(--text-subtle, #94a3b8);
  opacity: 0.5;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__day.is-range {
  background: var(--brand-soft);
  border-radius: 0;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__day.is-sel {
  background: var(--brand) !important;
  color: var(--brand-contrast, #ffffff) !important;
  font-weight: 700;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__clear {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 5px;
  border: 1px solid var(--border-strong, #cbd5e1);
  border-radius: var(--radius-pill, 999px);
  background: var(--surface, #ffffff);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  color: var(--text, #111827);
  text-align: center;
}

.vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__clear:hover {
  background: var(--surface-hover, #f1f5f9);
}

@media (max-width: 600px) {
  .vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__body {
    grid-template-columns: 1fr;
    width: min(320px, calc(100vw - 32px));
  }
  .vcs-perf-date-picker .cad-date-picker-wrap .seq-dp__presets {
    border-right: none;
    border-bottom: 1px solid var(--border, #e5e7eb);
    max-height: 120px;
  }
}

/* Performance Cards */
.vcs-perf-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 10px);
  padding: 20px 22px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.vcs-perf-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.vcs-perf-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.vcs-perf-card__controls-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vcs-perf-card__controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vcs-perf-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm, 6px);
  overflow: hidden;
  height: 30px;
}

.vcs-perf-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 100%;
  padding: 0;
  background: var(--surface);
  color: var(--text-muted);
  border: 0;
  cursor: pointer;
  transition: all 0.12s ease;
}

.vcs-perf-toggle-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.vcs-perf-toggle-btn.is-active {
  background: var(--surface-2, #f1f5f9);
  color: var(--text);
  font-weight: 600;
}

[data-theme="dark"] .vcs-perf-toggle-btn.is-active {
  background: rgba(255, 255, 255, 0.12);
}

.vcs-perf-info-btn {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.vcs-perf-info-btn:hover {
  color: var(--text);
}

.vcs-perf-card__badge-row {
  margin-bottom: 12px;
}

.vcs-perf-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2, #f1f5f9);
  border-radius: 9999px;
  border: 1px solid var(--border);
}

[data-theme="dark"] .vcs-perf-filter-pill {
  background: rgba(255, 255, 255, 0.06);
}

.vcs-perf-chart-container {
  position: relative;
  width: 100%;
}

.vcs-perf-chart-container--line {
  height: 320px;
}

.vcs-perf-chart-container--bar {
  height: 250px;
}

/* Performance Table View (matching user screenshot) */
.vcs-perf-table-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 10px;
}

.vcs-perf-table-header {
  display: flex;
  justify-content: flex-end;
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--border);
}

.vcs-perf-table-column-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #475467);
}

.vcs-perf-table-list {
  display: flex;
  flex-direction: column;
}

.vcs-perf-table-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

.vcs-perf-table-row:hover {
  background: var(--surface-hover, #f8fafc);
}

.vcs-perf-table-cell-date {
  font-size: 13px;
  color: var(--text, #101828);
  font-weight: 400;
}

.vcs-perf-table-cell-val {
  font-size: 13.5px;
  font-weight: 600;
  color: #0284c7;
  font-variant-numeric: tabular-nums;
}

/* Card 2 Breakdown Layout */
.vcs-perf-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vcs-perf-control-label {
  font-size: 12.5px;
  color: var(--text-muted);
}

.vcs-perf-breakdown-body {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 48px;
  padding: 12px 10px;
}

@media (max-width: 680px) {
  .vcs-perf-breakdown-body {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
}

.vcs-perf-pie-box {
  width: 220px;
  height: 220px;
  flex-shrink: 0;
}

.vcs-perf-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 260px;
}

.vcs-perf-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}

.vcs-perf-legend-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vcs-perf-bullet--teal {
  background-color: var(--brand);
}

.vcs-perf-legend-label {
  color: var(--text);
  font-weight: 500;
}

.vcs-perf-legend-val {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 13px;
}

.vcs-perf-event-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  margin-bottom: 6px;
}

/* ======================================================================== */
/* SEGMENT COMPARISON SUBVIEW STYLES                                        */
/* ======================================================================== */
.vcs-perf-subview {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.vcs-perf-subview[hidden] {
  display: none !important;
}

/* Main Comparison Card */
.vcs-compare-card {
  padding: 24px;
}

.vcs-compare-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
}

.vcs-compare-builder-btn {
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  border-color: var(--border-strong);
}

.vcs-compare-builder-btn:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* Hero Title & Subtitle */
.vcs-compare-hero {
  text-align: center;
  margin: 6px 0 20px;
}

.vcs-compare-hero-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.vcs-compare-hero-subtitle {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* Centered Date Range Picker in Comparison */
.vcs-compare-daterange-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp {
  position: relative;
}

.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__inputs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
}

.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  color: var(--text-muted);
  transition:
    border-color var(--fast, 0.15s) ease,
    box-shadow var(--fast, 0.15s) ease;
}

.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__input.is-active,
.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__input:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__input svg,
.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__input .icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex: none;
}

.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__input input {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  width: 86px;
  padding: 0;
  outline: none;
  cursor: pointer;
}

.vcs-compare-daterange-wrap .cad-date-picker-wrap .cad-date-sep {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__body {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  display: grid;
  grid-template-columns: 160px 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 8px);
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.12),
    0 8px 10px -6px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  width: 440px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
}

.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__body[hidden] {
  display: none !important;
}

.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__presets {
  display: flex;
  flex-direction: column;
  max-height: 330px;
  overflow-y: auto;
  padding: 6px 0;
  border-right: 1px solid var(--border);
  background: var(--surface-2);
}

.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__preset {
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  padding: 7px 14px;
  cursor: pointer;
  transition: background var(--fast, 0.15s) ease;
}

.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__preset:hover,
.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__preset:focus-visible,
.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__preset.is-active {
  background: var(--surface-hover);
  outline: none;
}

.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__preset.is-active {
  color: var(--brand);
  font-weight: 600;
}

.vcs-compare-daterange-wrap .cad-date-picker-wrap .seq-dp__cal {
  padding: 12px;
  box-sizing: border-box;
}

/* Selectors 3-Column Grid */
.vcs-compare-selectors-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .vcs-compare-selectors-grid {
    grid-template-columns: 1fr;
  }
}

.vcs-compare-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.vcs-compare-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 20px;
}

.vcs-compare-col-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.vcs-compare-remove-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: var(--radius-sm, 4px);
  transition: color var(--fast, 0.12s);
}

.vcs-compare-remove-btn:hover {
  color: var(--danger);
}

.vcs-compare-remove-btn[hidden] {
  display: none !important;
}

.vcs-compare-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.vcs-compare-dropdown {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}

.vcs-compare-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm, 6px);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  text-align: left;
  transition:
    border-color var(--fast, 0.15s),
    box-shadow var(--fast, 0.15s);
}

.vcs-compare-select-btn:hover,
.vcs-compare-select-btn:focus-visible {
  border-color: var(--brand);
  outline: none;
}

.vcs-compare-select-btn--static {
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: default;
  border-color: var(--border);
}

.vcs-compare-select-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.vcs-compare-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px 6px;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: var(--radius-sm, 4px);
  transition: color var(--fast, 0.15s);
}

.vcs-compare-add-btn:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

.vcs-compare-add-btn[hidden] {
  display: none !important;
}

/* Custom Dropdown Menu for Segments Search */
.vcs-compare-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: 300px;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  z-index: 1060;
  overflow: hidden;
  padding: 0;
}

.vcs-compare-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.vcs-compare-search-input {
  flex: 1 1 auto;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm, 6px);
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color var(--fast, 0.15s);
}

.vcs-compare-search-input:focus {
  border-color: var(--brand);
}

.vcs-compare-search-wrap svg,
.vcs-compare-search-wrap .icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.vcs-compare-items-list {
  max-height: 240px;
  overflow-y: auto;
  padding: 4px 0;
}

.vcs-compare-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background var(--fast, 0.12s);
}

.vcs-compare-item:hover,
.vcs-compare-item:focus-visible {
  background: var(--surface-hover);
  outline: none;
}

.vcs-compare-item.is-selected {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.vcs-compare-item-icon {
  font-size: 13px;
  flex-shrink: 0;
}

.vcs-compare-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sections inside Comparison (Overview, E-mails, Landing pages, CTAs) */
.vcs-compare-section {
  margin-top: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.vcs-compare-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
}

/* Overview Cards Grid */
.vcs-compare-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 900px) {
  .vcs-compare-overview-grid {
    grid-template-columns: 1fr;
  }
}

.vcs-compare-overview-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vcs-compare-overview-card[hidden] {
  display: none !important;
}

.vcs-compare-overview-card__header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vcs-compare-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.vcs-compare-card-title:hover {
  text-decoration: underline;
}

.vcs-compare-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.vcs-compare-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vcs-compare-meta-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
}

.vcs-compare-meta-val {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vcs-compare-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
  flex-shrink: 0;
}

.vcs-compare-overview-card__metrics {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-2);
}

.vcs-compare-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.vcs-compare-k {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.vcs-compare-v {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.vcs-compare-v--brand {
  color: var(--brand);
}

.vcs-compare-v--muted {
  color: var(--text-muted);
  font-weight: 500;
}

/* Comparison Tables */
.vcs-compare-table-responsive {
  width: 100%;
  overflow-x: auto;
}

.vcs-compare-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

.vcs-compare-data-table tr {
  border-bottom: 1px solid var(--border);
}

.vcs-compare-data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.vcs-compare-data-table tr:last-child td {
  border-bottom: 0;
}

.vcs-compare-td--label {
  color: var(--text);
  font-weight: 500;
  width: 35%;
}

.vcs-compare-td--val {
  color: var(--text);
  width: 21.6%;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.vcs-compare-td--val[hidden] {
  display: none !important;
}

/* Report Cards below main compare card */
.vcs-compare-report-card {
  padding: 20px;
}

.vcs-compare-overlap-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  margin-bottom: 8px;
}

.vcs-compare-overlap-chart-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  min-height: 280px;
}

.vcs-compare-overlap-circle-wrap {
  width: 250px;
  height: 250px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ======================================================================== */
/* AVAILABLE CHANNELS SUBVIEW STYLES                                        */
/* ======================================================================== */
.vcs-perf-nav-channel-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vcs-perf-nav-btn--channel .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.vcs-channels-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.vcs-channels-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--fast, 0.15s) ease;
}

.vcs-channels-pill:hover {
  background: var(--surface-hover);
}

.vcs-channels-pill.is-active {
  background: var(--brand);
  border-color: var(--border-strong);
  color: var(--surface, #ffffff);
  font-weight: 600;
}

/* Channels 4-column Grid */
.vcs-channels-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 1320px) {
  .vcs-channels-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .vcs-channels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .vcs-channels-grid {
    grid-template-columns: 1fr;
  }
}

/* Channel Card */
.vcs-channel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 230px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition:
    transform var(--fast, 0.15s) ease,
    box-shadow var(--fast, 0.15s) ease;
}

.vcs-channel-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: var(--border-strong);
}

.vcs-channel-card[hidden] {
  display: none !important;
}

.vcs-channel-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Badges */
.vcs-channel-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill, 999px);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
}

.vcs-channel-badge--personalize {
  background: #fdf2f8;
  color: #be185d;
  border: 1px solid #fbcfe8;
}

[data-theme="dark"] .vcs-channel-badge--personalize {
  background: rgba(190, 24, 93, 0.2);
  color: #f472b6;
  border-color: rgba(190, 24, 93, 0.3);
}

.vcs-channel-badge--analyze {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

[data-theme="dark"] .vcs-channel-badge--analyze {
  background: rgba(4, 120, 87, 0.2);
  color: #34d399;
  border-color: rgba(4, 120, 87, 0.3);
}

.vcs-channel-badge--automate {
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

[data-theme="dark"] .vcs-channel-badge--automate {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.15);
}

.vcs-channel-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.vcs-channel-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.vcs-channel-card__foot {
  margin-top: 24px;
  padding-top: 8px;
}

.vcs-channel-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  transition: color var(--fast, 0.15s) ease;
}

.vcs-channel-link:hover {
  text-decoration: underline;
  color: var(--brand-hover);
}

.vcs-channel-link svg,
.vcs-channel-link .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Empty State */
.vcs-channels-empty {
  padding: 48px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
}

/* ======================================================================== */
/* ACTIVITY TAB (matching reference video view-contact-segment-activity.webm)*/
/* ======================================================================== */
.vcs-act-layout {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  padding: 20px 24px 40px !important;
  align-items: stretch !important;
  min-height: min-content !important;
  width: 100% !important;
}

@media (max-width: 991px) {
  .vcs-act-layout {
    padding: 16px !important;
    gap: 16px !important;
  }
}

.vcs-act-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.vcs-act-subview {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.vcs-act-subview[hidden] {
  display: none !important;
}

.vcs-act-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Toolbar */
.vcs-act-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.vcs-act-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.vcs-act-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vcs-act-filter-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
}

.vcs-act-filter-btn {
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-sm, 6px);
  background: var(--surface);
  border: 1px solid var(--border-strong, #cbd5e1);
  color: var(--text);
  white-space: nowrap;
}

.vcs-act-filter-btn:hover {
  background: var(--surface-hover);
}

.vcs-act-filter-menu {
  max-height: 320px;
  overflow-y: auto;
  min-width: 200px;
}

/* User & Contact Search Dropdowns */
.vcs-act-user-menu,
.vcs-cm-contact-menu {
  min-width: 260px;
  padding: 0;
  overflow: hidden;
}

.vcs-act-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.vcs-act-search-box input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 13px;
  color: var(--text);
}

.vcs-act-user-list,
.vcs-cm-contact-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 0;
}

.vcs-act-user-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 6px 14px;
}

.vcs-user-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vcs-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.vcs-user-email {
  font-size: 11.5px;
  color: var(--text-muted);
}

.vcs-cm-load-more {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  text-align: center;
}

/* Clear filters button */
.vcs-act-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  height: 36px;
  align-self: flex-end;
  transition: color var(--fast, 0.15s) ease;
}

.vcs-act-clear-btn:hover {
  color: var(--brand);
}

.vcs-act-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* Activity Table Card */
.vcs-act-table-card {
  margin: 0 !important;
  width: 100%;
}

.vcs-act-table-card .vcs-table-wrap {
  min-height: 240px;
}

/* Empty State */
.vcs-act-empty {
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.vcs-empty-illustration {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.vcs-empty-svg {
  width: 88px;
  height: 88px;
}

.vcs-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
}

.vcs-empty-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  max-width: 360px;
}

/* Contact Memberships Specifics */
.vcs-cm-contact-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vcs-cm-contact-name {
  color: var(--brand, #0073ea);
  text-decoration: underline;
  font-weight: 500;
  cursor: pointer;
}

.vcs-cm-remove-btn {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.15s ease,
    visibility 0.15s ease;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-pill, 999px);
  border: 1px solid var(--border-strong, #cbd5e1);
  background: var(--surface, #ffffff);
  color: var(--text, #1e293b);
  cursor: pointer;
  white-space: nowrap;
}

.vcs-table tbody tr:hover .vcs-cm-remove-btn {
  opacity: 1;
  visibility: visible;
}

.vcs-cm-remove-btn:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}

.vcs-cm-badge-added {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #15803d;
  font-weight: 600;
  font-size: 13px;
}

.vcs-cm-added-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #15803d;
  color: #ffffff;
}

.vcs-cm-added-dot svg {
  width: 10px;
  height: 10px;
  stroke: #ffffff;
  stroke-width: 2.5;
}

/* Custom Date Inputs Wrap & Datepicker Component */
.vcs-cm-custom-date {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.vcs-cm-custom-date[hidden] {
  display: none !important;
}

.vcs-cm-custom-date .seq-dp {
  position: relative;
  display: inline-flex;
}

.vcs-cm-custom-date .seq-dp__inputs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  background: transparent;
  padding: 0;
  border: none;
}

.vcs-cm-custom-date .seq-dp__input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong, #cbd5e1);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface, #ffffff);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition:
    border-color var(--fast, 0.15s) var(--ease, ease),
    box-shadow var(--fast, 0.15s) var(--ease, ease);
}

.vcs-cm-custom-date .seq-dp__input:hover {
  border-color: var(--text-muted);
}

.vcs-cm-custom-date .seq-dp__input.is-active,
.vcs-cm-custom-date .seq-dp__input:focus-within {
  border-color: var(--brand, #2456e6);
  box-shadow: 0 0 0 1px var(--brand, #2456e6);
}

.vcs-cm-custom-date .seq-dp__input .icon,
.vcs-cm-custom-date .seq-dp__input svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.vcs-cm-custom-date .seq-dp__input input {
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  width: 86px;
  padding: 0 !important;
  height: auto !important;
  line-height: 1;
  box-shadow: none !important;
  cursor: pointer;
}

.vcs-cm-custom-date .cad-date-sep {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0 2px;
  white-space: nowrap;
}

.vcs-cm-custom-date .seq-dp__body {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1050;
  display: grid;
  grid-template-columns: 180px 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-lg, 0 10px 25px -5px rgba(0, 0, 0, 0.1));
  overflow: hidden;
  width: 460px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
}

.vcs-cm-custom-date .seq-dp__body[hidden] {
  display: none !important;
}

.vcs-cm-custom-date .seq-dp__presets {
  display: flex;
  flex-direction: column;
  max-height: 330px;
  overflow-y: auto;
  padding: 6px 0;
  border-right: 1px solid var(--border);
}

.vcs-cm-custom-date .seq-dp__preset {
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  padding: 9px 18px;
  cursor: pointer;
  transition:
    background var(--fast, 0.15s) var(--ease, ease),
    color var(--fast, 0.15s) var(--ease, ease);
}

.vcs-cm-custom-date .seq-dp__preset:hover,
.vcs-cm-custom-date .seq-dp__preset:focus-visible,
.vcs-cm-custom-date .seq-dp__preset.is-active {
  background: var(--surface-hover);
  outline: none;
}

.vcs-cm-custom-date .seq-dp__preset.is-active {
  color: var(--brand);
  font-weight: 600;
}

.vcs-cm-custom-date .seq-dp__cal {
  padding: 12px;
  box-sizing: border-box;
  min-width: 0;
}

.vcs-cm-custom-date .seq-dp__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14.5px;
  color: var(--text);
  font-weight: 700;
}

.vcs-cm-custom-date .seq-dp__nav {
  width: 28px;
  height: 28px;
  border: 0;
  background: none;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vcs-cm-custom-date .seq-dp__nav:hover,
.vcs-cm-custom-date .seq-dp__nav:focus-visible {
  background: var(--surface-hover);
  outline: none;
}

.vcs-cm-custom-date .seq-dp__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.vcs-cm-custom-date .seq-dp__wd {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 0;
}

.vcs-cm-custom-date .seq-dp__day {
  position: relative;
  height: 30px;
  border: 0;
  background: none;
  border-radius: var(--radius-sm, 6px);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  padding: 0;
}

.vcs-cm-custom-date .seq-dp__day:hover,
.vcs-cm-custom-date .seq-dp__day:focus-visible {
  background: var(--surface-hover);
  outline: none;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.vcs-cm-custom-date .seq-dp__day.is-out {
  color: var(--text-subtle, #94a3b8);
  font-weight: 500;
}

.vcs-cm-custom-date .seq-dp__day.is-range {
  background: var(--brand-soft, rgba(36, 86, 230, 0.1));
  border-radius: 0;
}

.vcs-cm-custom-date .seq-dp__day.is-sel {
  background: var(--brand, #2456e6);
  color: #ffffff;
}

.vcs-cm-custom-date .seq-dp__day.is-today:not(.is-sel) {
  color: var(--danger, #ef4444);
}

.vcs-cm-custom-date .seq-dp__day.is-today::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent, #f59e0b);
}

.vcs-cm-custom-date .seq-dp__clear {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill, 999px);
  background: var(--surface);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  box-sizing: border-box;
}

.vcs-cm-custom-date .seq-dp__clear:hover {
  background: var(--surface-hover);
}

/* Shimmer Skeleton */
.vcs-cm-skeleton {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vcs-cm-skeleton-row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 28px;
}

.vcs-cm-skeleton-bar {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--surface-2, #f1f5f9) 25%,
    var(--border, #e2e8f0) 50%,
    var(--surface-2, #f1f5f9) 75%
  );
  background-size: 200% 100%;
  animation: vcsSkeletonShimmer 1.4s infinite;
}

@keyframes vcsSkeletonShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ======================================================================== */
/* VERSION HISTORY SCREEN                                                   */
/* ======================================================================== */
.vcs-vh-view {
  background: var(--surface-bg, #f8fafc);
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.vcs-vh-view[hidden] {
  display: none !important;
}

.vcs-vh-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: var(--surface, #ffffff);
  border-bottom: 1px solid var(--border);
}

.vcs-vh-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background var(--fast, 0.15s) ease;
}

.vcs-vh-back-btn:hover {
  background: var(--surface-hover);
}

.vcs-vh-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.vcs-vh-body {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  flex: 1;
  align-items: start;
}

@media (max-width: 1024px) {
  .vcs-vh-body {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}

.vcs-vh-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vcs-vh-sidebar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.vcs-vh-sidebar-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 8px;
  line-height: 1.5;
}

.vcs-vh-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.vcs-vh-card.is-active {
  border-color: var(--border-strong);
}

.vcs-vh-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vcs-vh-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 5px solid var(--brand, #0073ea);
  background: #ffffff;
  display: inline-block;
}

.vcs-vh-ver-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.vcs-vh-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.vcs-vh-card-stats {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vcs-vh-badge-wrap {
  margin-top: 4px;
}

.vcs-vh-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-pill, 999px);
}

.vcs-vh-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .vcs-vh-panels {
    grid-template-columns: 1fr;
  }
}

.vcs-vh-panel {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  display: flex;
  flex-direction: column;
  min-height: 480px;
  overflow: hidden;
}

.vcs-vh-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  min-height: 56px;
}

.vcs-vh-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.vcs-vh-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vcs-vh-panel-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.vcs-vh-compare-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

/* ======================================================================== */
/* SETTINGS TAB (matching reference video view-contact-segment-activity.webm)*/
/* ======================================================================== */
.vcs-settings-layout {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  padding: 20px 24px 40px !important;
  align-items: stretch !important;
  min-height: min-content !important;
  width: 100% !important;
}

@media (max-width: 991px) {
  .vcs-settings-layout {
    padding: 16px !important;
    gap: 16px !important;
  }
}

.vcs-settings-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.vcs-settings-subview {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.vcs-settings-subview[hidden] {
  display: none !important;
}

/* Locked / No Access Card */
.vcs-settings-locked-card {
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
}

.vcs-locked-illustration {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.vcs-locked-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin: 0;
}

/* Settings Headings & Descriptions */
.vcs-settings-header-block {
  margin-bottom: 8px;
}

.vcs-settings-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.vcs-settings-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Notification List & Cards */
.vcs-settings-notif-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vcs-settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.vcs-settings-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
}

.vcs-settings-card__desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.vcs-settings-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.vcs-settings-card__foot-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

.vcs-toggle-btn {
  position: relative;
  display: inline-flex;
  flex: none;
  width: 44px;
  height: 24px;
  border-radius: var(--radius-pill, 999px);
  background: var(--border-strong, #cbd5e1);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color var(--fast, 0.15s) var(--ease, ease);
  user-select: none;
  outline: none;
  box-sizing: border-box;
}

.vcs-toggle-btn:hover {
  background: var(--text-muted, #94a3b8);
}

.vcs-toggle-btn:focus-visible {
  box-shadow: var(--focus-ring, 0 0 0 3px rgba(37, 99, 235, 0.25));
}

.vcs-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.15));
  transition: transform var(--fast, 0.15s) var(--ease, ease);
  border: none;
  flex-shrink: 0;
}

.vcs-toggle-text {
  display: none !important;
}

.vcs-toggle-btn.is-active,
.vcs-toggle-btn[aria-pressed="true"] {
  background: var(--brand, #2456e6) !important;
  border-color: transparent !important;
}

.vcs-toggle-btn.is-active .vcs-toggle-thumb,
.vcs-toggle-btn[aria-pressed="true"] .vcs-toggle-thumb {
  transform: translateX(20px);
  background: #ffffff;
  border-color: transparent;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.15));
}

.vcs-toggle-btn.is-active .vcs-toggle-text {
  display: none !important;
}

/* Card 3: Size reaches input row */
.vcs-settings-size-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.vcs-settings-size-input {
  width: 180px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm, 4px);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--fast, 0.15s) ease;
}

.vcs-settings-size-input:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 2px var(--brand-soft);
}

/* Card 4: Recipient Multi-Select Fields */
.vcs-settings-recipient-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.vcs-settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.vcs-settings-field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

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

.vcs-settings-select-box {
  min-height: 38px;
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm, 4px);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: 8px;
  transition: border-color var(--fast, 0.15s) ease;
}

.vcs-settings-select-box:hover {
  border-color: var(--text-muted);
}

.vcs-settings-placeholder {
  font-size: 13px;
  color: var(--text-subtle);
}

.vcs-settings-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.vcs-settings-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  background: var(--brand-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 4px);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
}

.vcs-settings-chip-remove {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  transition: color var(--fast, 0.15s) ease;
}

.vcs-settings-chip-remove:hover {
  color: var(--text);
}

.vcs-settings-add-me-wrap {
  margin-top: 4px;
}

#vcsAddMeBtn {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--fast, 0.15s) ease;
}

#vcsAddMeBtn:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

/* Checkbox Dropdown Menu */
.vcs-settings-check-menu {
  width: 100%;
  max-width: 420px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md, 8px);
  background: var(--surface);
  border: 1px solid var(--border);
}

.vcs-settings-menu-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.vcs-settings-menu-search input {
  width: 100%;
  border: 2px solid var(--brand);
  border-radius: var(--radius-pill, 999px);
  padding: 6px 32px 6px 14px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  outline: none;
}

.vcs-settings-menu-search .icon {
  position: absolute;
  right: 24px;
  color: var(--text-subtle);
  pointer-events: none;
}

.vcs-settings-check-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
  display: flex;
  flex-direction: column;
}

.vcs-settings-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background var(--fast, 0.15s) ease;
}

.vcs-settings-check-item:hover {
  background: var(--surface-hover);
}

.vcs-settings-check-item input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  accent-color: var(--brand);
  cursor: pointer;
}

.vcs-settings-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vcs-settings-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.vcs-settings-user-email {
  font-size: 12px;
  color: var(--text-muted);
}

/* Bottom Action Bar */
.vcs-settings-actions-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
  margin-top: 24px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}

/* Access Subview Styles matching reference */
.vcs-access-section {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.vcs-access-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.vcs-access-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}

.vcs-access-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.vcs-access-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  width: fit-content;
}

.vcs-access-option input[type="radio"] {
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}

.vcs-access-specific-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.vcs-access-specific-container[hidden] {
  display: none !important;
}

/* Sub-tabs: Performance, Activity, Settings & Access Teams/Users (matching settings-users.php .set-tabs--boxed) */
.set-tabs--boxed.vcs-subnav-tabs,
.set-tabs--boxed.vcs-access-tabs,
.vcs-subnav-tabs,
.vcs-access-tabs {
  display: flex !important;
  gap: 0 !important;
  border-bottom: 1px solid var(--border-strong, #cbd5e1) !important;
  margin-bottom: var(--sp-5, 20px) !important;
  overflow-x: auto;
  white-space: nowrap;
  width: 100%;
  padding: 0 !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.set-tabs--boxed.vcs-subnav-tabs::-webkit-scrollbar,
.set-tabs--boxed.vcs-access-tabs::-webkit-scrollbar,
.vcs-subnav-tabs::-webkit-scrollbar,
.vcs-access-tabs::-webkit-scrollbar {
  display: none;
}

.set-tabs--boxed.vcs-subnav-tabs .set-tab,
.set-tabs--boxed.vcs-subnav-tabs .vcs-perf-nav-btn,
.set-tabs--boxed.vcs-access-tabs .set-tab,
.vcs-access-tab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: auto !important;
  padding: 10px 22px !important;
  margin-bottom: -1px !important;
  border: 1px solid var(--border-strong, #cbd5e1) !important;
  border-left-width: 0 !important;
  border-bottom-width: 1px !important;
  background: var(--surface-2, #f8fafc) !important;
  color: var(--text-muted, #64748b) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  border-radius: 0 !important;
  transition:
    background var(--fast, 0.15s) ease,
    color var(--fast, 0.15s) ease !important;
  outline: none !important;
  user-select: none !important;
}

.set-tabs--boxed.vcs-subnav-tabs .set-tab:first-child,
.set-tabs--boxed.vcs-subnav-tabs .vcs-perf-nav-btn:first-child,
.set-tabs--boxed.vcs-access-tabs .set-tab:first-child,
.vcs-access-tab:first-child {
  border-left-width: 1px !important;
  border-top-left-radius: var(--radius-sm, 6px) !important;
}

.set-tabs--boxed.vcs-subnav-tabs .set-tab:last-child,
.set-tabs--boxed.vcs-subnav-tabs .vcs-perf-nav-btn:last-child,
.set-tabs--boxed.vcs-access-tabs .set-tab:last-child,
.vcs-access-tab:last-child {
  border-top-right-radius: var(--radius-sm, 6px) !important;
}

.set-tabs--boxed.vcs-subnav-tabs .set-tab:hover:not(.active):not(.is-active),
.set-tabs--boxed.vcs-subnav-tabs .vcs-perf-nav-btn:hover:not(.active):not(.is-active),
.set-tabs--boxed.vcs-access-tabs .set-tab:hover:not(.active):not(.is-active),
.vcs-access-tab:hover:not(.active):not(.is-active) {
  background: var(--surface-hover, #f1f5f9) !important;
  color: var(--text, #1e293b) !important;
}

.set-tabs--boxed.vcs-subnav-tabs .set-tab.active,
.set-tabs--boxed.vcs-subnav-tabs .set-tab.is-active,
.set-tabs--boxed.vcs-subnav-tabs .vcs-perf-nav-btn.is-active,
.set-tabs--boxed.vcs-subnav-tabs .vcs-perf-nav-btn.active,
.set-tabs--boxed.vcs-access-tabs .set-tab.active,
.set-tabs--boxed.vcs-access-tabs .set-tab.is-active,
.vcs-access-tab.is-active,
.vcs-access-tab.active {
  background: var(--surface, #ffffff) !important;
  color: var(--text, #1e293b) !important;
  border-bottom-color: var(--surface, #ffffff) !important;
  font-weight: 600 !important;
  z-index: 1 !important;
}

[data-theme="dark"] .set-tabs--boxed.vcs-subnav-tabs .set-tab,
[data-theme="dark"] .set-tabs--boxed.vcs-subnav-tabs .vcs-perf-nav-btn,
[data-theme="dark"] .set-tabs--boxed.vcs-access-tabs .set-tab,
[data-theme="dark"] .vcs-access-tab {
  background: var(--surface-2, #1e293b) !important;
  border-color: var(--border, #334155) !important;
  color: var(--text-muted, #94a3b8) !important;
}

[data-theme="dark"] .set-tabs--boxed.vcs-subnav-tabs .set-tab.active,
[data-theme="dark"] .set-tabs--boxed.vcs-subnav-tabs .set-tab.is-active,
[data-theme="dark"] .set-tabs--boxed.vcs-subnav-tabs .vcs-perf-nav-btn.is-active,
[data-theme="dark"] .set-tabs--boxed.vcs-access-tabs .set-tab.active,
[data-theme="dark"] .set-tabs--boxed.vcs-access-tabs .set-tab.is-active {
  background: var(--surface, #0f172a) !important;
  border-bottom-color: var(--surface, #0f172a) !important;
  color: #ffffff !important;
}

.set-tabs--boxed.vcs-subnav-tabs .set-tab:focus-visible,
.set-tabs--boxed.vcs-subnav-tabs .vcs-perf-nav-btn:focus-visible,
.set-tabs--boxed.vcs-access-tabs .set-tab:focus-visible,
.vcs-access-tab:focus-visible {
  outline: none !important;
  box-shadow: var(--focus-ring, 0 0 0 3px rgba(37, 99, 235, 0.25)) !important;
}

@media (max-width: 640px) {
  .set-tabs--boxed.vcs-subnav-tabs .set-tab,
  .set-tabs--boxed.vcs-subnav-tabs .vcs-perf-nav-btn,
  .set-tabs--boxed.vcs-access-tabs .set-tab,
  .vcs-access-tab {
    padding: 8px 14px !important;
    font-size: 13px !important;
  }
}

.vcs-access-panel[hidden] {
  display: none !important;
}

/* Toolbar & Search */
.vcs-access-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.vcs-access-toolbar--end {
  justify-content: flex-end;
}

.vcs-access-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.vcs-access-filter-btn:hover {
  background: var(--surface-hover);
}

.vcs-access-filter-menu {
  min-width: 260px;
  max-width: 320px;
}

.vcs-access-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 240px;
  max-width: 100%;
}

.vcs-access-search input {
  width: 100%;
  height: 34px;
  padding: 6px 34px 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.vcs-access-search input:focus {
  outline: none;
  border-color: var(--brand);
}

.vcs-access-search .icon {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Access Table */
.vcs-access-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  overflow-x: auto;
}

.vcs-access-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.vcs-access-table th {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.vcs-access-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.vcs-access-table tbody tr:last-child td {
  border-bottom: none;
}

.vcs-access-table tbody tr:hover {
  background: var(--surface-hover);
}

.vcs-access-th-check,
.vcs-access-td-check {
  width: 44px;
  padding-right: 0 !important;
  text-align: center;
}

.vcs-access-th-check input[type="checkbox"],
.vcs-access-td-check input[type="checkbox"] {
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
}

/* Access Table Bulk Actions Header Row (matching screenshot) */
.vcs-access-th-bulk[hidden] {
  display: none !important;
}

.vcs-access-th-bulk-col {
  padding: 8px 16px !important;
  vertical-align: middle;
  text-align: left;
}

.vcs-access-bulk-wrap {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.vcs-access-selected-count {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

.vcs-access-bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm, 4px);
  padding: 4px 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all var(--fast, 0.15s) ease;
}

.vcs-access-bulk-btn:hover,
.vcs-access-bulk-btn[aria-expanded="true"] {
  background: var(--surface-hover);
  color: var(--brand, #2456e6);
}

.vcs-access-bulk-btn svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: currentColor;
}

.vcs-access-th-action,
.vcs-access-td-action {
  text-align: right !important;
  width: 150px;
}

.vcs-access-team-cell,
.vcs-access-user-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vcs-access-team-title,
.vcs-access-user-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
}

.vcs-access-subtext {
  font-size: 12px;
  color: var(--text-muted);
}

.vcs-access-level-dropdown {
  display: inline-block;
  text-align: right;
}

.vcs-access-level-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm, 4px);
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.vcs-access-level-btn:hover,
.vcs-access-level-btn[aria-expanded="true"] {
  background: var(--surface-2);
  border-color: var(--border);
}

.vcs-access-pager {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-md, 8px) var(--radius-md, 8px);
}

@media (max-width: 768px) {
  .vcs-access-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .vcs-access-search {
    width: 100%;
    max-width: none;
  }
}

[data-theme="dark"] .vcs-locked-svg path[fill="#fef3c7"] {
  fill: rgba(245, 158, 11, 0.2);
}

/* Use in Dropdown Items (matching screenshot 1) */
.vcs-usein-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px;
  text-decoration: none;
  color: var(--text);
}

.vcs-usein-item__left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vcs-usein-item svg {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--fast, 0.12s) ease;
}

.vcs-usein-item:hover svg {
  color: var(--text);
}

/* Modals: Share & Resync (matching screenshot 3 & 4) */
.vcs-share-modal,
.vcs-resync-modal {
  width: min(500px, 100%);
}

.vcs-modal-btn-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

/* ---------------------------------------------------------------- Drawer & Modal Enhancements (Reference Flow) */
.vcs-edit-modal-ov[hidden],
:where(.vcs-page) .lp-modal-ov[hidden]{
  display: none !important;
}

:where(.vcs-page) .lp-modal-ov:not([hidden]){
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.lp-modal-ov.vcs-edit-modal-ov,
:where(.vcs-page) .lp-modal-ov{
  z-index: 10080 !important;
}

#vcsEventSideDrawer {
  z-index: 10045 !important;
}

:where(.vcs-page) .rt-dov{
  z-index: 10060 !important;
}

/* Floating Picker Menu (.lp-ce-pick standard CRM style) */
.vcs-floating-picker {
  position: fixed !important;
  z-index: 10090 !important;
  width: 270px !important;
  max-width: calc(100vw - 20px) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 8px !important;
  background: var(--surface) !important;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.18) !important;
  overflow: hidden;
  padding: 6px !important;
}

.vcs-leadstatus-compact-menu {
  width: 220px !important;
  max-width: 220px !important;
  z-index: 10090 !important;
}

:where(.vcs-page) .lp-pv__field[data-field="email"] .lp-pv__val,
:where(.vcs-page) .lp-pv__field[data-field="phone"] .lp-pv__val,
:where(.vcs-page) .lp-pv__field[data-field="owner"] .lp-pv__val,
:where(.vcs-page) .lp-pv__field[data-field="leadStatus"] .lp-pv__val,
:where(.vcs-page) .lp-pv__field[data-field="lifecycle"] .lp-pv__val{
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease;
}

:where(.vcs-page) .lp-pv__field[data-field="email"]:hover .lp-pv__val,
:where(.vcs-page) .lp-pv__field[data-field="phone"]:hover .lp-pv__val,
:where(.vcs-page) .lp-pv__field[data-field="owner"]:hover .lp-pv__val,
:where(.vcs-page) .lp-pv__field[data-field="leadStatus"]:hover .lp-pv__val,
:where(.vcs-page) .lp-pv__field[data-field="lifecycle"]:hover .lp-pv__val{
  color: var(--brand);
  background: var(--surface-hover);
}

/* Edit Phone Modal elements (.lp-ce-ph) */
:where(.vcs-page) .lp-ce-ph__box{
  position: relative;
}

:where(.vcs-page) .lp-ce-ph__list{
  position: absolute;
  top: 56px;
  left: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.16);
}

:where(.vcs-page) .lp-ce-ph__list[hidden]{
  display: none !important;
}

:where(.vcs-page) .lp-ce-ph__opts{
  max-height: 180px;
  overflow-y: auto;
}

.vcs-event-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--surface);
  transition: border-color var(--fast, 0.15s) ease, box-shadow var(--fast, 0.15s) ease;
}

.vcs-event-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}


/* SEG2a: the contact drawer steps behind an open CrmModal (its property history, z-index 1050,
   modal.css:15), as list-audit.css does for the Contacts and Companies previews. */
html:has(.modal-backdrop.is-open) #vcsSideDrawer,
html:has(.modal-backdrop.is-open) .lp-side-ov:has(+ #vcsSideDrawer) {
  z-index: 1040;
}

/* QA #624 Settings › Auto-convert to static: the design's folder-origin panel
   (view-contact-segment.css `.vcs-auto-convert-*`, ?v=1795073278). Its mode menu is the app's
   `.dropdown__menu`, and the date the browser's date input. */
.vcs-auto-convert-panel .vcs-settings-title {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 500;
  color: var(--text);
}
.vcs-auto-convert-description {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
}
.vcs-auto-convert-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text);
  font-size: 16px;
}
.vcs-auto-convert-select-wrap { position: relative; }
.vcs-auto-convert-select {
  height: 54px;
  min-width: 245px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.vcs-auto-convert-select svg { width: 16px; height: 16px; flex: 0 0 auto; }
.vcs-auto-convert-menu.dropdown__menu {
  left: 0;
  right: auto;
  min-width: 100%;
  transform-origin: top left;
}
.vcs-auto-convert-date-wrap,
.vcs-auto-convert-inactivity {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.vcs-auto-convert-date-field {
  height: 54px;
  width: 318px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
}
.vcs-auto-convert-date-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  color-scheme: inherit;
  cursor: pointer;
}
.vcs-auto-convert-info {
  color: var(--text-muted);
  font-size: 18px;
  cursor: help;
}
.vcs-auto-convert-inactivity > input {
  width: 98px;
  height: 54px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.vcs-auto-convert-saved {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}
@media (max-width: 767px) {
  .vcs-auto-convert-row { align-items: flex-start; flex-direction: column; }
  .vcs-auto-convert-date-wrap,
  .vcs-auto-convert-inactivity { flex-wrap: wrap; }
  .vcs-auto-convert-date-field { width: min(318px, calc(100vw - 48px)); }
}

/* S-08 (SG-2): a segment whose members are being worked out again: banner and table spinner. */
.vcs-processing-alert {
  flex: 0 0 auto;
  margin: 12px 20px 0;
}
.vcs-processing-alert .vcs-processing-alert__close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0 2px;
}
.vcs-processing-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
.vcs-filter-pane__edit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* S-04 (SG-3): Add contacts. The search results open over the dialog's edge, not clipped by it. */
#vcsAddContactsModal .lp-modal,
#vcsAddContactsModal .lp-modal__body {
  overflow: visible;
}
#vcsAddContactsModal .lp-modal {
  width: min(520px, calc(100vw - 32px));
}
