/* ========================================
   ADMIN AI WORKSPACE
   AI PIPELINE LEAD LIST
======================================== */

/* ========================================
   PIPELINE PAGE WIDTH
======================================== */

#workspaceMain:has(
  .ai-pipeline-lead-card
) {
  max-width:
    1720px;
}

#workspaceMain:has(
  .ai-pipeline-lead-card
)
.dashboard-page {
  gap:
    22px;
}

#workspaceMain:has(
  .ai-pipeline-lead-card
)
.dashboard-header {
  align-items:
    center;
  margin-bottom:
    0;
  padding:
    4px 0 10px;
}

#workspaceMain:has(
  .ai-pipeline-lead-card
)
.dashboard-header > div:first-child {
  display:
    grid;
  gap:
    7px;
}

#workspaceMain:has(
  .ai-pipeline-lead-card
)
.dashboard-header h1 {
  font-size:
    clamp(
      2rem,
      3vw,
      3.4rem
    );
  letter-spacing:
    -0.055em;
}

#workspaceMain:has(
  .ai-pipeline-lead-card
)
.dashboard-header p {
  margin:
    0;
  color:
    rgba(
      203,
      213,
      225,
      0.72
    );
}


/* ========================================
   PIPELINE SEARCH
======================================== */

#workspaceMain:has(
  .ai-pipeline-lead-card
)
.search-input {
  width:
    min(
      100%,
      680px
    );
  min-width:
    320px;
  min-height:
    48px;
  padding:
    12px 16px;
  border-radius:
    17px;
  background:
    rgba(
      15,
      23,
      42,
      0.3
    );
  border-color:
    rgba(
      148,
      163,
      184,
      0.18
    );
  box-shadow:
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.04
    );
}


/* ========================================
   PIPELINE GRID
======================================== */

#workspaceMain
.lead-list:has(
  .ai-pipeline-lead-card
) {
  display:
    grid;
  grid-template-columns:
    repeat(
      3,
      minmax(
        0,
        1fr
      )
    );
  align-items:
    stretch;
  gap:
    16px;
  width:
    100%;
}


/* ========================================
   LEAD CARD BASE
======================================== */

