.bot-settings-page {
  max-width: 1200px;
  margin: 0 auto;
}
.bot-settings-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  overflow: auto;
}
.bot-settings-tabs button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-dark);
  color: var(--text-secondary);
}
.bot-settings-tabs button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.bot-settings-panel {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-dark);
}
.bot-settings-panel-head h3 {
  margin: 0 0 0.35rem;
}
.bot-settings-panel-head p {
  margin: 0 0 1.25rem;
  color: var(--text-secondary);
}
.bot-settings-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.bot-settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.bot-settings-field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.bot-settings-field select,
.bot-settings-field input[type="number"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-darker);
  color: var(--text-primary);
}
.bot-settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}
.bot-settings-actions button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
@media (max-width: 760px) {
  .bot-settings-fields {
    grid-template-columns: 1fr;
  }
}
.voice-profiles-toolbar {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.voice-profiles-toolbar button,
.voice-profile-remove {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.voice-profiles-list {
  grid-column: 1/-1;
  display: grid;
  gap: 1rem;
}
.voice-profile-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-darker);
}
.voice-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.voice-profile-head h4 {
  margin: 0;
}
.voice-profile-remove {
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(231, 76, 60, 0.4);
  border-radius: 7px;
  background: rgba(231, 76, 60, 0.08);
  color: #e74c3c;
}
.voice-profile-remove:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.bot-settings-field input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-dark);
  color: var(--text-primary);
}
.settings-field-disabled {
  display: none;
}
.bot-settings-field input[type="url"],
.bot-settings-field textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-darker);
  color: var(--text-primary);
}
.bot-settings-field textarea {
  min-height: 90px;
  resize: vertical;
}
.bot-settings-field select[multiple] {
  min-height: 170px;
}
.bot-settings-field small {
  color: var(--text-muted);
}
.settings-list-editor {
  grid-column: 1/-1;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-darker);
}
.settings-list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.settings-list-toolbar h4 {
  margin: 0;
}
.settings-list-toolbar > div {
  display: flex;
  gap: 0.5rem;
}
.settings-list-toolbar select,
.settings-list-toolbar button,
.ordered-role-row button {
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-dark);
  color: var(--text-primary);
}
.ordered-role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.7rem;
  border-top: 1px solid var(--border);
}
.ordered-role-row > div {
  display: flex;
  gap: 0.3rem;
}
.unit-card input[type="color"] {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-dark);
}
.unit-card-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.unit-card-actions > button:not(.voice-profile-remove) {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-dark);
  color: var(--text-primary);
}
.unit-card-actions > button:disabled {
  opacity: 0.35;
}
