.af-lead-dl-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.58);
}

.af-lead-dl-modal.is-open {
  display: flex;
}

.af-lead-dl-card {
  width: min(640px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 16px;
  border: 1px solid #dce4ef;
  background: #ffffff;
  box-shadow: 0 26px 56px rgba(15, 23, 42, 0.28);
}

.af-lead-dl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #e6edf6;
}

.af-lead-dl-title {
  margin: 0;
  color: #12437a;
  font-size: 32px;
  line-height: 1.3;
}

.af-lead-dl-close {
  width: 34px;
  height: 34px;
  border: 1px solid #cdd8e6;
  border-radius: 8px;
  background: #fff;
  color: #4f5f73;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.af-lead-dl-body {
  padding: 20px;
}

.af-lead-dl-note {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.7;
  color: #415166;
}

.af-lead-dl-form {
  display: grid;
  gap: 14px;
}

.af-lead-dl-field {
  display: grid;
  gap: 6px;
}

.af-lead-dl-field label {
  font-size: 13px;
  color: #3f4b5b;
  font-weight: 600;
}

.af-lead-dl-required {
  color: #d61f3f;
  margin-left: 4px;
}

.af-lead-dl-field input {
  width: 100%;
  height: 46px;
  border: 1px solid #d9e0ea;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  color: #1f2329;
}

.af-lead-dl-robot {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d9e4f1;
  border-radius: 10px;
  background: #f9fbfd;
  padding: 12px;
}

.af-lead-dl-robot input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: #0f6cbf;
}

.af-lead-dl-robot label {
  font-size: 16px;
  color: #1f2f45;
  cursor: pointer;
}

.af-lead-dl-robot-tip {
  margin: -6px 0 0;
  font-size: 12px;
  color: #607086;
}

.af-lead-dl-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.af-lead-dl-status {
  margin: 4px 0 0;
  min-height: 18px;
  font-size: 12px;
  color: #536579;
}

body.af-lead-dl-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .af-lead-dl-modal {
    padding: 8px;
    align-items: flex-start;
    overflow-y: auto;
  }

  .af-lead-dl-card {
    width: min(560px, 96vw);
    max-height: calc(100vh - 16px);
    border-radius: 12px;
    margin: 8px auto 0;
  }

  .af-lead-dl-head,
  .af-lead-dl-body {
    padding-left: 12px;
    padding-right: 12px;
  }

  .af-lead-dl-title {
    font-size: 24px;
    line-height: 1.2;
  }

  .af-lead-dl-note {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
  }

  .af-lead-dl-form {
    gap: 10px;
  }

  .af-lead-dl-field input {
    height: 42px;
    font-size: 16px;
  }

  .af-lead-dl-robot {
    padding: 10px;
  }

  .af-lead-dl-robot label {
    font-size: 15px;
  }

  .af-lead-dl-robot-tip {
    font-size: 11px;
  }

  .af-lead-dl-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .af-lead-dl-actions button,
  .af-lead-dl-actions .bpm-btn {
    min-height: 42px;
    font-size: 15px;
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (max-width: 480px) {
  .af-lead-dl-modal {
    padding: 4px;
  }

  .af-lead-dl-card {
    width: min(420px, 94vw);
    max-height: calc(100vh - 8px);
    border-radius: 10px;
    margin: 4px auto 0;
  }

  .af-lead-dl-head {
    padding: 10px;
  }

  .af-lead-dl-body {
    padding: 10px;
  }

  .af-lead-dl-title {
    font-size: 20px;
    line-height: 1.2;
  }

  .af-lead-dl-close {
    width: 28px;
    height: 28px;
    font-size: 18px;
    border-radius: 6px;
  }

  .af-lead-dl-note {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.4;
  }

  .af-lead-dl-form {
    gap: 8px;
  }

  .af-lead-dl-field {
    gap: 4px;
  }

  .af-lead-dl-field label {
    font-size: 13px;
  }

  .af-lead-dl-field input {
    height: 38px;
    padding: 0 10px;
    font-size: 16px;
    border-radius: 8px;
  }

  .af-lead-dl-robot {
    padding: 8px;
    border-radius: 8px;
  }

  .af-lead-dl-robot input[type="checkbox"] {
    width: 18px;
    height: 18px;
  }

  .af-lead-dl-robot label {
    font-size: 14px;
  }

  .af-lead-dl-robot-tip {
    margin-top: -4px;
    font-size: 10px;
    line-height: 1.3;
  }

  .af-lead-dl-actions {
    gap: 6px;
  }

  .af-lead-dl-actions button,
  .af-lead-dl-actions .bpm-btn {
    min-height: 38px;
    font-size: 14px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 999px;
  }

  .af-lead-dl-status {
    margin-top: 2px;
    min-height: 14px;
    font-size: 11px;
  }
}
