.crm-deals-page .crm-pipeline {
  height: calc(100vh - 395px);
}

/* ==========================================================================
   FILTER ITEM - Quick filter dropdown items with info icon
   ========================================================================== */
.filter-item {
  display: flex;
  align-items: center;
  border-radius: 7px;
  position: relative;
  transition: background-color var(--fast) var(--ease);
}

.filter-item:hover {
  background: var(--surface-hover);
}

.filter-item .dropdown__item {
  flex: 1;
  min-width: 0;
}

.filter-item .dropdown__item:hover {
  background: transparent;
}


.crm-activity-search{width: 100%;flex: auto;}
.crm-activity-search svg{left: 16px;}

.crm-activity-search input{padding:0 42px 0 42px}
.crm-activity-expand{min-width: max-content}

/* Info icon - hidden by default, visible on row hover */
.filter-item__info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  color: var(--text-subtle);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--fast) var(--ease),
    visibility var(--fast) var(--ease),
    color var(--fast) var(--ease),
    background-color var(--fast) var(--ease);
  margin-right: 4px;
}

.filter-item:hover .filter-item__info {
  opacity: 1;
  visibility: visible;
}

.filter-item__info:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

/* Active / highlighted state when popover is open */
.filter-item.is-info-active {
  background: var(--accent-soft);
}

.filter-item.is-info-active .filter-item__info {
  opacity: 1;
  visibility: visible;
  color: var(--brand);
}

/* ==========================================================================
   FILTER INFO POPOVER
   ========================================================================== */
.filter-info-popover {
  position: fixed;
  z-index: 10001;
  width: 320px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateX(4px);
  transition:
    opacity var(--fast) var(--ease),
    visibility var(--fast) var(--ease),
    transform var(--fast) var(--ease);
  pointer-events: none;
}

.filter-info-popover::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 18px;
  width: 10px;
  height: 10px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}

.filter-info-popover.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.filter-info-popover__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.filter-info-popover__desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.filter-info-popover__divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

.filter-info-popover__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.filter-info-popover__row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.filter-info-popover__key {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.filter-info-popover__value {
  font-weight: 400;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-info-popover__value .icon {
  color: var(--text-subtle);
}

.filter-info-popover__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-ink);
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}

.filter-info-popover__link:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .filter-info-popover {
    width: min(280px, calc(100vw - 32px));
  }
}

/* Column Add Deal Button - visible when hovering over column */
.crm-pipeline__column .crm-pipeline__column-add-deal {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--fast) var(--ease),
    visibility var(--fast) var(--ease);
}

.crm-pipeline__column:hover .crm-pipeline__column-add-deal {
  opacity: 1;
  visibility: visible;
}

.crm-pointer-events-none {
  pointer-events: none;
}

label.dropdown__item {
  cursor: pointer;
  user-select: none;
}

.crm-pipeline__card,
[data-draggable-item],
.tab {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.crm-pipeline__deal-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition:
    color var(--fast) var(--ease),
    text-decoration var(--fast) var(--ease);
}

.crm-pipeline__deal-link:hover,
.hover-underline:hover {
  text-decoration: underline !important;
  color: var(--brand) !important;
}

/* ==========================================================================
   DEAL DETAILS PAGE STYLES (NO INLINE CSS)
   ========================================================================== */

/* ==========================================================================
   DEAL DETAILS PAGE STYLES & TABS DESIGN SYSTEM
   ========================================================================== */

/* ==========================================================================
   DEAL DETAILS PAGE TABS DESIGN SYSTEM (EXACT SETTINGS-PROFILE MATCH)
   ========================================================================== */

.crm-deal-stage-bar,
.crm-activity-tabs,
.set-tabs {
  display: flex !important;
  align-items: center !important;
  gap: 24px;
  padding: 0 20px !important;
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  scrollbar-width:thin !important;
  -ms-overflow-style: none !important;
  user-select: none;
  min-width: auto;
}

.crm-deal-stage-bar::-webkit-scrollbar,
.crm-activity-tabs::-webkit-scrollbar,
.set-tabs::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* TAB ITEM BASE (FOR BOTH STAGE BAR & ACTIVITY TABS) */
.crm-deal-stage-bar .crm-activity-filter,
.crm-activity-tab,
.set-tab {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px 4px !important;
  font-family: inherit !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  color: var(--text-muted) !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  margin-bottom: -1px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: color var(--fast, 0.15s) ease !important;
  flex-shrink: 0 !important;
}
.set-tab {
  min-width: auto;
  padding: 12px 16px !important;
}

.crm-deal-stage-bar {
  min-width: auto;
}
.crm-deal-stage-bar .crm-activity-filter:hover,
.crm-activity-tab:hover,
.set-tab:hover {
  color: var(--text) !important;
  background: transparent !important;
}