.ai-pipeline-lead-card {
  position:
    relative;
  display:
    flex;
  flex-direction:
    column;
  gap:
    15px;
  min-width:
    0;
  min-height:
    390px;
  padding:
    20px;
  overflow:
    hidden;
  border-radius:
    24px;
  color:
    #f8fafc;
  background:
    radial-gradient(
      circle at top left,
      rgba(
        59,
        130,
        246,
        0.16
      ),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      rgba(
        51,
        65,
        85,
        0.9
      ),
      rgba(
        15,
        23,
        42,
        0.88
      )
    );
  border:
    1px solid
    rgba(
      148,
      163,
      184,
      0.18
    );
  box-shadow:
    0 20px 54px
    rgba(
      0,
      0,
      0,
      0.22
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.05
    );
  cursor:
    pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.ai-pipeline-lead-card::before {
  content:
    "";
  position:
    absolute;
  inset:
    0;
  border-left:
    4px solid
    rgba(
      59,
      130,
      246,
      0.85
    );
  pointer-events:
    none;
}

.ai-pipeline-lead-card::after {
  content:
    "";
  position:
    absolute;
  right:
    -60px;
  bottom:
    -70px;
  width:
    180px;
  height:
    180px;
  border-radius:
    999px;
  background:
    rgba(
      59,
      130,
      246,
      0.1
    );
  filter:
    blur(
      5px
    );
  pointer-events:
    none;
}

.ai-pipeline-lead-card > * {
  position:
    relative;
  z-index:
    1;
}

.ai-pipeline-lead-card:hover {
  transform:
    translateY(
      -4px
    );
  border-color:
    rgba(
      96,
      165,
      250,
      0.48
    );
  box-shadow:
    0 28px 72px
    rgba(
      0,
      0,
      0,
      0.32
    ),
    0 0 0 1px
    rgba(
      59,
      130,
      246,
      0.12
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.07
    );
}

.ai-pipeline-lead-card.active {
  border-color:
    rgba(
      96,
      165,
      250,
      0.72
    );
  box-shadow:
    0 0 0 2px
    rgba(
      59,
      130,
      246,
      0.2
    ),
    0 28px 72px
    rgba(
      0,
      0,
      0,
      0.34
    );
}

.ai-pipeline-lead-card:focus-visible {
  outline:
    none;
  border-color:
    rgba(
      147,
      197,
      253,
      0.86
    );
  box-shadow:
    0 0 0 4px
    rgba(
      59,
      130,
      246,
      0.2
    ),
    0 24px 60px
    rgba(
      0,
      0,
      0,
      0.28
    );
}


/* ========================================
   CARD HEADER
======================================== */

.ai-lead-card-header {
  display:
    flex;
  align-items:
    flex-start;
  justify-content:
    space-between;
  gap:
    14px;
  min-width:
    0;
  padding-bottom:
    14px;
  border-bottom:
    1px solid
    rgba(
      148,
      163,
      184,
      0.14
    );
}

.ai-lead-card-company {
  display:
    grid;
  gap:
    8px;
  min-width:
    0;
}

.ai-lead-card-title-row {
  display:
    flex;
  align-items:
    center;
  flex-wrap:
    wrap;
  gap:
    8px;
  min-width:
    0;
}

.ai-lead-card-title-row h3 {
  min-width:
    0;
  margin:
    0;
  overflow:
    hidden;
  color:
    #ffffff;
  font-size:
    18px;
  font-weight:
    900;
  line-height:
    1.25;
  letter-spacing:
    -0.035em;
  text-overflow:
    ellipsis;
  white-space:
    nowrap;
}

.ai-lead-priority {
  flex-shrink:
    0;
  padding:
    5px 8px;
  border-radius:
    999px;
  color:
    #fed7aa;
  background:
    rgba(
      249,
      115,
      22,
      0.16
    );
  border:
    1px solid
    rgba(
      251,
      146,
      60,
      0.24
    );
  font-size:
    10px;
  font-weight:
    900;
  line-height:
    1;
  text-transform:
    uppercase;
  letter-spacing:
    0.05em;
}

.ai-lead-card-contact {
  display:
    flex;
  align-items:
    baseline;
  flex-wrap:
    wrap;
  gap:
    6px;
  min-width:
    0;
}

.ai-lead-card-contact strong {
  overflow:
    hidden;
  color:
    rgba(
      241,
      245,
      249,
      0.92
    );
  font-size:
    13px;
  text-overflow:
    ellipsis;
  white-space:
    nowrap;
}

.ai-lead-card-contact span {
  overflow:
    hidden;
  color:
    rgba(
      148,
      163,
      184,
      0.88
    );
  font-size:
    12px;
  text-overflow:
    ellipsis;
  white-space:
    nowrap;
}

.ai-pipeline-lead-card
.lead-stage-pill {
  flex-shrink:
    0;
  padding:
    7px 10px;
  border-radius:
    999px;
  color:
    #dbeafe;
  background:
    rgba(
      59,
      130,
      246,
      0.18
    );
  border:
    1px solid
    rgba(
      96,
      165,
      250,
      0.24
    );
  font-size:
    11px;
  font-weight:
    900;
  line-height:
    1;
  white-space:
    nowrap;
}


/* ========================================
   CONTACT INFORMATION
======================================== */

.ai-lead-card-contact-grid {
  display:
    grid;
  grid-template-columns:
    repeat(
      2,
      minmax(
        0,
        1fr
      )
    );
  gap:
    9px;
}

.ai-lead-contact-item {
  display:
    grid;
  gap:
    5px;
  min-width:
    0;
  padding:
    10px 11px;
  border-radius:
    14px;
  background:
    rgba(
      15,
      23,
      42,
      0.26
    );
  border:
    1px solid
    rgba(
      148,
      163,
      184,
      0.11
    );
}

.ai-lead-contact-item span {
  color:
    rgba(
      148,
      163,
      184,
      0.82
    );
  font-size:
    9px;
  font-weight:
    900;
  text-transform:
    uppercase;
  letter-spacing:
    0.065em;
}

.ai-lead-contact-item strong {
  min-width:
    0;
  overflow:
    hidden;
  color:
    rgba(
      241,
      245,
      249,
      0.9
    );
  font-size:
    12px;
  font-weight:
    750;
  line-height:
    1.35;
  text-overflow:
    ellipsis;
  white-space:
    nowrap;
}

.ai-lead-contact-item:nth-child(3) {
  grid-column:
    1 / -1;
}


/* ========================================
   AI WORKFLOW STATUS
======================================== */

.ai-lead-card-status-grid {
  display:
    grid;
  grid-template-columns:
    repeat(
      2,
      minmax(
        0,
        1fr
      )
    );
  gap:
    9px;
}

.ai-lead-status-item {
  display:
    grid;
  align-content:
    start;
  gap:
    6px;
  min-width:
    0;
  min-height:
    62px;
  padding:
    10px 11px;
  border-radius:
    14px;
  background:
    rgba(
      255,
      255,
      255,
      0.045
    );
  border:
    1px solid
    rgba(
      255,
      255,
      255,
      0.08
    );
}

.ai-lead-status-item span {
  color:
    rgba(
      148,
      163,
      184,
      0.8
    );
  font-size:
    9px;
  font-weight:
    900;
  line-height:
    1;
  text-transform:
    uppercase;
  letter-spacing:
    0.065em;
}

.ai-lead-status-item strong {
  min-width:
    0;
  overflow:
    hidden;
  color:
    #f8fafc;
  font-size:
    12px;
  font-weight:
    850;
  line-height:
    1.3;
  text-overflow:
    ellipsis;
  white-space:
    nowrap;
}

.ai-lead-status-item.is-ready {
  border-color:
    rgba(
      34,
      197,
      94,
      0.22
    );
  background:
    rgba(
      34,
      197,
      94,
      0.09
    );
}

.ai-lead-status-item.is-ready strong {
  color:
    #bbf7d0;
}

.ai-lead-status-item.is-pending {
  border-color:
    rgba(
      250,
      204,
      21,
      0.2
    );
  background:
    rgba(
      250,
      204,
      21,
      0.07
    );
}

.ai-lead-status-item.is-pending strong {
  color:
    #fef08a;
}

.ai-lead-status-item.outreach-draft {
  border-color:
    rgba(
      59,
      130,
      246,
      0.26
    );
  background:
    rgba(
      59,
      130,
      246,
      0.1
    );
}

.ai-lead-status-item.outreach-draft strong {
  color:
    #bfdbfe;
}

.ai-lead-status-item.outreach-approved {
  border-color:
    rgba(
      168,
      85,
      247,
      0.3
    );
  background:
    rgba(
      168,
      85,
      247,
      0.1
    );
}

.ai-lead-status-item.outreach-approved strong {
  color:
    #e9d5ff;
}

.ai-lead-status-item.outreach-sent {
  border-color:
    rgba(
      16,
      185,
      129,
      0.28
    );
  background:
    rgba(
      16,
      185,
      129,
      0.1
    );
}

.ai-lead-status-item.outreach-sent strong {
  color:
    #a7f3d0;
}

.ai-lead-status-item.outreach-empty strong {
  color:
    rgba(
      203,
      213,
      225,
      0.72
    );
}


/* ========================================
   NEXT ACTION
======================================== */

.ai-lead-next-action {
  display:
    grid;
  gap:
    5px;
  margin-top:
    auto;
  padding:
    13px 14px;
  border-radius:
    16px;
  background:
    linear-gradient(
      135deg,
      rgba(
        37,
        99,
        235,
        0.18
      ),
      rgba(
        15,
        23,
        42,
        0.22
      )
    );
  border:
    1px solid
    rgba(
      96,
      165,
      250,
      0.2
    );
}

.ai-lead-next-action span {
  color:
    rgba(
      147,
      197,
      253,
      0.82
    );
  font-size:
    9px;
  font-weight:
    950;
  line-height:
    1;
  text-transform:
    uppercase;
  letter-spacing:
    0.07em;
}

.ai-lead-next-action strong {
  overflow:
    hidden;
  color:
    #ffffff;
  font-size:
    13px;
  font-weight:
    900;
  line-height:
    1.35;
  text-overflow:
    ellipsis;
  white-space:
    nowrap;
}


/* ========================================
   FOOTER
======================================== */

.ai-lead-card-footer {
  display:
    flex;
  align-items:
    center;
  justify-content:
    space-between;
  gap:
    12px;
  padding-top:
    12px;
  border-top:
    1px solid
    rgba(
      148,
      163,
      184,
      0.12
    );
}

.ai-lead-card-counters {
  display:
    flex;
  align-items:
    center;
  flex-wrap:
    wrap;
  gap:
    7px;
}

.ai-lead-card-counters span {
  display:
    inline-flex;
  align-items:
    center;
  min-height:
    24px;
  padding:
    5px 8px;
  border-radius:
    999px;
  color:
    rgba(
      203,
      213,
      225,
      0.78
    );
  background:
    rgba(
      255,
      255,
      255,
      0.045
    );
  border:
    1px solid
    rgba(
      255,
      255,
      255,
      0.075
    );
  font-size:
    9px;
  font-weight:
    800;
  line-height:
    1;
}

.ai-lead-card-counters
.ai-lead-queue-status {
  color:
    #fde68a;
  background:
    rgba(
      250,
      204,
      21,
      0.1
    );
  border-color:
    rgba(
      250,
      204,
      21,
      0.18
    );
}

.ai-lead-card-footer time {
  flex-shrink:
    0;
  color:
    rgba(
      148,
      163,
      184,
      0.72
    );
  font-size:
    9px;
  font-weight:
    750;
  white-space:
    nowrap;
}


/* ========================================
   STAGE COLORS
======================================== */

.ai-pipeline-lead-card.lead-stage-kunde-klar::before {
  border-left-color:
    #22c55e;
}

.ai-pipeline-lead-card.lead-stage-kunde-klar::after {
  background:
    rgba(
      34,
      197,
      94,
      0.12
    );
}

.ai-pipeline-lead-card.lead-stage-a-leads::before {
  border-left-color:
    #facc15;
}

.ai-pipeline-lead-card.lead-stage-a-leads::after {
  background:
    rgba(
      250,
      204,
      21,
      0.11
    );
}

.ai-pipeline-lead-card.lead-stage-b-leads::before {
  border-left-color:
    #f97316;
}

.ai-pipeline-lead-card.lead-stage-b-leads::after {
  background:
    rgba(
      249,
      115,
      22,
      0.11
    );
}

.ai-pipeline-lead-card.lead-stage-c-leads::before {
  border-left-color:
    #3b82f6;
}

.ai-pipeline-lead-card.lead-stage-d-leads-rt::before {
  border-left-color:
    #a855f7;
}

.ai-pipeline-lead-card.lead-stage-d-leads-rt::after {
  background:
    rgba(
      168,
      85,
      247,
      0.12
    );
}

.ai-pipeline-lead-card.lead-stage-ikke-behov::before {
  border-left-color:
    #ef4444;
}

.ai-pipeline-lead-card.lead-stage-ikke-behov::after {
  background:
    rgba(
      239,
      68,
      68,
      0.1
    );
}


/* ========================================
   HUMAN REVIEW
======================================== */

.ai-pipeline-lead-card.requires-review {
  border-color:
    rgba(
      239,
      68,
      68,
      0.38
    );
}

.ai-pipeline-lead-card.requires-review
.ai-lead-next-action {
  border-color:
    rgba(
      239,
      68,
      68,
      0.25
    );
  background:
    linear-gradient(
      135deg,
      rgba(
        239,
        68,
        68,
        0.16
      ),
      rgba(
        15,
        23,
        42,
        0.24
      )
    );
}

.ai-pipeline-lead-card.requires-review
.ai-lead-next-action span {
  color:
    #fecaca;
}


/* ========================================
   EMPTY STATE
======================================== */

.ai-pipeline-empty-state {
  grid-column:
    1 / -1;
  min-height:
    220px;
  place-items:
    center;
  text-align:
    center;
}

.ai-pipeline-empty-state
.empty-state {
  width:
    min(
      100%,
      520px
    );
  padding:
    30px;
}

.ai-pipeline-empty-state
.empty-state strong {
  font-size:
    18px;
}

.ai-pipeline-empty-state
.empty-state p {
  margin-top:
    8px;
  color:
    rgba(
      203,
      213,
      225,
      0.72
    );
}


/* ========================================
   RESPONSIVE
======================================== */

@media (
  max-width:
  1500px
) {

  #workspaceMain
  .lead-list:has(
    .ai-pipeline-lead-card
  ) {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );
  }

}

