:root {
  --dash-width: 1160px;
  --discord-bg: #313338;
  --discord-embed-bg: #2b2d31;
  --discord-text: #dbdee1;
  --discord-header: #f2f3f5;
  --discord-muted: #949ba4;
  --discord-link: #00a8fc;
  --discord-blurple: #5865f2;
  --discord-green: #248046;
  --discord-red: #da373c;
  --discord-gray: #4e5058;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body.dashboard-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text);
  background: var(--bg);
  font-family: "Inter", system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

/* Ambient dynamic background glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -2;
  filter: blur(140px);
}

.glow-1 {
  top: 5%;
  left: 10%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(232, 92, 91, 0.15), transparent 70%);
}

.glow-2 {
  top: 25%;
  right: 10%;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(141, 124, 255, 0.17), transparent 70%);
}

/* ==========================================================================
   TOP HEADER (NAVBAR) - BIGGER, SPACIOUS, 100% CIRCULAR AVATAR
   ========================================================================== */

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 36px), var(--dash-width));
  max-width: var(--dash-width);
  height: 84px;
  padding: 0 24px 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  background: rgba(12, 14, 25, 0.85);
  backdrop-filter: blur(30px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 35px rgba(141, 124, 255, 0.1);
  z-index: 100;
}

.site-header .header-stats {
  display: none !important;
}

.brand {
  gap: 12px;
}

.brand-sigil {
  width: 44px;
  height: 44px;
  font-size: 20px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(232, 92, 91, 0.3) 0%, rgba(141, 124, 255, 0.3) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 16px rgba(232, 92, 91, 0.25);
}

.brand-copy strong {
  font-size: 17px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  font-size: 10px;
  color: #939ab0;
}

.header-actions {
  gap: 16px;
}

.nav a {
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 12px;
}

.nav a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.nav .nav-cta {
  padding: 11px 22px;
  font-size: 14px;
  border-radius: 14px;
}

/* User Profile Avatar - Perfectly Round, Large, Animated Spin */
.account {
  position: relative;
  display: flex;
  align-items: center;
}

.account-avatar {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  -webkit-border-radius: 50% !important;
  border: 2px solid rgba(255, 255, 255, 0.25) !important;
  background: #252837 center/cover no-repeat !important;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  display: block !important;
  flex-shrink: 0 !important;
  outline: none;
  padding: 0 !important;
}

.account-avatar:hover {
  transform: scale(1.1) rotate(360deg);
  border-color: var(--accent-light) !important;
  box-shadow: 0 0 24px rgba(250, 152, 144, 0.5);
}

.account-avatar.is-animated {
  animation: avatarGlowRing 3s ease-in-out infinite alternate;
}

@keyframes avatarGlowRing {
  0% { box-shadow: 0 0 10px rgba(141, 124, 255, 0.3), 0 0 0 2px rgba(189, 180, 255, 0.4); }
  100% { box-shadow: 0 0 22px rgba(250, 152, 144, 0.55), 0 0 0 2px rgba(250, 152, 144, 0.8); }
}

.account-menu {
  top: calc(100% + 14px);
  width: 280px;
  border-radius: 22px;
  padding: 12px;
}

.menu-avatar {
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  -webkit-border-radius: 50% !important;
  border: 2px solid rgba(255, 255, 255, 0.22);
}

/* Main panel container */
.dashboard-panel {
  width: min(calc(100% - 36px), var(--dash-width));
  max-width: var(--dash-width);
  margin: 0 auto;
  padding: 125px 0 50px;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ==========================================================================
   HERO GREETING & STATUS BAR (VIEW 1) - CLEAN TEXT-ONLY GREETING
   ========================================================================== */

.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: stretch;
}

.user-greeting-card {
  padding: 26px 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(24, 27, 44, 0.75) 0%, rgba(13, 15, 26, 0.85) 100%);
  backdrop-filter: blur(24px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
}

.hero-greeting-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-badge-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fa9890;
}

.hero-greeting-copy h1 {
  margin: 2px 0 0;
  font-family: "Unbounded", "Inter", sans-serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--text);
}

