:root {
  --blurple: #5865f2;
  --blurple-2: #7289da;
  --bg: #0f1117;
  --bg-2: #161922;
  --text: #f2f3f5;
  --muted: #b5bac1;
  --border: rgba(255, 255, 255, 0.08);
  --glass: rgba(22, 25, 34, 0.72);
  --success: #3ba55d;
  --danger: #ed4245;
  --radius: 16px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
}
input,
textarea,
[contenteditable="true"],
.selectable {
  user-select: text;
  -webkit-user-select: text;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}
button:not(:disabled) { cursor: pointer; }
button:disabled,
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}
body.auth-pending { overflow: hidden; }
.hidden { display: none !important; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(88, 101, 242, 0.35), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(114, 137, 218, 0.25), transparent),
    linear-gradient(180deg, var(--bg), #0a0c12);
  z-index: -2;
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  to { filter: hue-rotate(12deg); }
}
@media (prefers-reduced-motion: reduce) {
  body::before, .auth-loader__glow, .skeleton-bar { animation: none !important; }
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.auth-loader {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}
.auth-loader__card {
  text-align: center;
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  width: min(420px, 100%);
  position: relative;
  overflow: hidden;
}
.auth-loader__glow {
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, transparent, rgba(88, 101, 242, 0.35), transparent);
  animation: spin 6s linear infinite;
  z-index: -1;
}
@keyframes spin { to { transform: rotate(360deg); } }
.logo-mark { font-size: 2.5rem; }
.logo-mark.sm { font-size: 1.4rem; }
.auth-loader__text { color: var(--muted); }
.skeleton-bar {
  height: 4px;
  border-radius: 99px;
  margin-top: 1.5rem;
  background: linear-gradient(90deg, transparent, var(--blurple), transparent);
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  position: relative;
}

.mobile-dock,
.dock-sheet,
.dock-sheet-backdrop {
  display: none;
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .main {
    padding: 1rem 1rem calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }
  .topbar h2 { font-size: 1.35rem; }
  .toast-root {
    bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
    left: 1rem;
    right: 1rem;
  }
  .toast { min-width: 0; }

  .mobile-dock {
    display: flex;
    position: fixed;
    z-index: 40;
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
    padding: 0.45rem 0.35rem;
    border-radius: 20px;
    justify-content: space-around;
    align-items: stretch;
    gap: 0.15rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
  }
  .dock-link {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.45rem 0.2rem;
    border: none;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    border-radius: 14px;
    font: inherit;
    font-size: 0.62rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, transform 0.15s;
  }
  .dock-link svg,
  .dock-link i { width: 22px; height: 22px; }
  .dock-link span {
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 0.1rem;
  }
  .dock-link.active,
  .dock-link.is-on {
    color: var(--text);
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.35), rgba(114, 137, 218, 0.15));
    box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.35);
  }
  .dock-link:active { transform: scale(0.94); }

  .dock-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
  }
  .dock-sheet-backdrop.hidden { display: none; }

  .dock-sheet {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: fixed;
    z-index: 46;
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
    padding: 0.65rem;
    border-radius: 18px;
    animation: dockSheetIn 0.28s ease;
  }
  .dock-sheet.hidden { display: none; }
  @keyframes dockSheetIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: none; }
  }
  .dock-sheet__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    text-align: left;
  }
  .dock-sheet__item:hover { background: rgba(88, 101, 242, 0.12); }
  .dock-sheet__item--danger { color: var(--danger); }
  .dock-sheet__item i { width: 20px; height: 20px; color: var(--muted); }

  .form-save-bar {
    position: sticky;
    bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    z-index: 5;
    padding: 0.75rem 0;
    margin: 0;
  }
  .form-save-bar .btn-glow { width: 100%; justify-content: center; }
}

.sidebar {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-right: 1px solid var(--border);
}

@media (max-width: 900px) {
  .app > .sidebar.glass {
    display: none !important;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
  }
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
}
.sidebar__nav { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.nav-link:hover, .nav-link:focus-visible {
  background: rgba(88, 101, 242, 0.12);
  color: var(--text);
  outline: none;
}
.nav-link.active {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.35), rgba(114, 137, 218, 0.2));
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.35);
}
.sidebar__user-label {
  margin: 0 0 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.sidebar__user-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}