@media (
  max-width:
  1120px
) {

  #workspaceMain:has(
    .ai-pipeline-lead-card
  )
  .dashboard-header {
    align-items:
      stretch;
    flex-direction:
      column;
  }

  #workspaceMain:has(
    .ai-pipeline-lead-card
  )
  .search-input {
    width:
      100%;
    min-width:
      0;
  }

}

@media (
  max-width:
  820px
) {

  #workspaceMain
  .lead-list:has(
    .ai-pipeline-lead-card
  ) {
    grid-template-columns:
      1fr;
  }

  .ai-pipeline-lead-card {
    min-height:
      0;
  }

}

@media (
  max-width:
  560px
) {

  .ai-pipeline-lead-card {
    padding:
      17px;
    border-radius:
      20px;
  }

  .ai-lead-card-header {
    align-items:
      stretch;
    flex-direction:
      column;
  }

  .ai-pipeline-lead-card
  .lead-stage-pill {
    width:
      fit-content;
  }

  .ai-lead-card-contact-grid,
  .ai-lead-card-status-grid {
    grid-template-columns:
      1fr;
  }

  .ai-lead-contact-item:nth-child(3) {
    grid-column:
      auto;
  }

  .ai-lead-card-footer {
    align-items:
      flex-start;
    flex-direction:
      column;
  }

}

/* ========================================
   ADMIN AI LEAD — ACTIVE OPERATIONS WORKSPACE
======================================== */

#workspaceMain:has(
  .lead-operations-workspace
) {
  max-width: 1720px;
}


/* ========================================
   WORKSPACE CONTAINER
======================================== */

.lead-operations-workspace {
  display: grid;
  gap: 16px;

  width: 100%;
  max-width: 1720px;

  margin: 0 auto;
  padding-bottom: 80px;
}

.lead-operations-workspace
.lead-back-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.lead-operations-workspace
.lead-back-button
.btn {
  width: fit-content;
  min-height: 40px;

  padding: 9px 15px;

  border-radius: 999px;
}


/* ========================================
   COMMAND CENTER HEADER
======================================== */

.lead-command-center {
  position: relative;
  z-index: 2;
}

.lead-command-center
.lead-header {
  position: relative;

  overflow: hidden;

  border-radius: 28px;

  background:
    radial-gradient(
      circle at 8% 0%,
      rgba(59, 130, 246, 0.22),
      transparent 34%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(14, 165, 233, 0.11),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      rgba(24, 38, 59, 0.98),
      rgba(8, 19, 34, 0.97)
    );

  border:
    1px solid rgba(96, 165, 250, 0.21);

  box-shadow:
    0 26px 74px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.lead-command-center
.lead-header::before {
  content: "";

  position: absolute;

  top: 0;
  right: 8%;
  left: 8%;

  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(147, 197, 253, 0.7),
      transparent
    );

  pointer-events: none;
}

.lead-command-center
.lead-header::after {
  content: "";

  position: absolute;

  right: -120px;
  bottom: -170px;

  width: 410px;
  height: 410px;

  border-radius: 999px;

  background:
    radial-gradient(
      circle,
      rgba(59, 130, 246, 0.16),
      transparent 68%
    );

  pointer-events: none;
}

.lead-command-center
.lead-header-container {
  position: relative;
  z-index: 1;

  display: grid;

  grid-template-columns:
    minmax(280px, 0.72fr)
    minmax(560px, 1.28fr);

  align-items: stretch;

  gap: 16px;

  padding: 18px;
}

