.lead-crm-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
}

.lead-crm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 12, 24, 0.72);
}

.lead-crm-panel {
  position: relative;
  width: min(1160px, calc(100vw - 40px));
  max-height: calc(100vh - 56px);
  border: 1px solid #3f6a9e;
  border-radius: 10px;
  background: rgba(12, 31, 58, 0.82);
  padding: 12px;
  overflow: auto;
}

.lead-crm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.lead-crm-title {
  color: #dceaff;
  font-size: 14px;
  font-weight: 800;
}

.lead-crm-form {
  display: grid;
  grid-template-columns: minmax(360px, 1.6fr) 170px 210px minmax(320px, 2fr);
  gap: 7px;
  align-items: start;
}

#leadCrmLeadId {
  max-width: 100%;
}

.lead-crm-summary {
  min-height: 78px;
  resize: vertical;
  padding: 8px;
  line-height: 1.4;
}

.lead-crm-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 7px;
}

.lead-crm-timeline {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.lead-crm-item {
  border: 1px solid #456a9a;
  border-radius: 8px;
  padding: 8px;
  background: rgba(7, 24, 47, 0.68);
}

.lead-crm-item-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.lead-crm-seq {
  color: #f6c774;
  font-size: 12px;
  font-weight: 700;
}

.lead-crm-delete-btn {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #6d87ad;
  background: rgba(10, 30, 54, 0.8);
  color: #c8d8f4;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.lead-reminder-wrap {
  position: relative;
}

.lead-reminder-btn {
  min-width: 74px;
}

.lead-reminder-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 360px;
  max-height: 300px;
  overflow: auto;
  border: 1px solid #4f719f;
  border-radius: 10px;
  background: rgba(8, 24, 46, 0.96);
  box-shadow: 0 12px 22px rgba(2, 9, 18, 0.35);
  z-index: 60;
  padding: 6px;
}

.lead-reminder-item {
  width: 100%;
  border: 1px solid #4e729f;
  border-radius: 8px;
  background: rgba(15, 38, 68, 0.68);
  color: #d3e2fb;
  text-align: left;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  margin-bottom: 6px;
}

.lead-reminder-item:last-child {
  margin-bottom: 0;
}

.lead-reminder-item.is-overdue {
  border-color: #b7828e;
  background: rgba(63, 23, 37, 0.52);
}

.lead-reminder-main {
  font-size: 12px;
  font-weight: 700;
}

.lead-reminder-sub,
.lead-reminder-empty {
  color: #a8c4e8;
  font-size: 12px;
}

.lead-reminder-empty {
  padding: 8px;
}

.lead-crm-at,
.lead-crm-next,
.lead-crm-empty,
.lead-crm-loading {
  color: #9cb9df;
  font-size: 12px;
}

.lead-crm-text {
  color: #d9e7ff;
  font-size: 12px;
  margin-bottom: 6px;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .lead-crm-form {
    grid-template-columns: 1fr;
  }

  .lead-reminder-menu {
    width: min(92vw, 360px);
    left: 0;
  }
}
