.crm-email {
  min-width: 0;
  overflow-wrap: anywhere;
}
.crm-email-tabs,
.crm-email-actions,
.crm-email-entry-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.crm-email-tabs {
  margin: 18px 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.crm-email-tabs button[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}
.crm-email-readiness,
.crm-email-rule,
.crm-email-entry {
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}
.crm-email-readiness p:last-child,
.crm-email-entry p:last-child {
  margin-bottom: 0;
}
.crm-email-content > form {
  margin-top: 18px;
}
.crm-email .check-label {
  align-items: start;
}
.crm-email .check-label input {
  margin-top: 4px;
  flex-shrink: 0;
}
.crm-email textarea {
  min-height: 180px;
  resize: vertical;
}
.crm-email-variables {
  margin: 16px 0 22px;
  padding: 12px;
  background: var(--surface-soft);
  border-radius: 10px;
}
.crm-email summary {
  cursor: pointer;
  font-weight: 600;
}
.crm-email-variables ul {
  padding-left: 20px;
}
.crm-email-variables li {
  margin: 7px 0;
}
.crm-email-variables code {
  color: var(--accent);
}
.crm-email-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  line-height: 1.7;
}
.crm-email-actions {
  margin: 16px 0;
}
.crm-email-entry-heading {
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
}
.crm-email-entry-heading h3 {
  min-width: 0;
  margin: 0;
}
.crm-email-status {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8rem;
  background: var(--surface);
}
.crm-email-error {
  color: var(--danger);
  background: var(--danger-bg);
  border-radius: 8px;
  padding: 12px;
}
.crm-email-success {
  color: var(--success);
  background: var(--success-bg);
  border-radius: 8px;
  padding: 12px;
}
.crm-email-meeting-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.crm-email .crm-email-meeting-message {
  min-height: 110px;
}
.crm-email-calendar {
  margin: 16px 0;
  padding: 14px;
  border-radius: 10px;
  background: var(--accent-soft);
}
.crm-email-calendar p {
  margin: 8px 0 0;
}
@media (max-width: 600px) {
  .crm-email-meeting-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .crm-email-tabs button {
    flex: 1 1 42%;
  }
  .crm-email-actions button {
    flex: 1 1 100%;
  }
  .crm-email-rule,
  .crm-email-entry,
  .crm-email-readiness {
    padding: 12px;
  }
}