.lead-command-center
.lead-header-info {
  position: relative;

  display: grid;
  align-content: center;

  gap: 14px;

  min-width: 0;
  min-height: 142px;

  padding: 20px;

  overflow: hidden;

  border-radius: 21px;

  background:
    linear-gradient(
      145deg,
      rgba(59, 130, 246, 0.11),
      rgba(255, 255, 255, 0.035)
    );

  border:
    1px solid rgba(147, 197, 253, 0.13);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.lead-command-center
.lead-header-info::before {
  content: "ACTIVE LEAD";

  display: inline-flex;

  width: fit-content;

  color:
    rgba(147, 197, 253, 0.76);

  font-size: 9px;
  font-weight: 950;

  line-height: 1;

  letter-spacing: 0.12em;
}

.lead-command-center
.lead-company-name {
  margin: 0;

  color: #ffffff;

  font-size:
    clamp(
      29px,
      3vw,
      44px
    );

  font-weight: 950;
  line-height: 1;

  letter-spacing: -0.06em;

  overflow-wrap: anywhere;
}

.lead-command-center
.lead-header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 7px;
}

.lead-command-center
.lead-meta-item {
  display: inline-flex;
  align-items: center;

  max-width: 100%;
  min-height: 33px;

  padding: 7px 10px;

  overflow: hidden;

  border-radius: 11px;

  color:
    rgba(226, 232, 240, 0.84);

  background:
    rgba(7, 17, 29, 0.34);

  border:
    1px solid rgba(148, 163, 184, 0.11);

  font-size: 10px;
  font-weight: 750;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.lead-command-center
.lead-header-actions {
  position: relative;

  display: grid;

  grid-template-columns:
    112px
    minmax(180px, 1fr)
    112px;

  grid-template-rows:
    auto
    minmax(42px, auto)
    minmax(42px, auto);

  align-content: center;
  align-items: stretch;

  gap: 9px;

  min-width: 0;

  padding: 18px;

  border-radius: 21px;

  background:
    linear-gradient(
      145deg,
      rgba(7, 17, 29, 0.48),
      rgba(15, 23, 42, 0.3)
    );

  border:
    1px solid rgba(148, 163, 184, 0.12);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.lead-command-center
.lead-header-actions::before {
  content: "LEAD ACTIONS";

  grid-column: 1 / -1;

  display: flex;
  align-items: center;

  min-height: 20px;

  padding-bottom: 3px;

  color:
    rgba(148, 163, 184, 0.72);

  font-size: 9px;
  font-weight: 950;

  line-height: 1;

  letter-spacing: 0.11em;
}

.lead-command-center
.lead-header-actions
.btn,
.lead-command-center
.lead-header-actions
select {
  width: 100%;
  min-width: 0;
  min-height: 42px;

  margin: 0;
  padding: 9px 12px;

  border-radius: 13px;

  font-size: 10px;
  font-weight: 850;

  white-space: nowrap;
}

.lead-command-center
.lead-header-actions
select {
  color:
    rgba(241, 245, 249, 0.9);

  background:
    rgba(15, 23, 42, 0.7);

  border-color:
    rgba(148, 163, 184, 0.16);
}

.lead-command-center
.lead-header-actions
[data-action="edit-lead"] {
  grid-column: 1;
  grid-row: 2;

  color: #dbeafe;

  background:
    rgba(59, 130, 246, 0.12);

  border-color:
    rgba(96, 165, 250, 0.19);
}

.lead-command-center
#moveStageSelect {
  grid-column: 2;
  grid-row: 2;

  margin: 0;
}

.lead-command-center
.lead-header-actions
[data-action="move-stage"] {
  grid-column: 3;
  grid-row: 2;

  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      #3b82f6,
      #2563eb
    );

  border-color:
    rgba(147, 197, 253, 0.2);

  box-shadow:
    0 10px 24px rgba(37, 99, 235, 0.2);
}

.lead-command-center
.lead-header-actions
[data-action="delete-lead"] {
  grid-column: 1;
  grid-row: 3;

  color: #fecaca;

  background:
    rgba(239, 68, 68, 0.08);

  border-color:
    rgba(248, 113, 113, 0.16);
}

.lead-command-center
#sendToSalesUserSelect {
  grid-column: 2;
  grid-row: 3;
}

.lead-command-center
.lead-header-actions
[data-action="send-to-sales"] {
  grid-column: 3;
  grid-row: 3;

  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      #2563eb,
      #1d4ed8
    );

  border-color:
    rgba(147, 197, 253, 0.2);

  box-shadow:
    0 10px 24px rgba(37, 99, 235, 0.18);
}

.lead-command-center
.lead-header-actions
.btn:hover {
  transform:
    translateY(-1px);

  filter:
    brightness(1.08);
}

@media (
  max-width: 760px
) {

  .lead-command-center
  .lead-header-actions
  > * {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .lead-command-center
  .lead-header-actions::before {
    grid-column: 1 !important;
  }

}

/* ========================================
   OPERATIONS LAYOUT
======================================== */

.lead-operations-layout {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(310px, 360px);

  align-items: start;

  gap: 16px;

  width: 100%;
}

.lead-operations-main {
  display: grid;
  gap: 16px;

  min-width: 0;
}

.lead-operations-sidebar {
  position: sticky;
  top: 20px;

  display: grid;
  gap: 14px;

  min-width: 0;

  max-height:
    calc(
      100vh - 40px
    );

  overflow-y: auto;

  padding-right: 4px;

  scrollbar-width: thin;

  scrollbar-color:
    rgba(148, 163, 184, 0.28)
    transparent;
}

.lead-operations-sidebar::-webkit-scrollbar {
  width: 5px;
}

.lead-operations-sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;

  background:
    rgba(148, 163, 184, 0.28);
}


/* ========================================
   WORKFLOW STEP BASE
======================================== */

