@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  --bg: #111827;
  --page: #eaf0f6;
  --surface: #f8fafc;
  --surface-2: #eef3f8;
  --ink: #061426;
  --muted: #66758a;
  --line: rgba(15, 23, 42, .12);
  --side: #1f343d;
  --side-2: #274b56;
  --brand: #318fab;
  --accent: #25b6cf;
  --accent-2: #1aa8c0;
  --danger: #ef4444;
  --radius: 16px;
  --shadow: 0 14px 34px rgba(15, 23, 42, .10);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; }
a { color: inherit; }

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  max-width: 1540px;
  min-height: calc(100vh - 24px);
  margin: 12px auto;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.16);
  background: var(--page);
  box-shadow: 0 28px 80px rgba(2, 8, 23, .34);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--side);
  color: white;
  padding: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  width: 100%;
  border: 0;
  background: var(--brand);
  color: white;
  padding: 0 14px;
  cursor: pointer;
  text-align: left;
}
.brand img { width: 38px; height: 38px; border-radius: 12px; object-fit: contain; }
.brand span { font-size: 18px; font-weight: 900; letter-spacing: -.03em; }

.nav {
  display: grid;
  gap: 7px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 13px;
  text-decoration: none;
  color: #eaf2f7;
  font-size: 13px;
  font-weight: 800;
}
.nav-item:hover, .nav-item.active { background: rgba(37, 182, 207, .16); color: white; }
.nav-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: #b8eff8;
  font-size: 12px;
}