/* ACTIVE STATE FOR ALL TABS (MATCHES SETTINGS-PROFILE ACTIVE TAB) */
.crm-deal-stage-bar .crm-activity-filter.active,
.crm-deal-stage-bar .crm-activity-filter.is-active,
.crm-deal-stage-bar .crm-activity-filter.is-stage-active,
.crm-activity-tab.active,
.crm-activity-tab.is-active,
.set-tab.active,
.set-tab.is-active {
  color: var(--brand) !important;
  font-weight: 600 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.crm-deal-stage-bar .crm-activity-filter.active::after,
.crm-deal-stage-bar .crm-activity-filter.is-active::after,
.crm-deal-stage-bar .crm-activity-filter.is-stage-active::after,
.crm-activity-tab.active::after,
.crm-activity-tab.is-active::after,
.set-tab.active::after,
.set-tab.is-active::after {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 3px !important;
  background: var(--brand) !important;
  border-radius: 3px 3px 0 0 !important;
  z-index: 10 !important;
}

/* ACTIVITY CARD EXPAND / COLLAPSE */
.crm-activity-card__top {
  cursor: pointer;
  user-select: none;
}

.crm-activity-card.is-collapsed .crm-activity-card__description {
  display: none !important;
}

.crm-activity-card.is-collapsed .crm-activity-card__chevron {
  transform: rotate(-90deg);
}

/* STAGE WARNING ALERT BANNER STYLING */
.crm-deal-warning-wrapper {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
}

.crm-deal-warning-alert {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(230, 140, 0, 0.08);
  border: 1px solid rgba(230, 140, 0, 0.25);
  color: var(--text);
  border-radius: var(--radius-md, 8px);
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.4;
}
.crm-contact-profile__name{font-weight: 600!important}

.crm-deal-warning-icon {
  width: 18px;
  height: 18px;
  stroke: #d97706;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.crm-deal-profile-designation {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 6px;
}

.crm-deal-profile-close {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.crm-deal-profile-close-date {
  color: var(--danger);
  font-weight: 600;
}

.crm-deal-quick-actions {
  margin-top: 20px;
}

.crm-deal-contact-logo {
  background: var(--surface-2);
  color: var(--text-dark);
  font-weight: 700;
}

.crm-deal-brand-link {
  font-weight: 700;
  color: var(--brand);
}

.crm-deal-line-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.crm-deal-line-item-label {
  font-size: 13px;
}

.crm-deal-line-item-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.crm-deal-line-item-divider {
  border-top: 1px solid var(--border);
  margin: 10px 0;
}

.crm-deal-total-label {
  font-size: 14px;
  color: var(--text-dark);
}

.crm-deal-total-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
}

.crm-deal-quote-title {
  font-weight: 700;
  color: var(--brand);
  font-size: 14px;
}

.crm-deal-quote-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}


/* =========================================================
   DEAL QUICK ACTIONS - EXACT COMPANY DETAILS UI
   Popup behavior remains Deal-specific.
   ========================================================= */
.crm-deal-quick-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 16px 0 !important;
  padding: 0 20px !important;
  overflow: visible !important;
}

.crm-deal-quick-actions > .company-quick-action {
  min-width: 40px !important;
  min-height: 40px !important;
  height: 40px !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  background: var(--surface) !important;
  color: var(--text-muted) !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  cursor: pointer;
}

.crm-deal-quick-actions > .company-quick-action span {
  display: none !important;
}

.crm-deal-quick-actions > .company-quick-action .icon {
  width: 18px !important;
  height: 18px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  color: currentColor !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.crm-deal-quick-actions > .company-quick-action:hover,
.crm-deal-quick-actions > .company-quick-action:focus-visible {
  background: var(--surface-hover) !important;
  border-color: var(--border-strong) !important;
  color: var(--text) !important;
  outline: 0;
}

@media (max-width: 1200px) {
  .crm-deal-quick-actions{width: fit-content!important;}
  
}

@media (max-width: 575.98px) {
  .crm-deal-quick-actions {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 5px !important;
    padding: 0 12px !important;
  }

  .crm-deal-quick-actions > .company-quick-action {
    min-height: 40px !important;
    height: 40px !important;
  }
}

/* =========================================================
   DEAL TABS - MATCH COMPANY DETAILS EXACTLY
   Font, weight, color, sizing and active underline.
   ========================================================= */

.crm-deal-stage-bar,
.crm-activity-tabs,
.crm-deal-stage-bar.set-tabs,
.crm-activity-tabs.set-tabs {
  gap: 0 !important;
  padding: 0 6px !important;
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
}

.crm-deal-stage-bar .crm-activity-filter,
.crm-activity-tabs .crm-activity-tab,
.crm-activity-tabs .set-tab {
  position: relative !important;
  flex: 0 0 auto !important;
/*  min-width: 112px !important;*/
  height: 60px !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--text-muted) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: color var(--fast, 0.15s) ease !important;
}

.crm-deal-stage-bar .crm-activity-filter:hover,
.crm-activity-tabs .crm-activity-tab:hover,
.crm-activity-tabs .set-tab:hover {
  color: var(--text) !important;
  background: transparent !important;
}

.crm-deal-stage-bar .crm-activity-filter.active,
.crm-deal-stage-bar .crm-activity-filter.is-active,
.crm-deal-stage-bar .crm-activity-filter.is-stage-active,
.crm-activity-tabs .crm-activity-tab.active,
.crm-activity-tabs .crm-activity-tab.is-active,
.crm-activity-tabs .set-tab.active,
.crm-activity-tabs .set-tab.is-active {
  color: var(--text) !important;
  font-weight: 600 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.crm-deal-stage-bar .crm-activity-filter.active::after,
.crm-deal-stage-bar .crm-activity-filter.is-active::after,
.crm-deal-stage-bar .crm-activity-filter.is-stage-active::after,
.crm-activity-tabs .crm-activity-tab.active::after,
.crm-activity-tabs .crm-activity-tab.is-active::after,
.crm-activity-tabs .set-tab.active::after,
.crm-activity-tabs .set-tab.is-active::after {
  content: "" !important;
  position: absolute !important;
  left: 6px !important;
  right: 6px !important;
  bottom: 0 !important;
  height:3px !important;
  border-radius: 0 !important;
  background:var(--brand)!important;
}