.lead-operations-workspace
.lead-workflow-step {
  position: relative;

  display: grid;
  gap: 18px;

  min-width: 0;

  padding: 22px;

  overflow: hidden;

  border-radius: 25px;

  background:
    linear-gradient(
      145deg,
      rgba(30, 41, 59, 0.88),
      rgba(15, 23, 42, 0.84)
    );

  border:
    1px solid rgba(148, 163, 184, 0.15);

  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.lead-operations-workspace
.lead-workflow-step::before {
  content: "";

  position: absolute;

  top: 0;
  bottom: 0;
  left: 0;

  width: 4px;

  background: #3b82f6;
}

.lead-workflow-source-step::before {
  background: #a855f7 !important;
}

.lead-workflow-ai-step::before {
  background: #3b82f6 !important;
}

.lead-workflow-conversation-step::before {
  background: #10b981 !important;
}

.lead-workflow-step-header {
  display: grid;

  grid-template-columns:
    46px
    minmax(0, 1fr);

  align-items: center;

  gap: 14px;

  padding-bottom: 17px;

  border-bottom:
    1px solid rgba(148, 163, 184, 0.13);
}

.lead-workflow-step-number {
  display: grid;
  place-items: center;

  width: 46px;
  height: 46px;

  border-radius: 16px;

  color: #dbeafe;

  background:
    linear-gradient(
      135deg,
      rgba(59, 130, 246, 0.34),
      rgba(37, 99, 235, 0.18)
    );

  border:
    1px solid rgba(96, 165, 250, 0.3);

  box-shadow:
    0 10px 26px rgba(37, 99, 235, 0.18);

  font-size: 14px;
  font-weight: 950;
}

.lead-workflow-source-step
.lead-workflow-step-number {
  color: #f3e8ff;

  background:
    rgba(168, 85, 247, 0.2);

  border-color:
    rgba(192, 132, 252, 0.28);

  box-shadow:
    0 10px 26px rgba(126, 34, 206, 0.15);
}

.lead-workflow-conversation-step
.lead-workflow-step-number {
  color: #d1fae5;

  background:
    rgba(16, 185, 129, 0.18);

  border-color:
    rgba(52, 211, 153, 0.26);

  box-shadow:
    0 10px 26px rgba(5, 150, 105, 0.12);
}

.lead-workflow-step-copy {
  display: grid;
  gap: 5px;

  min-width: 0;
}

.lead-workflow-step-copy h2 {
  margin: 0;

  color: #ffffff;

  font-size: 19px;
  font-weight: 950;
  line-height: 1.2;

  letter-spacing: -0.035em;
}

.lead-workflow-step-copy p {
  margin: 0;

  color:
    rgba(203, 213, 225, 0.68);

  font-size: 12px;
  line-height: 1.45;
}

.lead-workflow-step-content {
  display: grid;
  gap: 14px;

  min-width: 0;
}


/* ========================================
   STEP 01 — SOURCE AND ANALYSIS
======================================== */

.lead-workflow-source-step {
  background:
    radial-gradient(
      circle at top right,
      rgba(168, 85, 247, 0.1),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      rgba(30, 41, 59, 0.88),
      rgba(15, 23, 42, 0.84)
    );
}

.lead-workflow-source-step
.lead-hunter-source-panel,
.lead-workflow-source-step
.lead-context-analysis-panel {
  position: relative;

  display: grid;
  gap: 14px;

  min-width: 0;

  padding: 17px;

  border-radius: 19px;

  background:
    rgba(7, 17, 29, 0.28);

  border:
    1px solid rgba(148, 163, 184, 0.11);

  box-shadow: none;
}

.lead-workflow-source-step
.lead-context-analysis-panel::before {
  display: none;
}

.lead-workflow-source-step
.lead-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 14px;

  padding-bottom: 12px;

  border-bottom:
    1px solid rgba(148, 163, 184, 0.11);
}

.lead-workflow-source-step
.lead-panel-header h3 {
  margin: 0;

  color: #ffffff;

  font-size: 14px;
  font-weight: 950;
}

.lead-workflow-source-step
.lead-analysis-subtitle {
  margin-top: 5px;

  color:
    rgba(203, 213, 225, 0.65);

  font-size: 10px;
  line-height: 1.5;
}

.lead-workflow-source-step
.lead-analysis-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;

  gap: 7px;
}

.lead-workflow-source-step
.lead-ai-badge {
  min-height: 29px;

  padding: 6px 9px;

  border-radius: 999px;

  font-size: 9px;
  font-weight: 950;
}

.lead-workflow-source-step
.lead-analysis-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 7px;
}

.lead-workflow-source-step
.lead-analysis-meta span {
  min-height: 27px;

  padding: 5px 8px;

  border-radius: 999px;

  background:
    rgba(255, 255, 255, 0.045);

  border:
    1px solid rgba(255, 255, 255, 0.075);

  color:
    rgba(203, 213, 225, 0.72);

  font-size: 9px;
  font-weight: 750;
}

.lead-workflow-source-step
.lead-hunter-source-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 10px;
}

.lead-workflow-source-step
.lead-analysis-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 10px;
}

.lead-workflow-source-step
.lead-analysis-card {
  min-width: 0;
  min-height: 0;

  padding: 13px;

  border-radius: 15px;

  background:
    rgba(255, 255, 255, 0.045);

  border:
    1px solid rgba(255, 255, 255, 0.075);

  box-shadow: none;
}

.lead-workflow-source-step
.lead-analysis-label {
  margin-bottom: 7px;

  color: #93c5fd;

  font-size: 8px;
  font-weight: 950;

  text-transform: uppercase;

  letter-spacing: 0.06em;
}

.lead-workflow-source-step
.lead-analysis-value {
  color:
    rgba(232, 241, 251, 0.86);

  font-size: 11px;
  line-height: 1.5;

  overflow-wrap: anywhere;
}

.lead-workflow-source-step
.lead-hunter-source-link {
  color: #93c5fd;

  font-size: 11px;
  font-weight: 850;

  text-decoration: none;
}

.lead-workflow-source-step
.lead-hunter-source-link:hover {
  color: #dbeafe;

  text-decoration: underline;
}

.lead-workflow-source-step
.lead-hunter-source-url {
  margin-top: 6px;

  color:
    rgba(148, 163, 184, 0.68);

  font-size: 9px;
  line-height: 1.4;

  overflow-wrap: anywhere;
}

.lead-workflow-source-step
.lead-hunter-source-details {
  overflow: hidden;

  border-radius: 15px;

  background:
    rgba(7, 17, 29, 0.3);

  border:
    1px solid rgba(148, 163, 184, 0.1);
}

.lead-workflow-source-step
.lead-hunter-source-details summary {
  padding: 12px 13px;

  color: #e2e8f0;

  font-size: 11px;
  font-weight: 850;

  cursor: pointer;
}

.lead-workflow-source-step
.lead-hunter-source-text,
.lead-workflow-source-step
.lead-hunter-source-notes {
  width: 100%;
  max-height: 260px;

  margin: 0;
  padding: 13px;

  overflow: auto;

  border-top:
    1px solid rgba(148, 163, 184, 0.1);

  color:
    rgba(226, 232, 240, 0.8);

  font-size: 10px;
  line-height: 1.55;

  white-space: pre-wrap;
  overflow-wrap: anywhere;
}


/* ========================================
   STEP 02 — AI WORKSPACE
======================================== */

.lead-workflow-ai-step {
  border-color:
    rgba(96, 165, 250, 0.25);

  background:
    radial-gradient(
      circle at top right,
      rgba(59, 130, 246, 0.16),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      rgba(30, 41, 59, 0.92),
      rgba(15, 23, 42, 0.87)
    );
}