.user-card {
  margin-top: auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.055);
  padding: 14px;
}
.user-name { font-size: 13px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-sub { margin: 4px 0 12px; color: #9db1bd; font-size: 11px; font-weight: 600; }

.main {
  min-width: 0;
  padding: 22px;
  background: var(--page);
}
.stack { display: grid; gap: 16px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.page-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.055em;
}
.page-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.counter {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.search {
  width: min(100%, 320px);
  height: 42px;
  border: 1px solid rgba(15,23,42,.28);
  border-radius: 14px;
  background: #030918;
  color: white;
  padding: 0 14px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.search::placeholder { color: #8692a6; }

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 13px;
}
@media (min-width: 1360px) {
  .server-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.server-card {
  height: 190px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.server-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 16px 14px 12px;
  text-align: center;
}
.server-icon {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 12px 26px rgba(15,23,42,.14);
}
.server-icon.fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #dfe8ff, #cdf5ff);
  color: white;
  font-weight: 900;
  font-size: 14px;
}
.server-name {
  width: 100%;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.22;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.server-foot {
  border-top: 1px solid rgba(15,23,42,.10);
  background: rgba(226,232,240,.55);
  padding: 10px;
}

.section-title {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.grid {
  display: grid;
  gap: 16px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card-head {
  min-height: 52px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(15,23,42,.08);
  padding: 0 16px;
  background: rgba(226,232,240,.38);
}
.card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}
.card-body {
  display: grid;
  gap: 13px;
  padding: 16px;
}
.card-foot {
  border-top: 1px solid rgba(15,23,42,.08);
  padding: 12px 16px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--ink);
}
.field > span {
  font-size: 12px;
  font-weight: 900;
  color: #1f2a3a;
}
.field em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border-radius: 13px;
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  color: var(--ink);
  outline: none;
  padding: 11px 12px;
  min-height: 42px;
}
.field textarea {
  resize: vertical;
  line-height: 1.5;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(37,182,207,.75);
  box-shadow: 0 0 0 3px rgba(37,182,207,.14);
}
.field.check {
  grid-template-columns: 1fr auto;
  align-items: center;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid rgba(15,23,42,.08);
  padding: 11px 12px;
}
.field.check input {
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  accent-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 12px;
  border: 0;
  padding: 0 14px;
  text-decoration: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}
.btn.full { width: 100%; }
.btn.small { min-height: 34px; width: 100%; }
.btn.primary { background: var(--accent); color: white; }
.btn.primary:hover { background: var(--accent-2); }
.btn.soft { background: #dbe8ef; color: #0f2630; }
.btn.ghost { background: rgba(255,255,255,.70); color: var(--ink); border: 1px solid rgba(15,23,42,.10); }

.save-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 14px;
  background: var(--surface-2);
  padding: 13px 14px;
}
.stat span { color: var(--muted); font-size: 12px; font-weight: 800; }
.stat strong { color: var(--ink); font-size: 13px; font-weight: 900; }

.empty {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.58);
  padding: 18px;
  color: var(--muted);
  display: grid;
  gap: 5px;
}
.empty strong { color: var(--ink); }

.muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.loading,
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
}
.loading {
  color: white;
  gap: 12px;
}
.loading img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.login-card {
  width: min(420px, calc(100vw - 32px));
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.12);
  background: #eaf0f6;
  padding: 28px;
  text-align: center;
  box-shadow: 0 28px 80px rgba(0,0,0,.34);
}
.login-card img {
  width: 82px;
  height: 82px;
  object-fit: contain;
}
.login-card h1 {
  margin: 12px 0 6px;
  font-size: 30px;
  letter-spacing: -.05em;
}
.login-card p {
  color: var(--muted);
  line-height: 1.6;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 100;
  transform: translateX(-50%);
  border-radius: 14px;
  background: #061426;
  color: white;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 16px 40px rgba(0,0,0,.24);
}
.toast.bad { background: var(--danger); }

@media (max-width: 980px) {
  .app-shell {
    display: block;
    margin: 0;
    min-height: 100vh;
    border-radius: 0;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    padding: 10px;
  }
  .brand { min-height: 54px; width: 170px; }
  .brand img { width: 32px; height: 32px; }
  .nav {
    display: flex;
    overflow-x: auto;
    align-items: center;
  }
  .nav-item {
    white-space: nowrap;
    min-width: max-content;
  }
  .user-card { display: none; }
  .main { padding: 16px; }
  .page-head { display: grid; }
  .grid.two { grid-template-columns: 1fr; }
  .server-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .server-card { height: 176px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

.notice {
  border-radius: 14px;
  border: 1px solid rgba(37, 182, 207, .22);
  background: rgba(37, 182, 207, .10);
  color: #0f4855;
  padding: 12px 13px;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 700;
}

textarea[spellcheck="false"],
textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.card-body:empty {
  display: none;
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.field input[type="password"] {
  letter-spacing: .08em;
}

.icon {
  width: 15px;
  height: 15px;
  display: block;
}

.nav-mark .icon {
  width: 14px;
  height: 14px;
}

.discord-preview {
  border-radius: 16px;
  background: #313338;
  color: #dbdee1;
  padding: 14px;
  display: grid;
  gap: 10px;
  overflow: hidden;
}

.discord-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
}

.discord-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  background: #202225;
}

.discord-message {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.discord-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.discord-meta strong {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.discord-meta span {
  border-radius: 4px;
  background: #5865f2;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 4px;
}

.discord-meta em {
  color: #949ba4;
  font-style: normal;
  font-size: 11px;
}

.discord-content,
.discord-embed-desc,
.v2-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.discord-content {
  color: #dbdee1;
  font-size: 14px;
  line-height: 1.45;
}

.discord-embed,
.v2-container {
  border-left: 4px solid var(--embed-color, #5865f2);
  border-radius: 5px;
  background: #2b2d31;
  padding: 12px;
  max-width: 560px;
  display: grid;
  gap: 8px;
}

.discord-embed-title {
  color: #f2f3f5;
  font-size: 15px;
  font-weight: 800;
}

.discord-embed-desc {
  color: #dbdee1;
  font-size: 13px;
  line-height: 1.5;
}

.discord-embed-image {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
}

.discord-embed-footer {
  color: #b5bac1;
  font-size: 11px;
}

.preview-note {
  color: #aeb4bd;
  font-size: 12px;
  font-weight: 700;
}

.preview-empty {
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,.16);
  color: #aeb4bd;
  padding: 12px;
  font-size: 12px;
}

.preview-empty.bad {
  border-color: rgba(239,68,68,.45);
  color: #fecaca;
}

.json-preview {
  margin: 0;
  max-height: 360px;
  overflow: auto;
  border-radius: 12px;
  background: #1e1f22;
  color: #dbdee1;
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
}

.v2-preview {
  display: grid;
  gap: 10px;
}

.v2-container {
  background: #2b2d31;
}

.v2-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.v2-section-text {
  display: grid;
  gap: 6px;
}

.v2-accessory {
  width: 96px;
}

.v2-thumb {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  object-fit: cover;
  background: #1e1f22;
}

.v2-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.v2-gallery img {
  width: 100%;
  min-height: 92px;
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
  background: #1e1f22;
}

.v2-separator {
  border-top: 1px solid rgba(255,255,255,.10);
  margin: 4px 0;
}

.v2-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v2-button,
.v2-select {
  min-height: 34px;
  border-radius: 8px;
  border: 0;
  background: #4e5058;
  color: #fff;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
}

.v2-select {
  width: min(260px, 100%);
  justify-content: flex-start;
  text-align: left;
  background: #1e1f22;
  border: 1px solid rgba(255,255,255,.10);
}

.v2-file {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  background: #1e1f22;
  padding: 10px;
  color: #dbdee1;
  font-size: 12px;
}

@media (max-width: 680px) {
  .discord-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }
  .discord-avatar {
    width: 34px;
    height: 34px;
  }
  .v2-section {
    grid-template-columns: 1fr;
  }
  .v2-accessory,
  .v2-thumb {
    width: 100%;
    height: auto;
    max-height: 180px;
  }
}

.feature-map {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.feature-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
  background: #eef3f8;
  color: var(--ink);
  padding: 10px 12px;
  text-decoration: none;
}

.feature-pill strong {
  font-size: 12px;
  font-weight: 900;
}

.feature-pill span {
  border-radius: 999px;
  background: rgba(100,116,139,.14);
  color: #64748b;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 900;
}

.feature-pill.on {
  border-color: rgba(37,182,207,.30);
  background: rgba(37,182,207,.10);
}

.feature-pill.on span {
  background: rgba(37,182,207,.20);
  color: #0f6675;
}

.field textarea {
  min-height: 96px;
}

.field textarea[rows="4"] {
  min-height: 112px;
}

.field textarea[rows="16"],
.field textarea[rows="18"],
.field textarea[rows="22"] {
  min-height: 360px;
}

.config-group {
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 15px;
  background: rgba(238,243,248,.72);
  overflow: hidden;
}

.config-group + .config-group {
  margin-top: 2px;
}

.config-group summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 13px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.config-group summary::-webkit-details-marker {
  display: none;
}

.config-group summary::after {
  content: "⌄";
  color: #64748b;
  font-size: 16px;
  transform: rotate(-90deg);
  transition: transform .16s ease;
}

.config-group[open] summary::after {
  transform: rotate(0deg);
}

.config-group summary em {
  margin-left: auto;
  color: #64748b;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}

.config-group-body {
  display: grid;
  gap: 12px;
  padding: 0 13px 13px;
}

.live-preview-slot {
  min-width: 0;
}

.card:has(.live-preview-slot) .card-body {
  background: #313338;
}

.card:has(.live-preview-slot) .card-head {
  background: #25272d;
  border-bottom-color: rgba(255,255,255,.08);
}

.card:has(.live-preview-slot) .card-head h3 {
  color: #f2f3f5;
}

@supports not selector(:has(*)) {
  .live-preview-slot {
    border-radius: 16px;
    background: #313338;
  }
}

@media (max-width: 720px) {
  .config-group summary {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 10px 13px;
  }
  .config-group summary em {
    margin-left: 0;
  }
}

.builder {
  display: grid;
  gap: 12px;
}

.builder-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn.mini {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 10px;
}

.builder-list {
  display: grid;
  gap: 10px;
}

.builder-item {
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 14px;
  background: rgba(255,255,255,.62);
  overflow: hidden;
}

.builder-item-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  background: rgba(226,232,240,.62);
  border-bottom: 1px solid rgba(15,23,42,.08);
}

.builder-item-head strong {
  font-size: 12px;
  font-weight: 950;
  color: var(--ink);
}

.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.builder-item-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.builder-item-body .mini-field:has(textarea),
.builder-item-body .mini-field:nth-child(2),
.builder-item-body .mini-field:nth-child(7) {
  grid-column: 1 / -1;
}

.mini-field,
.mini-check {
  display: grid;
  gap: 6px;
}

.mini-field span,
.mini-check span {
  color: #1f2a3a;
  font-size: 11px;
  font-weight: 900;
}

.mini-field input,
.mini-field textarea,
.mini-field select {
  width: 100%;
  border-radius: 11px;
  border: 1px solid rgba(15,23,42,.12);
  background: #fff;
  color: var(--ink);
  outline: none;
  padding: 9px 10px;
  min-height: 36px;
  font-size: 12px;
}

.mini-field textarea {
  resize: vertical;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.mini-check {
  grid-template-columns: 1fr auto;
  align-items: center;
  border-radius: 11px;
  background: rgba(238,243,248,.75);
  padding: 9px 10px;
}

@media (max-width: 720px) {
  .builder-item-body {
    grid-template-columns: 1fr;
  }
}

.brand {
  background: transparent !important;
  padding: 0 4px !important;
  min-height: 58px !important;
}

.brand img {
  background: transparent !important;
}

.brand span {
  background: transparent !important;
}

.multi-picker,
.mini-multi {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 13px;
  background: rgba(255,255,255,.58);
  padding: 11px;
}

.multi-picker-title,
.mini-multi > span {
  color: #1f2a3a;
  font-size: 12px;
  font-weight: 950;
}

.multi-picker-list,
.mini-multi-list {
  display: grid;
  gap: 6px;
  max-height: 210px;
  overflow: auto;
  padding-right: 4px;
}

.multi-option,
.mini-multi-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border-radius: 10px;
  background: rgba(238,243,248,.82);
  padding: 7px 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.multi-option input,
.mini-multi-list input {
  accent-color: var(--accent);
}

.mini-multi {
  grid-column: 1 / -1;
}

/* Final visual polish */
.brand {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.brand:hover {
  background: rgba(255,255,255,.04) !important;
}

.card-body > div:empty,
.stack > div:empty,
.grid > div:empty,
section:empty {
  display: none !important;
}

.card-body {
  align-content: start;
}

.grid.two {
  align-items: start;
}

.v2-button.style-1 { background: #5865f2; }
.v2-button.style-2 { background: #4e5058; }
.v2-button.style-3 { background: #248046; }
.v2-button.style-4 { background: #da373c; }
.v2-button.style-5 { background: #4e5058; color: #00a8fc; }

.discord-preview {
  min-height: 0;
}

.discord-embed,
.v2-container {
  width: min(100%, 560px);
}

.v2-container .v2-container {
  width: 100%;
  border-left-width: 3px;
}

.notice {
  margin: 0;
}

.field select {
  cursor: pointer;
}

/* Full final dashboard fixes */
.multi-select,
.mini-multi-select {
  position: relative;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 13px;
  background: #fff;
  overflow: visible;
}

.multi-select summary,
.mini-multi-select summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  padding: 0 12px;
}

.multi-select summary::-webkit-details-marker,
.mini-multi-select summary::-webkit-details-marker {
  display: none;
}

.multi-select summary span,
.mini-multi-select summary span {
  color: #1f2a3a;
  font-size: 12px;
  font-weight: 950;
}

.multi-select summary strong,
.mini-multi-select summary strong {
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.multi-select summary::after,
.mini-multi-select summary::after {
  content: "⌄";
  color: #64748b;
  font-size: 15px;
}

.multi-select-panel {
  display: grid;
  gap: 6px;
  max-height: 250px;
  overflow: auto;
  padding: 10px;
  border-top: 1px solid rgba(15,23,42,.08);
  background: rgba(248,250,252,.98);
  border-radius: 0 0 13px 13px;
}

.multi-select:not([open]) .multi-select-panel,
.mini-multi-select:not([open]) .multi-select-panel {
  display: none;
}

.multi-option {
  min-height: 34px;
  border-radius: 10px;
  background: rgba(238,243,248,.85);
}

.card-body > :empty,
.builder-list > :empty,
.grid > :empty,
.stack > :empty {
  display: none !important;
}

.grid.two {
  align-items: start;
}

.card {
  height: auto;
}

.builder-item-body {
  align-items: start;
}

.sidebar .brand {
  background: transparent !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
}

.sidebar .brand span {
  background: transparent !important;
}

.v2-button.style-1 { background: #5865f2; }
.v2-button.style-2 { background: #4e5058; }
.v2-button.style-3 { background: #248046; }
.v2-button.style-4 { background: #da373c; }
.v2-button.style-5 { background: #4e5058; color: #00a8fc; }

.discord-preview {
  min-height: 0;
}

.discord-embed,
.v2-container {
  width: min(100%, 560px);
}

.v2-container .v2-container {
  width: 100%;
  border-left-width: 3px;
}

/* Logo-inspired darker dashboard refresh */
:root {
  --bg: #0e1523;
  --page: #182432;
  --surface: #202b39;
  --surface-2: #263344;
  --ink: #edf6ff;
  --muted: #9db0c8;
  --line: rgba(148, 163, 184, .16);
  --side: #121d2b;
  --side-2: #1b2b3c;
  --brand: #25b6cf;
  --accent: #48bdf6;
  --accent-2: #5865f2;
  --danger: #ff4d6d;
}

.main,
.app-shell {
  background: var(--page) !important;
}

.card,
.server-card,
.builder-item,
.config-group,
.multi-select,
.mini-multi-select {
  background: var(--surface) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

.card-head,
.builder-item-head,
.server-foot {
  background: var(--surface-2) !important;
  border-color: var(--line) !important;
}

.card h3,
.page-head h1,
.section-title,
.server-name,
.field > span,
.config-group summary,
.builder-item-head strong,
.mini-field span,
.mini-check span,
.multi-select summary span,
.mini-multi-select summary span,
.stat strong,
.feature-pill strong {
  color: var(--ink) !important;
}

.page-head p,
.muted,
.field em,
.counter,
.config-group summary em,
.multi-select summary strong,
.mini-multi-select summary strong,
.stat span {
  color: var(--muted) !important;
}

.field input,
.field textarea,
.field select,
.mini-field input,
.mini-field textarea,
.mini-field select {
  background: #111827 !important;
  color: #edf6ff !important;
  border-color: rgba(148,163,184,.18) !important;
}

.field input::placeholder,
.field textarea::placeholder,
.mini-field input::placeholder,
.mini-field textarea::placeholder {
  color: #718096 !important;
}

.multi-select-panel {
  background: #151f2d !important;
  border-color: rgba(148,163,184,.16) !important;
}

.multi-option,
.mini-multi-list label {
  background: #202b39 !important;
  color: #edf6ff !important;
}

.btn.primary {
  background: linear-gradient(135deg, #48bdf6, #5865f2) !important;
}

.btn.soft {
  background: #25354a !important;
  color: #e5f4ff !important;
}

.btn.ghost {
  background: #111827 !important;
  color: #cbd5e1 !important;
  border-color: rgba(148,163,184,.16) !important;
}

.sidebar {
  background: linear-gradient(180deg, #101927, #142233) !important;
}

.brand {
  background: transparent !important;
}

.add-dropdown select {
  min-width: 220px;
}

.discohook-builder .builder-toolbar {
  align-items: end;
}

.nested-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.nested-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 10px;
  background: #111827;
  border: 1px solid rgba(148,163,184,.14);
  padding: 8px 10px;
}

.nested-chip strong {
  color: #edf6ff;
  font-size: 12px;
}

.notice {
  background: rgba(72, 189, 246, .10) !important;
  border-color: rgba(72, 189, 246, .26) !important;
  color: #bfeeff !important;
}

.empty {
  background: rgba(15,23,42,.45) !important;
  border-color: rgba(148,163,184,.18) !important;
  color: var(--muted) !important;
}

.feature-pill {
  background: #202b39 !important;
  border-color: rgba(148,163,184,.14) !important;
}

/* Final Discord-style Components v2 preview and UI polish */
.discord-preview {
  background: #313338 !important;
  color: #dbdee1 !important;
  border-radius: 16px !important;
  padding: 14px !important;
}

.v2-container {
  background: #2b2d31 !important;
  border-left: 4px solid var(--embed-color, #5865f2) !important;
  border-radius: 8px !important;
  padding: 12px !important;
  gap: 10px !important;
}

.v2-text {
  color: #dbdee1 !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}

.v2-section {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

.v2-thumb {
  border-radius: 8px !important;
  background: #1e1f22 !important;
}

.v2-gallery img {
  border-radius: 8px !important;
  background: #1e1f22 !important;
}

.v2-file {
  background: #1e1f22 !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 8px !important;
}

.v2-separator {
  border-top: 1px solid rgba(255,255,255,.12) !important;
}

.v2-button {
  min-height: 32px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}

.v2-button.style-1 { background: #5865f2 !important; color: #fff !important; }
.v2-button.style-2 { background: #4e5058 !important; color: #fff !important; }
.v2-button.style-3 { background: #248046 !important; color: #fff !important; }
.v2-button.style-4 { background: #da373c !important; color: #fff !important; }
.v2-button.style-5 { background: #4e5058 !important; color: #00a8fc !important; }

.v2-select {
  min-height: 40px !important;
  background: #1e1f22 !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 8px !important;
  color: #dbdee1 !important;
  justify-content: space-between !important;
}

.v2-select::after {
  content: "⌄";
  margin-left: auto;
  color: #b5bac1;
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(148,163,184,.55) !important;
  background: #111827 !important;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  vertical-align: middle;
}

input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #48bdf6, #5865f2) !important;
  border-color: transparent !important;
}

input[type="checkbox"]:checked::after {
  content: "✓";
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.server-card {
  height: 184px !important;
}

.server-foot {
  padding: 8px 10px 12px !important;
}

.server-foot .btn,
.server-card .btn {
  min-height: 30px !important;
  border-radius: 9px !important;
  font-size: 11px !important;
  width: calc(100% - 12px) !important;
  margin: 0 auto !important;
}

.discohook-builder .builder-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.add-dropdown select {
  min-width: 220px;
}

.nested-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.nested-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 10px;
  background: #111827;
  border: 1px solid rgba(148,163,184,.14);
  padding: 8px 10px;
}

.nested-chip strong {
  color: #edf6ff;
  font-size: 12px;
}
