/* === Templates === */
#toggleTemplatePanel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #1f2937;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
#toggleTemplatePanel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.01));
  opacity: 0;
  transition: opacity 0.2s ease;
}
#toggleTemplatePanel > * {
  position: relative;
  z-index: 1;
}
#toggleTemplatePanel i {
  color: inherit;
}
#toggleTemplatePanel:hover {
  color: #111827;
  border-color: #9ca3af;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}
#toggleTemplatePanel:hover::after,
#toggleTemplatePanel:focus-visible::after {
  opacity: 1;
}
#toggleTemplatePanel:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 3px;
}
.template-card {
  border-radius: 24px;
  padding: 16px;
  background: #f3f6fb;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
  align-items: stretch;
}
.template-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
.template-card.active {
 border: 1px solid #747474;
}
.template-card .template-header {
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: inherit;
}
.template-card .template-preview {
  border-radius: 20px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #e9eef7;
  align-items: center;
}
.template-card .template-assistant,
.template-card .template-client {
  border-radius: 999px;
  padding: 10px 26px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.template-card .template-assistant {
  background: #ffffff;
}
.template-card .template-client {
  background: #2563eb;
  color: #ffffff;
}
.template-toggle-active {
  background: #111 !important;
  color: #fff !important;
  border-color: #111 !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18) !important;
}
#toggleTemplatePanel.template-toggle-active::after {
  opacity: 0;
}