.lead-workflow-ai-step
.lead-ai-workspace {
  display: grid;
  gap: 14px;

  min-width: 0;

  padding: 0;

  border: 0;
  border-radius: 0;

  background: transparent;

  box-shadow: none;
}

.lead-workflow-ai-step
.lead-ai-workspace
> .lead-panel-header {
  display: none;
}

.lead-workflow-ai-step
.lead-ai-tabs {
  display: flex;
  align-items: center;

  gap: 6px;

  padding: 5px;

  border-radius: 14px;

  background:
    rgba(7, 17, 29, 0.34);

  border:
    1px solid rgba(148, 163, 184, 0.1);
}

.lead-workflow-ai-step
.lead-ai-tab {
  flex: 1;

  min-height: 38px;

  padding: 8px 12px;

  border-radius: 10px;

  color:
    rgba(203, 213, 225, 0.68);

  background: transparent;

  border:
    1px solid transparent;

  font-size: 11px;
  font-weight: 850;
}

.lead-workflow-ai-step
.lead-ai-tab:hover,
.lead-workflow-ai-step
.lead-ai-tab.active {
  color: #ffffff;

  background:
    rgba(59, 130, 246, 0.17);

  border-color:
    rgba(96, 165, 250, 0.2);

  transform: none;
}

.lead-workflow-ai-step
.lead-ai-content {
  display: grid;
  gap: 13px;

  min-width: 0;
}

.lead-workflow-ai-step
.lead-ai-status {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;
}

.lead-workflow-ai-step
.lead-ai-status
.lead-ai-badge {
  padding: 7px 10px;

  border-radius: 999px;

  color: #fef08a;

  background:
    rgba(250, 204, 21, 0.1);

  border:
    1px solid rgba(250, 204, 21, 0.18);

  font-size: 9px;
  font-weight: 950;

  text-transform: uppercase;

  letter-spacing: 0.05em;
}

.lead-workflow-ai-step
.lead-ai-content[
  data-draft-approved="true"
]
.lead-ai-badge {
  color: #e9d5ff;

  background:
    rgba(168, 85, 247, 0.12);

  border-color:
    rgba(192, 132, 252, 0.2);
}

.lead-workflow-ai-step
.lead-ai-content[
  data-draft-sent="true"
]
.lead-ai-badge {
  color: #bbf7d0;

  background:
    rgba(34, 197, 94, 0.1);

  border-color:
    rgba(74, 222, 128, 0.2);
}

.lead-workflow-ai-step
.lead-ai-time {
  color:
    rgba(148, 163, 184, 0.72);

  font-size: 10px;
}

.lead-workflow-ai-step
.lead-ai-recommendation {
  display: grid;
  gap: 5px;

  padding: 12px 13px;

  border-radius: 15px;

  background:
    rgba(59, 130, 246, 0.08);

  border:
    1px solid rgba(96, 165, 250, 0.15);
}

.lead-workflow-ai-step
.lead-ai-recommendation-title {
  color: #93c5fd;

  font-size: 9px;
  font-weight: 950;

  text-transform: uppercase;

  letter-spacing: 0.06em;
}

.lead-workflow-ai-step
.lead-ai-recommendation-text {
  color:
    rgba(241, 245, 249, 0.9);

  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.lead-workflow-ai-step
.lead-ai-composer {
  display: grid;
  gap: 9px;
}

.lead-workflow-ai-step
.lead-ai-input,
.lead-workflow-ai-step
.lead-ai-body {
  border-radius: 14px;

  background:
    rgba(7, 17, 29, 0.34);

  border-color:
    rgba(148, 163, 184, 0.15);
}

.lead-workflow-ai-step
.lead-ai-body {
  min-height: 230px;

  line-height: 1.55;
}

.lead-workflow-ai-step
.lead-ai-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;

  gap: 8px;

  padding-top: 11px;

  border-top:
    1px solid rgba(148, 163, 184, 0.12);
}

.lead-workflow-ai-step
.lead-ai-actions
.btn {
  min-height: 39px;

  padding: 8px 14px;

  border-radius: 999px;

  font-size: 10px;
}


/* ========================================
   STEP 03 — CONVERSATION
======================================== */

.lead-workflow-conversation-step
.lead-conversation-panel {
  display: grid;

  grid-template-rows:
    minmax(250px, 1fr)
    auto;

  gap: 13px;

  min-width: 0;
  min-height: 360px;

  padding: 0;

  border: 0;
  border-radius: 0;

  background: transparent;

  box-shadow: none;
}

.lead-workflow-conversation-step
.lead-conversation-panel
> .lead-panel-header {
  display: none;
}

.lead-workflow-conversation-step
.lead-conversation-list {
  display: flex;
  flex-direction: column;

  gap: 10px;

  min-height: 0;
  max-height: 440px;

  overflow-y: auto;

  padding: 4px;
}

.lead-workflow-conversation-step
.lead-conversation-item {
  display: grid;

  grid-template-columns:
    34px
    minmax(0, 1fr);

  align-items: start;

  gap: 10px;
}

.lead-workflow-conversation-step
.lead-conversation-avatar {
  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;

  border-radius: 12px;

  color: #dbeafe;

  background:
    rgba(59, 130, 246, 0.16);

  border:
    1px solid rgba(96, 165, 250, 0.2);

  font-size: 11px;
  font-weight: 950;
}

.lead-workflow-conversation-step
.lead-conversation-item.inbound
.lead-conversation-avatar {
  color: #d1fae5;

  background:
    rgba(16, 185, 129, 0.14);

  border-color:
    rgba(52, 211, 153, 0.2);
}

.lead-workflow-conversation-step
.lead-conversation-content {
  display: grid;
  gap: 6px;

  min-width: 0;

  padding: 12px 13px;

  border-radius: 16px;

  background:
    rgba(15, 23, 42, 0.32);

  border:
    1px solid rgba(148, 163, 184, 0.11);
}

.lead-workflow-conversation-step
.lead-conversation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;
}

.lead-workflow-conversation-step
.lead-conversation-sender {
  color: #ffffff;

  font-size: 11px;
  font-weight: 900;
}

.lead-workflow-conversation-step
.lead-conversation-time {
  color:
    rgba(148, 163, 184, 0.66);

  font-size: 9px;
}

.lead-workflow-conversation-step
.lead-conversation-subject {
  color: #bfdbfe;

  font-size: 11px;
  font-weight: 850;
}