.sidebar__user {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.75rem;
  margin-top: 0.35rem;
  border-top: 1px solid var(--border);
}
.sidebar__user-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}
.sidebar__user-meta strong {
  font-size: 0.92rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar__user-sub {
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar__user-id {
  font-size: 0.68rem;
  color: var(--muted);
  opacity: 0.75;
  font-family: ui-monospace, monospace;
  letter-spacing: 0.02em;
}
.btn-sidebar-logout {
  margin-top: 0.45rem;
  align-self: flex-start;
  padding: 0.4rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-sidebar-logout:hover {
  color: var(--text);
  border-color: rgba(88, 101, 242, 0.4);
  background: rgba(88, 101, 242, 0.12);
}
.avatar { border-radius: 50%; object-fit: cover; border: 2px solid rgba(88, 101, 242, 0.5); }
.link-btn {
  background: none;
  border: none;
  color: var(--blurple-2);
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
}
.link-btn:hover { text-decoration: underline; }

.main { padding: 1.5rem 2rem 3rem; min-width: 0; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; color: var(--muted); margin: 0 0 0.25rem; }
h2 { margin: 0; font-size: 1.75rem; }
.icon-btn {
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-btn:hover { border-color: rgba(88, 101, 242, 0.5); }

.view { animation: fadeIn 0.35s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--glass);
}
.stat-card--framed {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.dash-panel .dash-stats {
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.dash-panel .stat-card--framed strong {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--text), var(--blurple-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-card strong { font-size: 1.8rem; display: block; }
.stat-card span { color: var(--muted); font-size: 0.9rem; }

.dash-panel {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0;
}
.dash-panel .progress-wrap {
  margin: 0.25rem 0 1rem;
}
.dash-section__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}
.dash-actions { margin-top: 1.25rem; }

.form-save-bar {
  margin-top: 1rem;
  padding-top: 0.25rem;
}
.form-save-bar .btn-glow {
  min-width: min(100%, 280px);
}

.card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--glass);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card h3 { margin-top: 0; }

.form-grid { display: grid; gap: 1rem; }
label { display: grid; gap: 0.35rem; font-size: 0.9rem; color: var(--muted); }
input, textarea, select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font: inherit;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font: inherit;
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--blurple), #4752c4);
  color: #fff;
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.35);
}
.btn-primary:hover { box-shadow: 0 12px 32px rgba(88, 101, 242, 0.45); }
.btn-glow {
  padding: 0.85rem 1.35rem;
  font-size: 0.95rem;
  box-shadow: 0 10px 28px rgba(88, 101, 242, 0.4);
}
.btn-glow i { width: 18px; height: 18px; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-danger { background: var(--danger); color: #fff; }

.row-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

.bot-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.bot-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.bot-list__row { gap: 0.75rem; }
.bot-list__identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}
.bot-list__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(88, 101, 242, 0.35);
}
.bot-list__meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.bot-list__name {
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bot-list__handle {
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bot-list__err { font-size: 0.72rem; }
.bot-list__id { font-size: 0.68rem; font-family: ui-monospace, monospace; }
.admin-people { margin-bottom: 0.5rem; }
.bot-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bot-status-dot--on {
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(59, 165, 93, 0.55);
  animation: statusPulseOn 1.6s ease-in-out infinite;
}
.bot-status-dot--off {
  background: var(--danger);
  box-shadow: 0 0 0 0 rgba(237, 66, 69, 0.5);
  animation: statusPulseOff 1.6s ease-in-out infinite;
}
@keyframes statusPulseOn {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(59, 165, 93, 0.5); }
  50% { opacity: 0.75; box-shadow: 0 0 0 6px rgba(59, 165, 93, 0); }
}
@keyframes statusPulseOff {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(237, 66, 69, 0.45); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(237, 66, 69, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .bot-status-dot--on,
  .bot-status-dot--off { animation: none; }
}
.btn-sm { padding: 0.45rem 0.75rem; font-size: 0.82rem; }
.pill {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  background: rgba(88, 101, 242, 0.2);
}
.pill.online { background: rgba(59, 165, 93, 0.2); color: var(--success); }
.pill.error { background: rgba(237, 66, 69, 0.2); color: var(--danger); }

.progress-wrap {
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 1rem 0;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blurple), #a5b4ff);
  transition: width 0.4s ease;
}

.preview-discord {
  border-left: 4px solid var(--blurple);
  padding: 1rem;
  border-radius: 8px;
  background: #2b2d31;
  color: #dbdee1;
}
.preview-discord h4 { margin: 0 0 0.5rem; color: #fff; }

.toast-root {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  display: grid;
  gap: 0.5rem;
  z-index: 50;
}
.toast {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--border);
  min-width: 240px;
  animation: fadeIn 0.25s ease;
}
.toast.error { border-color: rgba(237, 66, 69, 0.5); }

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

.dash-separator {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}

.section-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--glass);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 1.05rem;
}
.field-label { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.35rem; display: block; }
.field-hint { font-size: 0.8rem; color: var(--muted); margin: 0.5rem 0 0; }
.input-field {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
}
.input-field.mono { font-family: ui-monospace, monospace; font-size: 0.9rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.fieldset-legend { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.check-inline { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; font-size: 0.9rem; color: var(--muted); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.toggle-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.9rem;
}
.toggle-pill input { accent-color: var(--blurple); }

.seg-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.35rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
}
.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.seg-btn i { width: 16px; height: 16px; }
.seg-btn.is-on {
  color: #fff;
  background: linear-gradient(135deg, var(--blurple), #4752c4);
  box-shadow: 0 6px 18px rgba(88, 101, 242, 0.35);
}
.seg-btn:not(.is-on):hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.embed-form fieldset { border: none; margin: 0; padding: 0; min-width: 0; }
.embed-block {
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}
.embed-block__title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.embed-block__title i { width: 16px; height: 16px; opacity: 0.85; }
.field-stack { min-width: 0; }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.switch-btn {
  width: 52px;
  height: 30px;
  border-radius: 999px;
  border: none;
  padding: 3px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.25s;
  flex-shrink: 0;
}
.switch-btn__thumb {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.switch-btn.is-on {
  background: linear-gradient(135deg, var(--blurple), #4752c4);
}
.switch-btn.is-on .switch-btn__thumb { transform: translateX(22px); }

.color-pick-btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  flex-shrink: 0;
}
.color-pick-btn__swatch {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.color-pick-btn__label { font-size: 0.65rem; color: var(--muted); font-weight: 600; }
.color-pick-btn__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.color-hex-field { flex: 1; min-width: 7rem; max-width: 120px; }

.message-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 1100px) {
  .message-layout { grid-template-columns: 1fr; }
}
.preview-sticky { position: sticky; top: 1rem; }
.color-row { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; }
.color-inputs { display: flex; gap: 0.5rem; align-items: center; }
.color-inputs input[type="color"] { width: 48px; height: 40px; border: none; background: transparent; cursor: pointer; }
.quick-colors { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.quick-color {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: var(--qc, #5865f2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: transform 0.15s, box-shadow 0.2s;
}
.quick-color__ring {
  position: absolute;
  inset: -3px;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.quick-color:hover { transform: scale(1.06); }
.quick-color.is-active .quick-color__ring { border-color: #fff; box-shadow: 0 0 12px rgba(255, 255, 255, 0.35); }

.discord-preview-pane {
  background: #313338;
  border-radius: 12px;
  padding: 1rem;
  min-height: 280px;
}
.discord-msg { display: flex; gap: 1rem; }
.discord-msg__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.discord-msg__head { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.discord-bot-tag {
  font-size: 10px; font-weight: 600; background: var(--blurple); color: #fff;
  padding: 0.1rem 0.35rem; border-radius: 4px;
}
.discord-time { font-size: 0.72rem; color: #949ba4; }
.discord-content { color: #dbdee1; font-size: 0.95rem; line-height: 1.45; margin-bottom: 0.5rem; word-break: break-word; }
.discord-emoji { height: 1.25em; width: 1.25em; vertical-align: -0.2em; display: inline; object-fit: contain; }

.discord-embed { display: flex; max-width: 520px; margin-top: 0.25rem; border-radius: 4px; overflow: hidden; }
.discord-embed__bar { width: 4px; flex-shrink: 0; }
.discord-embed__inner { flex: 1; background: #2b2d31; padding: 0.75rem 1rem 0.85rem; min-width: 0; }
.discord-embed__author { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 600; color: #fff; margin-bottom: 0.35rem; }
.discord-embed__author img { width: 24px; height: 24px; border-radius: 50%; }
.discord-embed__author a { color: #fff; text-decoration: none; }
.discord-embed__row { display: flex; gap: 1rem; }
.discord-embed__main { flex: 1; min-width: 0; }
.discord-embed__title { font-weight: 600; color: #00a8fc; font-size: 1rem; margin-bottom: 0.35rem; text-decoration: none; display: block; }
.discord-embed__desc { color: #dbdee1; font-size: 0.875rem; white-space: pre-wrap; word-break: break-word; }
.discord-embed__thumb { width: 80px; height: 80px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.discord-embed__image { max-width: 100%; border-radius: 6px; margin-top: 0.5rem; max-height: 220px; object-fit: contain; }
.discord-embed__footer { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.5rem; font-size: 0.72rem; color: #949ba4; }
.discord-embed__footer img { width: 20px; height: 20px; border-radius: 50%; }

.file-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.5rem;
}
.file-pick__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.file-pick__trigger {
  margin: 0;
}
.file-pick__trigger i { width: 16px; height: 16px; }
.file-pick__name {
  font-size: 0.82rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-field {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b5bac1' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}
.muted { color: var(--muted); }
