.discord-components {
  max-width: 620px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid #1e1f22;
  border-left: 1px solid #1e1f22;
  border-radius: 9px;
  background: #2b2d31;
  box-shadow: 0 2px 5px #0003;
}

.discord-components h3 {
  margin: 0 0 12px;
  color: #f2f3f5;
  font-size: 22px;
}

.discord-components img {
  display: block;
  width: 100%;
  max-height: 340px;
  margin-top: 14px;
  border-radius: 8px;
  object-fit: cover;
}

.component-divider {
  height: 1px;
  margin: 14px 0 10px;
  background: #3f4147;
}

.button-editor {
  margin: 4px 0 18px;
  padding: 15px;
  border: 1px solid #ded6cc;
  border-radius: 12px;
  background: #fdfcf9;
}

.button-editor-title,
.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button-editor-title { justify-content: space-between; }
.button-row { margin-top: 10px; }
.button-row input:first-child { flex: 0 1 180px; }
.button-row input:nth-child(2) { flex: 1; }

.small-button,
.remove-link-button {
  width: auto;
  padding: 8px 12px;
}

.remove-link-button { background: #9b4037; }
.button-editor .muted { margin-bottom: 0; font-size: 13px; }

.component-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.component-link-button {
  padding: 8px 15px;
  border-radius: 4px;
  background: #4e5058;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 650px) {
  .button-row { align-items: stretch; flex-direction: column; }
  .button-row input:first-child { flex-basis: auto; }
  .button-row input, .button-row button { width: 100%; }
}

.discount-template-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin: 24px 0;
}

.discount-template-grid h3 { margin-top: 0; }
.discount-template-grid form > button { width: 100%; }
.template-meta { display: flex; justify-content: space-between; margin: 7px 0 14px; color: #82766c; font-size: 13px; }
.placeholder-ok { color: #357a50; }
.placeholder-missing { color: #ad5d2c; }
.section-divider { margin: 28px 0; border: 0; border-top: 1px solid #e8e1d9; }
.dm-preview { min-height: 300px; padding: 18px; border-radius: 12px; background: #313338; color: #dbdee1; }
.dm-embed { border-left: 4px solid #f6efe3; padding: 13px 15px; border-radius: 4px; background: #2b2d31; }
.dm-embed h4 { margin: 0 0 10px; color: #f2f3f5; font-size: 16px; }
.dm-website-button { display: inline-block; margin-top: 10px; padding: 8px 14px; border-radius: 4px; background: #4e5058; color: #fff; font-size: 14px; font-weight: 600; }

@media (max-width: 780px) {
  .discount-template-grid { grid-template-columns: 1fr; }
}

.moderation-preview {
  margin: 16px 0;
  padding: 14px;
  border-radius: 9px;
  background: #313338;
  color: #dbdee1;
}

.mention-preview {
  padding: 1px 3px;
  border-radius: 3px;
  background: #3c4270;
  color: #c9cdfb;
}

.private-preview-label {
  margin-bottom: 7px;
  color: #949ba4;
  font-size: 12px;
  font-weight: 600;
}
.rule-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin: 18px 0; }
.rule-options label { display: flex; align-items: center; gap: 9px; margin: 0; font-weight: 500; }
.rule-options input { width: auto; }
@media (max-width: 650px) { .rule-options { grid-template-columns: 1fr; } }

.giveaway-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 28px; }
.giveaway-grid h3 { margin-top: 0; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.duration-fields { display: grid; grid-template-columns: .8fr 1fr 1fr; gap: 12px; }
.duration-fields select { width: 100%; border: 1px solid #ded6cc; border-radius: 11px; padding: 12px 14px; background: #fdfcf9; font: inherit; }
.giveaway-preview { margin-top: 18px; color: #dbdee1; }
.giveaway-preview h4 { margin: 16px 0 3px; color: #f2f3f5; font-size: 16px; }
.giveaway-meta { margin-top: 14px; color: #b5bac1; font-size: 13px; white-space: pre-line; }
.giveaway-enter-preview { padding: 8px 15px; border-radius: 4px; background: #248046; color: #fff; font-size: 14px; font-weight: 600; }
.giveaway-detail { margin-top: 18px; padding: 18px; border-radius: 12px; background: #f7f3ee; }
.giveaway-detail ul { margin: 8px 0; padding-left: 22px; }
.table-action { width: auto; padding: 6px 10px; margin-right: 5px; font-size: 12px; }
.table-action.danger { background: #9b4037; }
.publish-ticket-panel { width: 100%; margin-top: 8px; }
.ticket-preview { margin-top: 18px; color: #dbdee1; }
.transcript-view { max-height: 420px; overflow: auto; padding: 14px; border-radius: 8px; background: #1e1f22; color: #dbdee1; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 Consolas, monospace; }
.ticket-select-preview { display: flex; justify-content: space-between; margin-top: 14px; padding: 10px 12px; border: 1px solid #1e1f22; border-radius: 4px; background: #383a40; color: #b5bac1; }
.ticket-option-preview { margin-top: 8px; color: #b5bac1; font-size: 12px; white-space: pre-line; }
.discord-content .discord-subtext { color: #949ba4; font-size: 12px; }
.discord-content pre { overflow: auto; margin: 6px 0; padding: 9px; border: 1px solid #1e1f22; border-radius: 4px; background: #1e1f22; white-space: pre-wrap; }
.discord-content pre code { padding: 0; background: transparent; }

@media (max-width: 850px) {
  .giveaway-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .two-fields, .duration-fields { grid-template-columns: 1fr; }
}