.lead-workflow-conversation-step
.lead-conversation-body {
  color:
    rgba(226, 232, 240, 0.84);

  font-size: 12px;
  line-height: 1.55;

  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.lead-workflow-conversation-step
.lead-conversation-input {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto;

  gap: 8px;

  padding-top: 12px;

  border-top:
    1px solid rgba(148, 163, 184, 0.12);
}

.lead-workflow-conversation-step
.lead-conversation-input
input {
  min-height: 42px;

  border-radius: 13px;
}

.lead-workflow-conversation-step
.lead-conversation-input
.btn {
  min-width: 84px;
  min-height: 42px;

  border-radius: 13px;
}


/* ========================================
   OPERATIONS SIDEBAR
======================================== */

.lead-operations-sidebar
.lead-sidebar-section {
  min-width: 0;

  padding: 16px;

  border-radius: 20px;

  background:
    linear-gradient(
      145deg,
      rgba(30, 41, 59, 0.88),
      rgba(15, 23, 42, 0.84)
    );

  border:
    1px solid rgba(148, 163, 184, 0.14);

  box-shadow:
    0 15px 42px rgba(0, 0, 0, 0.19),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.lead-sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  margin-bottom: 12px;
  padding-bottom: 12px;

  border-bottom:
    1px solid rgba(148, 163, 184, 0.12);
}

.lead-sidebar-section-header span {
  color:
    rgba(203, 213, 225, 0.72);

  font-size: 9px;
  font-weight: 950;

  text-transform: uppercase;

  letter-spacing: 0.065em;
}

.lead-sidebar-section-header strong {
  padding: 6px 9px;

  border-radius: 999px;

  color: #dbeafe;

  background:
    rgba(59, 130, 246, 0.14);

  border:
    1px solid rgba(96, 165, 250, 0.2);

  font-size: 9px;
  font-weight: 950;
}

.lead-operations-sidebar
.lead-kpi-strip {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 8px;
}

.lead-operations-sidebar
.lead-kpi-item {
  min-width: 0;
  min-height: 66px;

  padding: 10px;

  border-radius: 13px;

  background:
    rgba(7, 17, 29, 0.25);

  border:
    1px solid rgba(148, 163, 184, 0.09);

  box-shadow: none;
}

.lead-operations-sidebar
.lead-kpi-item:nth-child(6) {
  grid-column: 1 / -1;
}

.lead-operations-sidebar
.lead-kpi-label {
  font-size: 8px;
}

.lead-operations-sidebar
.lead-kpi-value {
  font-size: 12px;

  white-space: normal;
  overflow-wrap: anywhere;
}

.lead-sidebar-activity
.lead-activity-panel,
.lead-sidebar-context
.lead-context-panel {
  padding: 0;

  border: 0;
  border-radius: 0;

  background: transparent;

  box-shadow: none;
}

.lead-operations-sidebar
.lead-panel-header {
  margin: 0 0 12px;
  padding-bottom: 11px;

  border-bottom:
    1px solid rgba(148, 163, 184, 0.12);
}

.lead-operations-sidebar
.lead-panel-header h3 {
  margin: 0;

  color: #ffffff;

  font-size: 13px;
  font-weight: 950;
}

.lead-sidebar-activity
.lead-timeline {
  display: grid;
  gap: 8px;

  max-height: 330px;

  overflow-y: auto;

  padding-right: 3px;
}

.lead-sidebar-activity
.lead-timeline-item {
  display: grid;

  grid-template-columns:
    29px
    minmax(0, 1fr);

  align-items: start;

  gap: 8px;
}

.lead-sidebar-activity
.lead-timeline-dot {
  display: grid;
  place-items: center;

  width: 29px;
  height: 29px;

  border-radius: 10px;

  background:
    rgba(59, 130, 246, 0.12);

  border:
    1px solid rgba(96, 165, 250, 0.16);

  font-size: 10px;
}

.lead-sidebar-activity
.lead-timeline-content {
  display: grid;
  gap: 4px;

  min-width: 0;

  padding: 9px 10px;

  border-radius: 12px;

  background:
    rgba(7, 17, 29, 0.23);

  border:
    1px solid rgba(148, 163, 184, 0.09);
}

.lead-sidebar-activity
.lead-timeline-title {
  color: #ffffff;

  font-size: 10px;
  font-weight: 900;
}

.lead-sidebar-activity
.lead-timeline-text {
  color:
    rgba(203, 213, 225, 0.74);

  font-size: 9px;
  line-height: 1.45;

  overflow-wrap: anywhere;
}

.lead-sidebar-activity
.lead-timeline-time {
  color:
    rgba(148, 163, 184, 0.62);

  font-size: 8px;
}

.lead-sidebar-context
.lead-context-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 8px;
}

.lead-sidebar-context
.lead-context-card {
  min-width: 0;

  padding: 10px;

  border-radius: 12px;

  background:
    rgba(7, 17, 29, 0.23);

  border:
    1px solid rgba(148, 163, 184, 0.09);
}

.lead-sidebar-context
.lead-context-card-full {
  grid-column: 1 / -1;
}

.lead-sidebar-context
.lead-context-label {
  margin-bottom: 5px;

  color:
    rgba(148, 163, 184, 0.76);

  font-size: 8px;
  font-weight: 950;

  text-transform: uppercase;

  letter-spacing: 0.06em;
}

.lead-sidebar-context
.lead-context-value {
  color:
    rgba(241, 245, 249, 0.87);

  font-size: 10px;
  font-weight: 750;
  line-height: 1.45;

  overflow-wrap: anywhere;
}

.lead-sidebar-context
.lead-recommendation {
  margin-top: 10px;
  padding: 11px;

  border-radius: 13px;

  background:
    rgba(59, 130, 246, 0.08);

  border:
    1px solid rgba(96, 165, 250, 0.14);
}


/* ========================================
   EMPTY STATES
======================================== */

.lead-operations-workspace
.lead-empty-state {
  display: grid;
  justify-items: center;

  gap: 7px;

  min-height: 140px;

  padding: 24px 18px;

  border-radius: 16px;

  text-align: center;

  background:
    rgba(7, 17, 29, 0.22);

  border:
    1px dashed rgba(148, 163, 184, 0.16);
}

.lead-operations-workspace
.lead-empty-icon {
  font-size: 22px;
}

.lead-operations-workspace
.lead-empty-text {
  color: #ffffff;

  font-size: 12px;
  font-weight: 900;
}

.lead-operations-workspace
.lead-empty-hint {
  color:
    rgba(203, 213, 225, 0.64);

  font-size: 10px;
  line-height: 1.45;
}


/* ========================================
   RESPONSIVE
======================================== */

@media (
  max-width: 1450px
) {

  .lead-command-center
  .lead-header-container {
    grid-template-columns:
      minmax(240px, 0.65fr)
      minmax(580px, 1.35fr);
  }

  .lead-operations-layout {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(290px, 320px);
  }

  .lead-command-center
  .lead-header-actions {
    grid-template-columns:
      auto
      minmax(120px, 1fr)
      auto;
  }

}