.hero-greeting-copy h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #baaeff 0%, #fa9890 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-greeting-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.bot-status-card {
  min-width: 280px;
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(24, 27, 44, 0.75) 0%, rgba(13, 15, 26, 0.85) 100%);
  backdrop-filter: blur(24px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.status-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.status-badge-online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.status-pulse-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--green);
  opacity: 0.7;
  animation: pingDot 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pingDot {
  0% { transform: scale(1); opacity: 0.8; }
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

.status-label {
  font-family: "Unbounded", "Inter", sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #e9e6ff;
  letter-spacing: 0.04em;
}

.status-version {
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
}

.status-card-stats {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 12px;
}

.status-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.status-stat .stat-value {
  font-family: "Unbounded", "Inter", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.status-stat .stat-name {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.status-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   SERVERS SECTION & MODERN JUNIPER/WIAP STYLE CARDS
   ========================================================================== */

.server-area {
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(150deg, rgba(22, 25, 39, 0.75) 0%, rgba(12, 14, 23, 0.85) 100%);
  backdrop-filter: blur(24px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.section-title-wrap h2 {
  margin: 0;
  font-family: "Unbounded", "Inter", sans-serif;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}

.server-count {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  font-weight: 600;
}

/* Search Box */
.search-box {
  position: relative;
  width: 280px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  opacity: 0.6;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text);
  background: rgba(8, 10, 18, 0.6);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.search-input:focus {
  border-color: rgba(250, 152, 144, 0.6);
  background: rgba(14, 17, 28, 0.9);
  box-shadow: 0 0 0 3px rgba(250, 152, 144, 0.12);
}

/* Modern Guild Cards Grid */
.guilds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.guild-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(14, 17, 28, 0.65);
  backdrop-filter: blur(16px);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.guild-card:hover {
  transform: translateY(-4px);
  border-color: rgba(189, 180, 255, 0.35);
  background: rgba(22, 26, 42, 0.85);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 25px rgba(141, 124, 255, 0.12);
}

/* Card Banner */
.guild-card-banner {
  height: 64px;
  background: linear-gradient(135deg, rgba(141, 124, 255, 0.22) 0%, rgba(250, 152, 144, 0.18) 100%);
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.guild-card-header {
  padding: 0 18px;
  margin-top: -30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.guild-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  background: #1e2235;
  border: 3px solid #141726;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.guild-card:hover .guild-icon {
  transform: scale(1.05);
}

.guild-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.guild-icon-fallback {
  font-family: "Unbounded", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.guild-role-badge {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.guild-info {
  padding: 14px 18px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.guild-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.guild-status-dot::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.guild-name {
  margin: 3px 0 2px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guild-desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guild-card-footer {
  padding: 10px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

.guild-action {
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.guild-card:hover .guild-action {
  background: rgba(250, 152, 144, 0.2);
  border-color: rgba(250, 152, 144, 0.4);
  color: #ffc4bf;
}

.guild-action span {
  margin-left: 3px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.guild-card:hover .guild-action span {
  transform: translateX(3px);
}

/* ==========================================================================
   VIEW 2: EMBED & COMPONENTS MESSAGE BUILDER
   ========================================================================== */

.builder-panel {
  gap: 22px;
}

.builder-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(19, 22, 34, 0.75);
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

.builder-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-back-guilds {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.btn-back-guilds:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.breadcrumb-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 14px;
}

.breadcrumb-current {
  color: #fa9890;
  font-size: 13px;
  font-weight: 700;
}

.builder-guild-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guild-icon-mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: #252839 center/cover no-repeat;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.builder-guild-badge strong {
  font-size: 14px;
  color: var(--text);
}

.builder-channel-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.builder-channel-selector label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

/* 2-Column Workspace */
.builder-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* Left Column: Form */
.builder-form-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(150deg, rgba(24, 27, 42, 0.8) 0%, rgba(14, 16, 26, 0.9) 100%);
  backdrop-filter: blur(24px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.builder-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(8, 10, 18, 0.6);
}

.tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.tab-btn.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.tab-panel.is-active {
  display: flex;
}

/* Form inputs & layout */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.form-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text);
  background: rgba(11, 13, 22, 0.7);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: rgba(250, 152, 144, 0.6);
  background: rgba(18, 21, 34, 0.9);
  box-shadow: 0 0 0 3px rgba(250, 152, 144, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
}

.json-textarea {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  white-space: pre;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Switches & Toggles */
.embed-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(8, 10, 18, 0.4);
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 34px;
  transition: 0.25s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.25s;
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(18px);
}

.switch-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* Color Picker */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-input {
  width: 40px;
  height: 38px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.color-hex-input {
  width: 100px;
  text-transform: uppercase;
}

.color-presets {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.color-dot:hover {
  transform: scale(1.15);
  border-color: #fff;
}

/* Accordions with Smooth Animation and Animated Chevron */
.embed-controls,
.components-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.form-accordion {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(10, 12, 22, 0.45);
  overflow: hidden;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.form-accordion[open] {
  border-color: rgba(189, 180, 255, 0.25);
  background: rgba(15, 18, 30, 0.7);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.form-accordion summary {
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.form-accordion summary::-webkit-details-marker {
  display: none;
}

.form-accordion summary:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.form-accordion summary::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s ease;
  margin-right: 4px;
}

.form-accordion[open] summary::after {
  transform: rotate(-135deg);
  border-color: var(--accent-light);
}

.accordion-body {
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: accordionOpen 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes accordionOpen {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.badge-count {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: var(--muted);
}

/* Dynamic field & button items */
.embed-fields-list,
.buttons-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-item-card,
.button-item-card {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(17, 20, 32, 0.6);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-num {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-light);
}

.btn-delete-field,
.btn-delete-button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 6px;
  color: #ff8e8e;
  background: rgba(237, 66, 69, 0.12);
  font-size: 16px;
  cursor: pointer;
}

.btn-delete-field:hover,
.btn-delete-button:hover {
  background: rgba(237, 66, 69, 0.25);
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.btn-secondary {
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-ghost {
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.btn-small {
  align-self: flex-start;
}

.json-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* Builder Actions Footer */
.builder-actions-footer {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.actions-buttons-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.btn-primary-send {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #e85c5b 0%, #fa9890 100%);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(232, 92, 91, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.btn-primary-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(232, 92, 91, 0.5);
}

.btn-primary-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.status-feedback {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-feedback.is-success {
  background: rgba(87, 242, 135, 0.12);
  border: 1px solid rgba(87, 242, 135, 0.3);
  color: #79dba0;
}

.status-feedback.is-error {
  background: rgba(237, 66, 69, 0.12);
  border: 1px solid rgba(237, 66, 69, 0.3);
  color: #ff8e8e;
}

/* ==========================================================================
   RIGHT COLUMN: DISCORD LIVE PREVIEW MOCKUP
   ========================================================================== */

.builder-preview-card {
  position: sticky;
  top: 116px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--discord-bg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.preview-header {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.24);
  background: #2b2d31;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f2f3f5;
  font-size: 14px;
  font-weight: 700;
}

.channel-hash {
  color: #80848e;
  font-size: 16px;
}

.preview-badge {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #949ba4;
  font-size: 11px;
  font-weight: 700;
}

.discord-chat-window {
  padding: 20px 18px 26px;
  background: var(--discord-bg);
  min-height: 380px;
}

.discord-message {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
}

.discord-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1e1f22 center/cover no-repeat;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.discord-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.discord-header-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.discord-author-name {
  color: #f2f3f5;
  font-size: 14px;
  font-weight: 600;
}

.discord-bot-badge {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--discord-blurple);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.discord-timestamp {
  color: #949ba4;
  font-size: 11px;
  margin-left: 2px;
}

.discord-content {
  color: var(--discord-text);
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}

.discord-content a,
.discord-embed-desc a {
  color: var(--discord-link);
  text-decoration: none;
}

.discord-content a:hover,
.discord-embed-desc a:hover {
  text-decoration: underline;
}

/* Discord Embed Container */
.discord-embed {
  display: grid;
  grid-template-columns: 4px 1fr;
  max-width: 520px;
  border-radius: 4px;
  background: var(--discord-embed-bg);
  overflow: hidden;
  margin-top: 4px;
}

.discord-embed-left-pill {
  width: 4px;
  height: 100%;
  background: #fa9890;
}

.discord-embed-container {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  position: relative;
}

.discord-embed-author {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.discord-author-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.discord-embed-author .discord-author-name {
  font-size: 13px;
  font-weight: 700;
  color: #f2f3f5;
}

.discord-embed-title {
  grid-column: 1;
  font-size: 15px;
  font-weight: 700;
  color: #f2f3f5;
  line-height: 1.3;
}

.discord-embed-title a {
  color: var(--discord-link);
  text-decoration: none;
}

.discord-embed-title a:hover {
  text-decoration: underline;
}

.discord-embed-desc {
  grid-column: 1;
  font-size: 13px;
  color: var(--discord-text);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.discord-embed-thumb {
  grid-column: 2;
  grid-row: 2 / span 3;
  width: 76px;
  height: 76px;
  border-radius: 4px;
  object-fit: cover;
  align-self: start;
  margin-left: 8px;
}

.discord-embed-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px 14px;
  margin-top: 4px;
}

.discord-field-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.discord-field-name {
  font-size: 12px;
  font-weight: 700;
  color: #f2f3f5;
}

.discord-field-value {
  font-size: 12px;
  color: var(--discord-text);
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.discord-embed-image-wrap {
  grid-column: 1 / -1;
  margin-top: 6px;
  border-radius: 4px;
  overflow: hidden;
  max-width: 100%;
}

.discord-embed-image {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
}

.discord-embed-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--discord-muted);
}

.discord-footer-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

/* Discord Components / Buttons */
.discord-components {
  margin-top: 6px;
  max-width: 520px;
}

.discord-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.discord-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: default;
  user-select: none;
  transition: background 0.15s ease;
}

.discord-btn-primary { background: var(--discord-blurple); }
.discord-btn-primary:hover { background: #4752c4; }

.discord-btn-secondary { background: var(--discord-gray); }
.discord-btn-secondary:hover { background: #5c5e66; }

.discord-btn-success { background: var(--discord-green); }
.discord-btn-success:hover { background: #1a6334; }

.discord-btn-danger { background: var(--discord-red); }
.discord-btn-danger:hover { background: #a12828; }

.discord-btn-link { background: var(--discord-gray); }
.discord-btn-link:hover { background: #5c5e66; }

.discord-btn .btn-link-icon {
  font-size: 11px;
  opacity: 0.8;
}

/* Responsive queries */
@media (max-width: 960px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
  }
  .builder-workspace {
    grid-template-columns: 1fr;
  }
  .builder-preview-card {
    position: static;
  }
  .builder-topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .builder-channel-selector {
    width: 100%;
  }
  .section-top {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .site-header {
    height: 70px;
    padding: 0 16px;
  }
  .account-avatar {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }
  .dashboard-panel {
    width: calc(100% - 24px);
    padding: 105px 0 35px;
  }
  .server-area {
    padding: 20px 16px;
    border-radius: 20px;
  }
  .guilds {
    grid-template-columns: 1fr;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
