/* Astra product-wide foundations: fixed geometry, readable controls, one accent system. */
:root {
  color-scheme: dark;
  --focus: #ba9cff;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
:is(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.discord-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.avatar,
.select-avatar,
.server-icon,
.guild-icon-large {
  overflow: hidden;
  flex-shrink: 0;
}
#dashboardApp .server-menu {
  max-height: min(60vh, 480px);
  overflow-y: auto;
  z-index: 30;
}
#dashboardApp .server-menu button {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 62px;
}
#dashboardApp .server-menu button > span:last-child {
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
#dashboardApp .server-menu .server-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
}
#dashboardApp .server-switcher > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
#dashboardApp .server-switcher strong {
  max-width: none;
}
#dashboardApp .profile {
  position: relative;
  gap: 10px;
}
#dashboardApp .profile .avatar {
  width: 38px;
  height: 38px;
  background: #282333;
  border-radius: 50%;
}
.account-menu {
  position: absolute;
  right: 20px;
  top: 68px;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #15141d;
  z-index: 45;
  box-shadow: 0 16px 50px #0008;
}
.account-menu[hidden] {
  display: none;
}
.account-menu a,
.account-menu button {
  display: block;
  width: 100%;
  padding: 12px;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}
.account-menu :is(a, button):hover {
  background: #292035;
}
.content {
  max-width: 1580px;
  margin-inline: auto;
}
#dashboardApp .nav-label {
  font-size: 12px;
  letter-spacing: 0.12em;
}
#dashboardApp .nav-item {
  font-size: 14px;
  min-height: 42px;
}
#dashboardApp
  :is(
    .page-heading p,
    .panel-head p,
    .feature-card p,
    .antinuke-card p,
    .setting-row p,
    .log-card p,
    .config-title p
  ) {
  font-size: 14px;
  line-height: 1.6;
}
#dashboardApp
  :is(.feature-card h3, .antinuke-card h3, .panel-head h2, .setting-row h2) {
  font-size: 16px;
}
#dashboardApp :is(.feature-card, .antinuke-card, .log-card) {
  padding: 22px;
  border-radius: 16px;
  border-color: #2a2835;
  background: linear-gradient(130deg, #16151e, #101016);
}
.feature-bottom small,
.anti-footer > span {
  font-size: 12px !important;
  line-height: 1.5;
}
.feature-bottom {
  gap: 10px;
  align-items: center;
}
.feature-bottom small {
  flex: 1;
}
body .switch,
body #dashboardApp .switch {
  position: relative !important;
  display: inline-block !important;
  flex: 0 0 44px !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  border: 1px solid #514a61 !important;
  border-radius: 20px !important;
  background: #34303f !important;
  vertical-align: middle;
  overflow: visible !important;
  transition:
    background 0.18s,
    box-shadow 0.18s !important;
}
body .switch::before,
body #dashboardApp .switch::before {
  content: "" !important;
  position: absolute !important;
  inset: 3px auto auto 3px !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background: white !important;
  transform: translateX(0) !important;
  transition: transform 0.18s !important;
  box-shadow: 0 2px 4px #0004;
}
body .switch.on,
body #dashboardApp .switch.on {
  background: #8959ee !important;
  border-color: #aa83ff !important;
  box-shadow: 0 0 0 3px #8b5cf617;
}
body .switch.on::before,
body #dashboardApp .switch.on::before {
  transform: translateX(18px) !important;
}
.cm-toggle input {
  appearance: none !important;
  position: relative !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 26px !important;
  min-height: 26px !important;
  border-radius: 20px !important;
  padding: 0 !important;
  border: 1px solid #514a61 !important;
  background: #34303f !important;
  flex: 0 0 44px;
  cursor: pointer;
}
.cm-toggle input:after {
  position: absolute !important;
  content: "" !important;
  top: 3px !important;
  left: 3px !important;
  width: 18px !important;
  height: 18px !important;
  transform: none !important;
  background: #fff !important;
  border-radius: 50%;
  transition: transform 0.18s;
}
.cm-toggle input:checked {
  background: #8959ee !important;
  border-color: #aa83ff !important;
}
.cm-toggle input:checked:after {
  transform: translateX(18px) !important;
}
.module-master {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 0 0 24px;
  padding: 18px 22px;
  border: 1px solid #343042;
  border-radius: 14px;
  background: linear-gradient(110deg, #211932, #14131c);
}
.module-master h2 {
  margin: 0 0 5px;
  font: 700 16px Manrope;
}
.module-master p {
  margin: 0;
  color: #aaa5b7;
  font-size: 14px;
  line-height: 1.5;
}
.module-master .master-state {
  display: flex;
  gap: 12px;
  align-items: center;
  white-space: nowrap;
  font-size: 14px;
  color: #c8b5f3;
}
.sync-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  padding: 12px 16px;
  border: 1px solid #2b2936;
  border-radius: 12px;
  background: #131219;
  color: #b2adbf;
  font-size: 14px;
  line-height: 1.5;
}
.sync-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a182ed;
  flex-shrink: 0;
}
.sync-status.synced i {
  background: #4dd6aa;
}
.sync-status.retrying {
  border-color: #9d743c;
  color: #e9c593;
}
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.plan-card {
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid #35313f;
  border-radius: 18px;
  padding: 28px;
  background: linear-gradient(150deg, #1c1928, #121117);
  transition:
    transform 0.25s,
    border-color 0.25s;
}
.plan-card.featured {
  border-color: #9a6df7;
  box-shadow: 0 0 40px #8b5cf612;
}
.plan-card h2 {
  font: 800 24px Manrope;
  margin: 8px 0 16px;
}
.plan-price {
  font: 800 40px Manrope;
}
.plan-price small {
  font: 400 14px "DM Sans";
  color: #aaa3b9;
}
.plan-card ul {
  list-style: none;
  padding: 0;
  margin: 22px 0;
  flex: 1;
}
.plan-card li {
  margin: 12px 0;
  color: #c8c3d4;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  gap: 8px;
}
.plan-card li:before {
  content: "✓";
  color: #af91ec;
}
.plan-card .cm-btn {
  width: 100%;
}
.plus-badge {
  font-size: 12px !important;
  font-weight: 700;
  color: #e0c9ff;
  background: #7046a432;
  border: 1px solid #a075cd60;
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
  margin-left: 8px;
}
.premium-caption {
  color: #b6a5d6;
  font-size: 14px;
  line-height: 1.6;
}
.cm-field.premium-locked,
.cm-repeater.premium-locked {
  border: 1px solid #7553a35e;
  background: #9b69da09;
  border-radius: 12px;
  padding: 14px;
}
.upgrade-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #9463ef20;
  color: #b491f5;
  font-size: 28px;
  margin-bottom: 20px;
}
.upgrade-copy {
  font-size: 16px;
  line-height: 1.7;
  color: #b9b2c8;
}
.builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px;
}
.builder-fields {
  display: grid;
  gap: 16px;
}
.builder-preview-wrap {
  position: sticky;
  top: 0;
  align-self: start;
}
.builder-preview {
  padding: 20px;
  background: #303138;
  color: #f3f3f6;
  border-radius: 12px;
  min-height: 180px;
  font-family: "DM Sans", sans-serif;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.5;
}
.builder-preview .discord-message-body {
  background: #292a30;
  padding: 16px;
  border-left: 4px solid var(--embed-color, #9b7cff);
  border-radius: 5px;
  overflow: hidden;
}
.builder-preview h3 {
  font-size: 18px;
  margin: 8px 0;
}
.builder-preview p {
  white-space: pre-wrap;
  color: #dedee6;
  font-size: 14px;
  margin: 8px 0;
}
.builder-preview .preview-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.builder-preview .preview-field {
  flex: 1 1 100%;
  min-width: 0;
}
.builder-preview .preview-field.inline {
  flex-basis: 28%;
}
.builder-preview img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 4px;
}
.builder-preview img.thumb {
  float: right;
  width: 64px;
  height: 64px;
  object-fit: cover;
  margin: 0 0 12px 12px;
}
.builder-preview footer {
  font-size: 12px;
  color: #c3c3cb;
  margin-top: 14px;
  display: block;
  background: none;
  padding: 0;
}
.builder-preview .preview-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.builder-preview .preview-button {
  background: #565968;
  padding: 6px 10px;
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
}
.preview-note {
  font-size: 13px;
  line-height: 1.6;
  color: #a49aaf;
}
.builder-fields textarea {
  min-height: 90px;
}
.builder-fields .cm-repeat {
  margin: 8px 0;
}
.cm-dialog.builder-dialog {
  width: min(1100px, 96vw);
  overflow: hidden;
}
.cm-dialog.builder-dialog header,.cm-dialog.builder-dialog footer{flex-shrink:0}
body:has(.cm-dialog[open]){overflow:hidden}
.cm-dialog main {
  margin: 0;
}
.cm-dialog.builder-dialog main {
  max-height: 72vh;
  overflow: auto;
}
.cm-dialog .cm-field input[type="color"] {
  padding: 4px;
  width: 100%;
  min-height: 42px;
}
.platform-table td {
  max-width: 350px;
  overflow-wrap: anywhere;
}
.allinone-pricing {
  padding: 70px 0;
}
.allinone-pricing .plan-card {
  background: #12111a;
}
.allinone-pricing h2 {
  line-height: 1.3;
}
.allinone-pricing .cm-btn {
  text-align: center;
  display: block;
  text-decoration: none;
}
.allinone-pricing > p {
  color: #aaa2b9;
  font-size: 14px;
}
@media (hover: hover) {
  .plan-card:hover {
    transform: translateY(-4px);
    border-color: #b088fd;
  }
  #dashboardApp :is(.feature-card, .antinuke-card, .log-card):hover {
    transform: translateY(-3px);
    border-color: #725392;
    box-shadow: 0 10px 28px #0004;
  }
}
@media (max-width: 1050px) {
  .builder-grid {
    grid-template-columns: 1fr;
  }
  .builder-preview-wrap {
    position: static;
  }
  .plans-grid {
    grid-template-columns: 1fr;
  }
  .plan-card {
    padding: 24px;
  }
  #dashboardApp .antinuke-grid,
  #dashboardApp .server-log-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .module-master {
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
  }
  .module-master .master-state > span {
    display: none;
  }
  #dashboardApp .antinuke-grid,
  #dashboardApp .server-log-grid {
    grid-template-columns: 1fr;
  }
  .topbar .breadcrumb > span {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #dashboardApp .page-heading > .primary-button {
    font-size: 13px !important;
    min-height: 42px;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .cm-toolbar {
    gap: 8px;
  }
  .account-menu {
    top: 60px;
    right: 12px;
  }
  .plans-grid {
    gap: 14px;
  }
  .builder-preview {
    padding: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
.field input[data-value-type="boolean"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  accent-color: #a78bfa;
  cursor: pointer;
}