@media (
  max-width: 1120px
) {

  .lead-command-center
  .lead-header-container,
  .lead-operations-layout {
    grid-template-columns: 1fr;
  }

  .lead-operations-sidebar {
    position: static;

    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    max-height: none;

    overflow: visible;
  }

  .lead-sidebar-kpis {
    grid-column: 1 / -1;
  }

  .lead-operations-sidebar
  .lead-kpi-strip {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .lead-operations-sidebar
  .lead-kpi-item:nth-child(6) {
    grid-column: auto;
  }

}

@media (
  max-width: 760px
) {

  .lead-operations-workspace {
    gap: 13px;
  }

  .lead-command-center
  .lead-header-container {
    padding: 18px;
  }

  .lead-command-center
  .lead-header-actions {
    grid-template-columns: 1fr;
  }

  .lead-command-center
  .lead-header-actions
  .btn,
  .lead-command-center
  .lead-header-actions
  select {
    width: 100%;
  }

  .lead-operations-workspace
  .lead-workflow-step {
    padding: 17px;

    border-radius: 21px;
  }

  .lead-workflow-step-header {
    grid-template-columns:
      40px
      minmax(0, 1fr);
  }

  .lead-workflow-step-number {
    width: 40px;
    height: 40px;
  }

  .lead-workflow-source-step
  .lead-hunter-source-grid,
  .lead-workflow-source-step
  .lead-analysis-grid,
  .lead-operations-sidebar,
  .lead-operations-sidebar
  .lead-kpi-strip,
  .lead-sidebar-context
  .lead-context-grid {
    grid-template-columns: 1fr;
  }

  .lead-sidebar-kpis {
    grid-column: auto;
  }

  .lead-operations-sidebar
  .lead-kpi-item:nth-child(6),
  .lead-sidebar-context
  .lead-context-card-full {
    grid-column: auto;
  }

  .lead-workflow-ai-step
  .lead-ai-tabs,
  .lead-workflow-ai-step
  .lead-ai-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .lead-workflow-ai-step
  .lead-ai-actions
  .btn {
    width: 100%;
  }

  .lead-workflow-conversation-step
  .lead-conversation-input {
    grid-template-columns: 1fr;
  }

  .lead-workflow-conversation-step
  .lead-conversation-input
  .btn {
    width: 100%;
  }

}

/* ========================================
   WORKFLOW DROPDOWNS
======================================== */

.lead-operations-workspace
details.lead-workflow-step {
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.lead-operations-workspace
details.lead-workflow-step:not([open]) {
  gap: 0;
}

.lead-operations-workspace
details.lead-workflow-step[open] {
  border-color:
    rgba(
      96,
      165,
      250,
      0.24
    );

  box-shadow:
    0 22px 58px
    rgba(
      0,
      0,
      0,
      0.24
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.05
    );
}


/* ========================================
   CLICKABLE SUMMARY
======================================== */

.lead-operations-workspace
details.lead-workflow-step
> summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.lead-operations-workspace
details.lead-workflow-step
> summary::-webkit-details-marker {
  display: none;
}

.lead-operations-workspace
details.lead-workflow-step
> .lead-workflow-step-header {
  grid-template-columns:
    46px
    minmax(
      0,
      1fr
    )
    38px;

  width: 100%;

  margin:
    -6px;

  padding:
    6px
    6px
    17px;

  border-radius:
    17px;

  transition:
    background 160ms ease,
    border-color 160ms ease,
    padding 160ms ease;
}

.lead-operations-workspace
details.lead-workflow-step
> .lead-workflow-step-header:hover {
  background:
    rgba(
      255,
      255,
      255,
      0.035
    );
}

.lead-operations-workspace
details.lead-workflow-step
> .lead-workflow-step-header:focus-visible {
  outline:
    2px solid
    rgba(
      96,
      165,
      250,
      0.72
    );

  outline-offset:
    4px;
}


/* ========================================
   CLOSED STATE
======================================== */

.lead-operations-workspace
details.lead-workflow-step:not([open])
> .lead-workflow-step-header {
  padding-bottom:
    6px;

  border-bottom:
    0;
}

.lead-operations-workspace
details.lead-workflow-step:not([open]):hover {
  border-color:
    rgba(
      96,
      165,
      250,
      0.3
    );

  box-shadow:
    0 18px 48px
    rgba(
      0,
      0,
      0,
      0.2
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.045
    );
}


/* ========================================
   DROPDOWN ICON
======================================== */

.lead-workflow-dropdown-icon {
  display: grid;
  place-items: center;

  width: 36px;
  height: 36px;

  justify-self: end;

  border-radius:
    12px;

  color:
    rgba(
      219,
      234,
      254,
      0.88
    );

  background:
    rgba(
      59,
      130,
      246,
      0.12
    );

  border:
    1px solid
    rgba(
      96,
      165,
      250,
      0.18
    );

  font-size:
    14px;

  font-weight:
    950;

  line-height:
    1;

  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

details.lead-workflow-step[open]
.lead-workflow-dropdown-icon {
  transform:
    rotate(
      180deg
    );

  background:
    rgba(
      59,
      130,
      246,
      0.2
    );

  border-color:
    rgba(
      96,
      165,
      250,
      0.32
    );
}

.lead-workflow-source-step
.lead-workflow-dropdown-icon {
  color:
    #f3e8ff;

  background:
    rgba(
      168,
      85,
      247,
      0.12
    );

  border-color:
    rgba(
      192,
      132,
      252,
      0.18
    );
}

.lead-workflow-conversation-step
.lead-workflow-dropdown-icon {
  color:
    #d1fae5;

  background:
    rgba(
      16,
      185,
      129,
      0.12
    );

  border-color:
    rgba(
      52,
      211,
      153,
      0.18
    );
}


/* ========================================
   OPEN CONTENT
======================================== */

.lead-operations-workspace
details.lead-workflow-step
> .lead-workflow-step-content {
  margin-top:
    0;

  animation:
    lead-workflow-dropdown-open
    180ms
    ease-out;
}

@keyframes lead-workflow-dropdown-open {

  from {
    opacity:
      0;

    transform:
      translateY(
        -5px
      );
  }

  to {
    opacity:
      1;

    transform:
      translateY(
        0
      );
  }

}


/* ========================================
   RESPONSIVE DROPDOWNS
======================================== */

@media (
  max-width:
  760px
) {

  .lead-operations-workspace
  details.lead-workflow-step
  > .lead-workflow-step-header {
    grid-template-columns:
      40px
      minmax(
        0,
        1fr
      )
      34px;
  }

  .lead-workflow-dropdown-icon {
    width:
      32px;

    height:
      32px;

    border-radius:
      10px;
  }

}