.bot-status {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-panel);
  margin-bottom: 18px;
}
.bot-status__dot {
  width: 8px;
  height: 8px;
  background: var(--ok);
  border-radius: 50%;
}
.bot-status > span:last-child {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-faint);
}
.bot-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}
.bot-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}
.bot-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
}
.bot-check input {
  width: 16px;
  height: 16px;
  accent-color: #8b5cf6;
}
.bot-activity,
.bot-field-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 10px;
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 8px;
  margin-top: 8px;
}
.bot-notice {
  padding: 12px 15px;
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  background: color-mix(in srgb, var(--warn) 7%, var(--bg));
  border-radius: 8px;
  color: var(--warn);
  font-size: 13px;
}
.bot-preview {
  padding: 20px;
  background: #313338;
  border: 1px solid #44464d;
  border-radius: 10px;
  color: #dbdee1;
  overflow-wrap: anywhere;
}
.bot-preview__by {
  color: #f2f3f5;
  font-weight: 600;
  margin-bottom: 10px;
}
.bot-preview__by span {
  background: #5865f2;
  color: white;
  padding: 2px 4px;
  font-size: 10px;
  border-radius: 3px;
  margin-left: 5px;
}
.bot-preview__content {
  white-space: pre-wrap;
  margin-bottom: 8px;
}
.bot-embed {
  background: #2b2d31;
  border-left: 4px solid #8b5cf6;
  border-radius: 4px;
  padding: 14px;
  overflow: hidden;
}
.bot-embed > strong {
  color: #fff;
  font-size: 16px;
}
.bot-embed p {
  white-space: pre-wrap;
  font-size: 13px;
}
.bot-embed small {
  font-size: 11px;
  color: #b5bac1;
}
.bot-embed__thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  float: right;
  border-radius: 4px;
  margin: 0 0 8px 10px;
}
.bot-embed__image {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  display: block;
  margin: 10px 0;
  border-radius: 4px;
}
.bot-embed__fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bot-embed__fields > div {
  width: 100%;
}
.bot-embed__fields > div.inline {
  width: calc(50% - 8px);
}
.bot-preview__button {
  display: inline-block;
  background: #5865f2;
  color: white;
  padding: 8px 14px;
  margin-top: 8px;
  border-radius: 4px;
  font-size: 13px;
}
.bot-preview > .dim {
  display: block;
  margin-top: 14px;
  color: #b5bac1;
  font-size: 11px;
}
.bot-placeholders {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 12px;
}
.bot-placeholders summary {
  cursor: pointer;
}
.bot-placeholders code {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 5px;
  margin: 3px 1px;
}
.bot-profile-banner {
  height: 120px;
  border-radius: 8px;
  background: linear-gradient(120deg, #3d285f, #1c263c);
  overflow: hidden;
}
.bot-profile-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bot-profile-avatar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 8px;
}
.bot-profile-avatar > img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg-panel);
  margin-top: -20px;
}
.bot-profile-avatar p {
  margin: 0;
  font-size: 12px;
}
.bot-ticket-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.bot-ticket-actions a {
  text-decoration: none;
}
.bot-ticket-actions + small {
  display: block;
}
#botView > .panel {
  margin-bottom: 18px;
}
#botView textarea {
  resize: vertical;
  min-height: 76px;
}
#botView input[type="color"] {
  height: 38px;
}
#botView select[multiple] {
  min-height: 120px;
}
#botView table td {
  max-width: 340px;
  overflow-wrap: anywhere;
}
@media (max-width: 1050px) {
  .bot-editor-grid {
    grid-template-columns: 1fr;
  }
  .bot-activity,
  .bot-field-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .bot-status > span:last-child {
    margin-left: 0;
  }
  .bot-tabs .btn {
    font-size: 12px;
    padding: 7px 10px;
  }
}

@media (max-width: 600px) {
  .content__head:has(+ [data-section="bot"]) {
    grid-template-columns: 1fr;
  }
  .content__head:has(+ [data-section="bot"]) .content__actions {
    grid-column: 1;
    grid-row: 3;
    flex-wrap: wrap;
  }
}
