:root {
  --bg: #111218;
  --surface: #1a1c24;
  --surface-2: #20232d;
  --surface-3: #292d39;
  --input: #12141b;
  --border: #2b2f3b;
  --border-soft: #242731;
  --text: #f5f6fa;
  --muted: #9298aa;
  --muted-2: #656b7e;
  --primary: #6d91b8;
  --primary-hover: #82a5c8;
  --danger: #ff2a12;
  --amber: #ffaa00;
  --green: #35d07f;
  --shadow: 0 18px 50px rgb(0 0 0 / 28%);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 80% -10%, rgb(109 145 184 / 9%), transparent 30%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(480px, 100%);
  padding: 48px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(145deg, rgb(32 35 45 / 98%), rgb(22 24 31 / 98%));
  box-shadow: var(--shadow);
}
.login-card h1 { margin: 10px 0 12px; font-size: clamp(30px, 5vw, 42px); }
.login-card .muted { margin: 0 auto 30px; max-width: 390px; }

.brand-mark {
  width: 76px;
  height: 76px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #08090c;
  background: linear-gradient(145deg, var(--amber), var(--primary) 62%, var(--danger));
  font-size: 40px;
  font-weight: 950;
  box-shadow: 0 15px 45px rgb(109 145 184 / 24%);
}
.brand-mark.small { width: 44px; height: 44px; margin: 0; border-radius: 13px; font-size: 24px; }
.eyebrow { margin: 0; color: var(--primary); font-size: 12px; font-weight: 900; letter-spacing: .18em; }
.muted { color: var(--muted); line-height: 1.65; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 260px;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  border-right: 1px solid var(--border-soft);
  background: rgb(20 22 29 / 97%);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 13px; padding: 0 7px 24px; border-bottom: 1px solid var(--border-soft); }
.brand strong { display: block; font-size: 17px; }
.brand span { display: block; margin-top: 3px; color: var(--muted-2); font-size: 11px; }
.navigation { display: grid; gap: 7px; margin-top: 22px; }
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
  transition: .18s ease;
}
.nav-item:hover { color: var(--text); background: var(--surface-2); }
.nav-item.active { color: var(--text); border-color: rgb(109 145 184 / 22%); background: rgb(109 145 184 / 10%); }
.nav-icon { width: 25px; height: 25px; display: grid; place-items: center; color: var(--primary); border-radius: 7px; background: rgb(109 145 184 / 12%); }
.sidebar-note { margin-top: auto; padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.sidebar-note strong { display: block; margin-bottom: 5px; font-size: 13px; }
.sidebar-note span { display: block; color: var(--muted-2); font-size: 11px; line-height: 1.5; }

.workspace { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border-soft);
  background: rgb(17 18 24 / 88%);
  backdrop-filter: blur(20px);
}
.server-picker-wrap { display: grid; grid-template-columns: auto minmax(220px, 340px); align-items: center; gap: 13px; }
.server-picker-wrap label { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-menu img { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-3); }
.user-menu strong, .user-menu span { display: block; }
.user-menu strong { font-size: 13px; }
.user-menu span { margin-top: 2px; color: var(--muted-2); font-size: 10px; }

.content { width: min(1500px, 100%); margin: 0 auto; padding: 36px 32px 70px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 28px; }
.page-heading h1 { margin: 6px 0 8px; font-size: clamp(30px, 4vw, 43px); letter-spacing: -.04em; }
.page-heading p:not(.eyebrow) { max-width: 730px; margin: 0; color: var(--muted); line-height: 1.6; }
.heading-actions { display: flex; gap: 10px; flex-shrink: 0; }
.panel-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 520px); gap: 24px; align-items: start; }
.panel-stack { display: grid; gap: 18px; }
.panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(145deg, rgb(29 31 40 / 98%), rgb(24 26 34 / 98%));
  box-shadow: 0 8px 30px rgb(0 0 0 / 10%);
}
.panel h2, .panel h3 { margin: 0; }
.panel h2 { font-size: 17px; }
.panel h3 { font-size: 14px; }
.panel > p, .panel-title-row p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.panel-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.compact-title-row { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border-soft); align-items: center; }
.conditional-fields { display: grid; gap: 17px; margin-top: 22px; }
.conditional-fields.disabled { opacity: .42; pointer-events: none; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.field { display: grid; gap: 8px; margin-top: 20px; }
.conditional-fields .field { margin-top: 0; }
.field label, .label-row label { color: #d9dce6; font-size: 12px; font-weight: 760; }
.label-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.field-help, .counter, #overlayValue { margin: 0; color: var(--muted-2); font-size: 10px; }
.required { color: var(--danger); }
code { padding: 2px 5px; border: 1px solid var(--border); border-radius: 5px; color: #b8c9d9; background: #11131a; font-size: .9em; }
input[type="text"], textarea, .select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  color: var(--text);
  background: var(--input);
  transition: border-color .15s, box-shadow .15s;
}
input[type="text"], .select { height: 45px; padding: 0 13px; }
textarea { min-height: 110px; padding: 13px; resize: vertical; line-height: 1.55; }
input[type="text"]:focus, textarea:focus, .select:focus { border-color: rgb(109 145 184 / 70%); box-shadow: 0 0 0 3px rgb(109 145 184 / 9%); }
.select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.color-input { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 8px; }
.color-input input[type="color"] { width: 46px; height: 45px; padding: 4px; border: 1px solid var(--border); border-radius: 9px; background: var(--input); cursor: pointer; }
input[type="range"] { width: 100%; accent-color: var(--primary); }
.upload-row { display: flex; gap: 9px; }
.upload-row > input { flex: 1; }
.file-button { flex: 0 0 auto; }
.file-button input { display: none; }

.switch { position: relative; width: 48px; height: 26px; display: inline-flex; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch > span { width: 100%; height: 100%; border: 1px solid #474c5e; border-radius: 999px; background: #343846; cursor: pointer; transition: .2s; }
.switch > span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: #e7e9ef; transition: .2s; }
.switch input:checked + span { border-color: var(--primary); background: var(--primary); }
.switch input:checked + span::after { transform: translateX(22px); background: #fff; }

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; pointer-events: none; }
.button.primary { color: #140b05; background: linear-gradient(135deg, var(--amber), var(--primary) 48%, #ff4a18); box-shadow: 0 10px 28px rgb(109 145 184 / 17%); }
.button.primary:hover { filter: brightness(1.08); }
.button.secondary { border-color: var(--border); color: #d8dbe5; background: var(--surface-2); }
.button.secondary:hover { border-color: #424759; background: var(--surface-3); }
.button.ghost { color: var(--muted); background: transparent; }
.button.danger { color: #ff978a; border-color: rgb(255 42 18 / 20%); background: rgb(255 42 18 / 8%); }
.button.large { min-height: 49px; padding-inline: 22px; }
.full-width { width: 100%; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; }
.icon-button:hover { color: var(--text); background: var(--surface-2); }

.preview-column { min-width: 0; }
.preview-sticky { position: sticky; top: 109px; }
.preview-label { margin: 0 0 10px; color: var(--muted-2); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.discord-preview { padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: #15171e; box-shadow: var(--shadow); }
.discord-message-head { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.bot-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #08090c; background: linear-gradient(145deg, var(--amber), var(--primary)); font-weight: 950; }
.discord-message-head strong, .discord-message-head span { display: block; }
.discord-message-head strong { font-size: 13px; }
.discord-message-head span { margin-top: 2px; color: var(--muted-2); font-size: 9px; }
.bot-tag { display: inline-block !important; margin: 0 0 0 4px !important; padding: 2px 4px; border-radius: 3px; color: #fff !important; background: #5865f2; font-size: 7px !important; }
.message-content { min-height: 18px; margin: 0 0 12px; color: #dcdee6; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.embed-preview { min-height: 74px; margin: 11px 0 14px; padding: 13px 14px; border-left: 4px solid var(--primary); border-radius: 4px 8px 8px 4px; background: #1b1d25; }
.embed-preview strong { display: block; font-size: 13px; }
.embed-preview p { margin: 7px 0 0; color: #c4c8d3; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.welcome-card-preview { position: relative; min-height: 240px; display: flex; align-items: center; gap: 28px; padding: 30px; overflow: hidden; border-radius: 9px; background-color: #09090c; background-position: center; background-size: cover; }
.card-overlay { position: absolute; inset: 0; background: rgb(0 0 0 / 58%); }
.welcome-card-preview > img { position: relative; z-index: 1; width: 118px; height: 118px; border: 5px solid #fff; border-radius: 50%; object-fit: cover; }
.card-copy { position: relative; z-index: 1; min-width: 0; }
.card-copy strong { display: block; font-size: clamp(18px, 2.2vw, 28px); line-height: 1.2; white-space: pre-line; overflow-wrap: anywhere; }
.card-copy span { display: block; margin-top: 9px; opacity: .8; font-size: 15px; line-height: 1.35; white-space: pre-line; }
.card-copy i { display: block; width: 90px; height: 4px; margin-top: 20px; background: var(--primary); }

.mapping-list { display: grid; gap: 12px; margin: 18px 0 12px; }
.mapping-row { display: grid; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(145deg, rgb(255 255 255 / 2%), transparent), var(--input); }
.mapping-row input, .mapping-row select { margin: 0; }
.mapping-header { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 10px; align-items: end; }
.mapping-emoji-field { display: grid; gap: 7px; }
.mapping-emoji-field > span, .mapping-role-heading > span { color: #dfe2eb; font-size: 11px; font-weight: 850; }
.mapping-emoji-field .emoji-input { max-width: 180px; font-size: 19px; }
.mapping-row .remove-mapping, .mapping-row .remove-role { min-width: 38px; min-height: 38px; border: 1px solid rgb(255 42 18 / 17%); border-radius: 8px; color: #ff8d80; background: rgb(255 42 18 / 7%); cursor: pointer; }
.mapping-row .remove-mapping:hover, .mapping-row .remove-role:hover { border-color: rgb(255 42 18 / 38%); background: rgb(255 42 18 / 13%); }
.mapping-role-area { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.mapping-role-heading { display: grid; gap: 3px; }
.mapping-role-heading small { color: var(--muted-2); font-size: 10px; line-height: 1.45; }
.mapping-role-list { display: grid; gap: 8px; }
.mapping-role-row { display: grid; grid-template-columns: minmax(0, 1fr) 38px; gap: 8px; }
.mapping-role-row .role-select { width: 100%; }
.mapping-row .remove-role { font-size: 20px; line-height: 1; }
.add-role-button { width: fit-content; min-height: 34px; padding-inline: 12px; font-size: 10px; }
.placeholder-help { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.placeholder-help span { margin-left: 2px; color: #b7bdca; }
.radio-card-list { display: grid; gap: 10px; margin-top: 18px; }
.radio-card { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--input); cursor: pointer; }
.radio-card:has(input:checked) { border-color: rgb(109 145 184 / 55%); background: rgb(109 145 184 / 6%); }
.radio-card input { margin-top: 3px; accent-color: var(--primary); }
.radio-card strong, .radio-card small { display: block; }
.radio-card strong { font-size: 13px; }
.radio-card small, .toggle-line small { margin-top: 4px; color: var(--muted); line-height: 1.5; }
.toggle-line { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.toggle-line strong, .toggle-line small { display: block; font-size: 12px; }
.emoji-preview { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
.emoji-chip { padding: 5px 8px; border-radius: 7px; background: #242732; font-size: 17px; }
.existing-panel { margin-top: 18px; }
.existing-list { display: grid; gap: 9px; margin-top: 16px; max-height: 430px; overflow: auto; }
.existing-item { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--input); }
.existing-item-head { display: flex; justify-content: space-between; gap: 10px; }
.existing-item strong { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.existing-item small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 10px; }
.existing-actions { display: flex; gap: 5px; margin-top: 10px; }
.existing-actions .button { min-height: 32px; padding: 0 10px; font-size: 10px; }

.empty-state { min-height: calc(100vh - 180px); display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state h2 { margin: 16px 0 6px; }
.empty-state p { margin: 0 0 22px; color: var(--muted); }
.empty-icon { width: 68px; height: 68px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 20px; color: var(--primary); background: var(--surface); font-size: 34px; }
.loading-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; align-content: center; gap: 13px; color: var(--muted); background: rgb(10 11 15 / 72%); backdrop-filter: blur(5px); }
.spinner { width: 35px; height: 35px; border: 3px solid #343845; border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 110; max-width: min(420px, calc(100vw - 44px)); padding: 13px 16px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: #242731; box-shadow: var(--shadow); font-size: 12px; }
.toast.success { border-color: rgb(53 208 127 / 28%); }
.toast.error { border-color: rgb(255 42 18 / 35%); }

@media (max-width: 1120px) {
  .panel-grid { grid-template-columns: 1fr; }
  .preview-sticky { position: static; }
  .preview-column { order: -1; }
  .reaction-layout .preview-column { order: 0; }
}
@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding-bottom: 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .navigation { grid-template-columns: 1fr 1fr; }
  .sidebar-note { display: none; }
  .workspace { display: block; }
  .topbar { position: static; height: auto; align-items: stretch; flex-direction: column; padding: 16px; }
  .server-picker-wrap { grid-template-columns: 1fr; gap: 6px; }
  .user-menu { justify-content: flex-end; }
  .content { padding: 24px 16px 50px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .two-columns { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
  .welcome-card-preview { min-height: 210px; gap: 18px; padding: 22px; }
  .welcome-card-preview > img { width: 92px; height: 92px; }
  .mapping-emoji-field .emoji-input { max-width: 150px; }
}
@media (max-width: 520px) {
  .navigation { grid-template-columns: 1fr; }
  .welcome-card-preview { flex-direction: column; text-align: center; }
  .card-copy i { margin-inline: auto; }
  .mapping-header { grid-template-columns: minmax(0, 1fr) 42px; }
  .mapping-emoji-field .emoji-input { max-width: none; }
  .mapping-role-row { grid-template-columns: minmax(0, 1fr) 38px; }
  .upload-row { flex-direction: column; }
}

/* Premium-Zugriffsverwaltung */
.login-error { margin: 18px 0 0; padding: 12px 14px; border: 1px solid rgb(255 42 18 / 35%); border-radius: 10px; color: #ffb4ab; background: rgb(255 42 18 / 8%); font-size: 12px; line-height: 1.55; text-align: left; }
.login-hint { margin: 14px 0 0; color: var(--muted-2); font-size: 10px; line-height: 1.5; }
.access-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); gap: 18px; align-items: start; }
.access-form-grid { align-items: end; }
.access-user-list { display: grid; gap: 10px; margin-top: 16px; }
.access-user-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--input); transition: opacity .2s ease, border-color .2s ease; }
.access-user-item.disabled-user { opacity: .62; }
.access-identity { min-width: 0; display: flex; align-items: center; gap: 12px; }
.access-identity img { width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 50%; object-fit: cover; background: var(--surface-3); }
.access-identity strong, .access-identity code, .access-identity small { display: block; }
.access-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.access-identity code { width: fit-content; margin-top: 4px; color: #c7cad4; background: transparent; font-size: 10px; }
.access-identity small { margin-top: 5px; color: var(--muted-2); font-size: 10px; line-height: 1.45; }
.access-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.access-actions .button { min-height: 32px; padding-inline: 10px; font-size: 10px; }
.status-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: 9px; font-weight: 850; white-space: nowrap; }
.status-badge.online { border-color: rgb(53 208 127 / 28%); color: #7ee2ad; background: rgb(53 208 127 / 8%); }
.status-badge.offline { border-color: rgb(255 42 18 / 28%); color: #ff998d; background: rgb(255 42 18 / 8%); }
.diagnostics-list { display: grid; grid-template-columns: minmax(100px, .72fr) minmax(0, 1.28fr); gap: 0; margin: 16px 0 0; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; }
.diagnostics-list dt, .diagnostics-list dd { min-width: 0; margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); font-size: 10px; line-height: 1.45; }
.diagnostics-list dt { color: var(--muted); background: var(--surface-2); font-weight: 750; }
.diagnostics-list dd { color: #d7dae4; overflow-wrap: anywhere; }
.diagnostics-list dt:nth-last-of-type(1), .diagnostics-list dd:nth-last-of-type(1) { border-bottom: 0; }
.audit-log-list { display: grid; gap: 8px; max-height: 540px; margin-top: 16px; overflow: auto; }
.audit-log-item { padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--input); }
.audit-log-item > div { display: flex; justify-content: space-between; gap: 12px; }
.audit-log-item strong { font-size: 11px; }
.audit-log-item time { color: var(--muted-2); font-size: 9px; white-space: nowrap; }
.audit-log-item small { display: block; margin-top: 5px; color: var(--muted-2); font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }

@media (max-width: 1120px) {
  .access-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .access-user-item { align-items: flex-start; flex-direction: column; }
  .access-actions { width: 100%; justify-content: flex-start; }
}
@media (max-width: 520px) {
  .diagnostics-list { grid-template-columns: 1fr; }
  .diagnostics-list dt { border-bottom: 0; }
  .access-actions .button { flex: 1; }
}

/* Bot-Profil */
.bot-avatar-image {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(145deg, var(--amber), var(--primary));
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.profile-panel { min-width: 0; }
.profile-identity-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 0%, rgb(109 145 184 / 11%), transparent 44%),
    var(--input);
}
.profile-identity-preview img {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  border: 2px solid rgb(255 255 255 / 12%);
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  box-shadow: 0 10px 24px rgb(0 0 0 / 24%);
}
.profile-identity-preview strong,
.profile-identity-preview span { display: block; }
.profile-identity-preview strong {
  max-width: 360px;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-identity-preview span {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 10px;
}
.profile-panel input[type="file"] {
  width: 100%;
  min-height: 45px;
  padding: 8px;
  border: 1px dashed #3a3f4e;
  border-radius: 9px;
  color: var(--muted);
  background: var(--input);
  cursor: pointer;
}
.profile-panel input[type="file"]::file-selector-button {
  height: 29px;
  margin-right: 10px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: #d8dbe5;
  background: var(--surface-2);
  font-weight: 800;
  cursor: pointer;
}
.compact-toggle-line { margin-bottom: 20px; }
.notice-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 15px 18px;
  border: 1px solid rgb(109 145 184 / 22%);
  border-radius: 12px;
  background: rgb(109 145 184 / 6%);
}
.notice-panel strong {
  flex: 0 0 auto;
  color: #b8c9d9;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.notice-panel span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.profile-panel.is-disabled {
  opacity: .52;
}
.profile-panel.is-disabled input,
.profile-panel.is-disabled button,
.profile-panel.is-disabled .switch {
  pointer-events: none;
}

@media (max-width: 1120px) {
  .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .notice-panel { align-items: flex-start; flex-direction: column; }
  .profile-identity-preview img { width: 58px; height: 58px; }
}

/* ========================================================================== 
   DISCORD CONTROL — MODERN NEUTRAL DESIGN
   ========================================================================== */
:root {
  --bg: #080a0f;
  --bg-deep: #05070b;
  --surface: #11141c;
  --surface-2: #171b25;
  --surface-3: #202633;
  --input: #0d1017;
  --border: rgb(255 255 255 / 8%);
  --border-soft: rgb(255 255 255 / 5%);
  --text: #f7f8fb;
  --muted: #9aa3b6;
  --muted-2: #657084;
  --primary: #6d91b8;
  --primary-hover: #82a5c8;
  --danger: #ff2a12;
  --amber: #ffaa00;
  --green: #36d98b;
  --blue: #5865f2;
  --shadow: 0 28px 80px rgb(0 0 0 / 38%);
  --soft-shadow: 0 14px 40px rgb(0 0 0 / 22%);
  --sidebar-width: 292px;
}

html { background: var(--bg-deep); }
body {
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% -10%, rgb(109 145 184 / 10%), transparent 34%),
    radial-gradient(circle at 92% 24%, rgb(255 170 0 / 5%), transparent 28%),
    linear-gradient(145deg, #080a0f 0%, #0d1017 50%, #090b11 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgb(255 255 255 / 2.5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 2.5%) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}
.ambient { position: fixed; z-index: -2; border-radius: 50%; filter: blur(100px); pointer-events: none; }
.ambient-one { top: -180px; left: 8%; width: 480px; height: 480px; background: rgb(109 145 184 / 10%); }
.ambient-two { right: -140px; bottom: 4%; width: 380px; height: 380px; background: rgb(255 170 0 / 5%); }

/* Login */
.login-view { padding: 0; }
.login-layout {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(440px, .8fr);
}
.login-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 6vw, 78px);
  overflow: hidden;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(110deg, rgb(5 7 11 / 38%), rgb(5 7 11 / 90%)),
    radial-gradient(circle at 26% 34%, rgb(109 145 184 / 16%), transparent 32%);
}
.login-hero::after {
  content: "D";
  position: absolute;
  right: -6vw;
  bottom: -18vh;
  color: rgb(255 255 255 / 1.8%);
  font-size: min(72vw, 760px);
  font-weight: 950;
  line-height: .8;
  pointer-events: none;
}
.panel-wordmark { position: relative; z-index: 1; font-size: 15px; font-weight: 900; letter-spacing: .18em; }
.panel-wordmark span { margin-right: 9px; color: var(--primary); }
.login-copy { position: relative; z-index: 1; max-width: 760px; }
.login-copy h1 { margin: 14px 0 22px; font-size: clamp(50px, 7.4vw, 108px); line-height: .94; letter-spacing: -.065em; }
.login-copy h1 span { color: transparent; background: linear-gradient(100deg, var(--amber), var(--primary) 62%, var(--danger)); background-clip: text; }
.login-copy > p:last-child { max-width: 620px; margin: 0; color: var(--muted); font-size: clamp(15px, 1.35vw, 20px); line-height: 1.75; }
.login-feature-row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 22px; color: #cfd4df; font-size: 11px; font-weight: 750; letter-spacing: .03em; }
.login-feature-row span { display: inline-flex; align-items: center; gap: 8px; }
.login-feature-row i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px rgb(54 217 139 / 60%); }
.login-card-wrap { display: grid; place-items: center; padding: 42px; }
.login-card {
  width: min(460px, 100%);
  padding: 44px;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 24px;
  text-align: left;
  background:
    linear-gradient(145deg, rgb(28 32 43 / 94%), rgb(13 16 23 / 96%));
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
}
.login-card .brand-mark { margin: 0 0 26px; }
.login-card h2 { margin: 9px 0 10px; font-size: 34px; letter-spacing: -.04em; }
.login-card .muted { margin: 0 0 26px; }
.login-button { width: 100%; margin-top: 20px; }
.discord-symbol { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: white; background: #5865f2; }

/* Shell */
.app-shell { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar {
  width: var(--sidebar-width);
  padding: 22px 18px;
  border-right-color: var(--border);
  background:
    linear-gradient(180deg, rgb(16 19 27 / 98%), rgb(8 10 15 / 98%));
  box-shadow: 18px 0 60px rgb(0 0 0 / 20%);
}
.brand { padding: 0 8px 22px; }
.brand strong { font-size: 18px; letter-spacing: -.02em; }
.brand span { color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.brand-mark { border-radius: 20px; box-shadow: 0 18px 48px rgb(109 145 184 / 24%), inset 0 1px 0 rgb(255 255 255 / 25%); }
.brand-mark.small { border-radius: 13px; }
.navigation { display: block; margin-top: 18px; overflow-y: auto; scrollbar-width: thin; }
.nav-group-label { margin: 0 10px 10px; color: #4f596b; font-size: 9px; font-weight: 900; letter-spacing: .18em; }
.nav-item {
  min-height: 52px;
  margin-bottom: 5px;
  padding: 9px 11px;
  border-radius: 12px;
  gap: 11px;
}
.nav-item:hover { border-color: rgb(255 255 255 / 5%); background: rgb(255 255 255 / 4%); }
.nav-item.active { border-color: rgb(109 145 184 / 28%); background: linear-gradient(90deg, rgb(109 145 184 / 13%), rgb(109 145 184 / 4%)); box-shadow: inset 3px 0 0 var(--primary); }
.nav-icon { width: 32px; height: 32px; border-radius: 9px; }
.nav-icon svg { width: 17px; height: 17px; fill: currentColor; }
.nav-copy { min-width: 0; display: block; }
.nav-copy strong, .nav-copy small { display: block; }
.nav-copy strong { color: inherit; font-size: 12px; }
.nav-copy small { margin-top: 3px; color: var(--muted-2); font-size: 9px; font-weight: 600; }
.module-nav-block { margin-top: 18px; padding: 10px; border: 1px solid var(--border); border-radius: 15px; background: rgb(255 255 255 / 2%); }
.module-nav-head { min-height: 46px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 2px 3px 10px; }
.module-nav-head strong, .module-nav-head small { display: block; }
.module-nav-head strong { font-size: 12px; }
.module-nav-head small { margin-top: 3px; color: var(--muted-2); font-size: 9px; }
.module-nav-items { padding-top: 8px; border-top: 1px solid var(--border-soft); }
.module-orb { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; font-size: 13px; font-weight: 950; }
.module-orb.mini { width: 34px; height: 34px; border-radius: 10px; }
.discord-orb { color: #fff; background: linear-gradient(145deg, #7380ff, #5865f2); box-shadow: 0 9px 22px rgb(88 101 242 / 20%); }
.core-orb { color: #110800; background: linear-gradient(145deg, #fff0be, var(--primary)); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #596173; }
.status-dot.online { background: var(--green); box-shadow: 0 0 14px rgb(54 217 139 / 72%); }
.status-dot.offline { background: var(--danger); box-shadow: 0 0 14px rgb(255 42 18 / 52%); }
.module-nav-button { width: 100%; border: 0; color: var(--text); background: transparent; text-align: left; cursor: pointer; }
.module-nav-button.active { color: var(--text); }
.sidebar-note { display: flex; align-items: center; gap: 10px; background: linear-gradient(145deg, rgb(109 145 184 / 8%), rgb(255 255 255 / 2%)); }
.shield-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--primary); background: rgb(109 145 184 / 10%); }

/* Topbar */
.workspace { grid-column: 2; }
.topbar {
  height: 82px;
  padding: 0 28px;
  border-bottom-color: var(--border);
  background: rgb(8 10 15 / 78%);
  box-shadow: 0 10px 40px rgb(0 0 0 / 13%);
}
.topbar-context { min-width: 190px; display: flex; align-items: center; gap: 11px; }
.topbar-context small, .topbar-context strong { display: block; }
.topbar-context small { color: var(--muted-2); font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.topbar-context strong { margin-top: 3px; font-size: 14px; }
.topbar-spacer { flex: 1; }
.server-picker-wrap { display: flex; min-width: 360px; grid-template-columns: none; }
.server-picker-wrap .select { min-width: 250px; }
.sync-button { flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface-2); }
.connection-pill { min-height: 32px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: rgb(255 255 255 / 3%); font-size: 9px; font-weight: 800; white-space: nowrap; }
.connection-pill > span { width: 7px; height: 7px; border-radius: 50%; background: #697285; }
.connection-pill.online { color: #91ebba; border-color: rgb(54 217 139 / 22%); background: rgb(54 217 139 / 6%); }
.connection-pill.online > span { background: var(--green); box-shadow: 0 0 10px rgb(54 217 139 / 60%); }
.connection-pill.offline { color: #ff9d91; border-color: rgb(255 42 18 / 25%); }
.connection-pill.offline > span { background: var(--danger); }
.user-menu { padding-left: 15px; border-left: 1px solid var(--border); }
.user-menu img { border: 1px solid rgb(255 255 255 / 12%); }
.mobile-menu { display: none; }

/* General content */
.content { width: min(1540px, 100%); padding: 34px 34px 80px; }
.page { animation: page-in .24s ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-heading { align-items: center; margin-bottom: 25px; }
.page-heading h1 { font-size: clamp(31px, 4vw, 46px); }
.panel {
  border-color: var(--border);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgb(24 28 38 / 95%), rgb(13 16 23 / 96%));
  box-shadow: var(--soft-shadow), inset 0 1px 0 rgb(255 255 255 / 3%);
}
.panel:hover { border-color: rgb(255 255 255 / 11%); }
input[type="text"], textarea, .select {
  border-color: rgb(255 255 255 / 9%);
  border-radius: 11px;
  background: rgb(5 8 13 / 68%);
}
input[type="text"], .select { height: 47px; }
input[type="text"]:focus, textarea:focus, .select:focus { border-color: rgb(109 145 184 / 78%); box-shadow: 0 0 0 4px rgb(109 145 184 / 10%); }
.select optgroup { color: #a8bfd4; background: #121620; }
.select option { color: #f5f6fa; background: #121620; }
.button { min-height: 43px; border-radius: 11px; }
.button.primary { color: #170a00; background: linear-gradient(110deg, var(--amber), var(--primary) 52%, var(--danger)); box-shadow: 0 12px 30px rgb(109 145 184 / 18%); }
.button.secondary { background: rgb(255 255 255 / 4%); }
.button.secondary:hover { border-color: rgb(109 145 184 / 25%); background: rgb(109 145 184 / 6%); }
.live-source { display: inline-flex; align-items: center; gap: 6px; color: #8edfb2; font-size: 9px; font-weight: 800; white-space: nowrap; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgb(54 217 139 / 70%); }
.discord-preview { border-radius: 16px; background: linear-gradient(145deg, #161922, #11141b); }
.preview-sticky { top: 106px; }
.welcome-card-preview { border: 1px solid rgb(255 255 255 / 8%); border-radius: 12px; }

/* Dashboard */
.dashboard-page { display: grid; gap: 24px; }
.dashboard-hero {
  min-height: 245px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(28px, 5vw, 52px);
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 22px;
  background:
    linear-gradient(112deg, rgb(15 18 25 / 82%), rgb(9 11 17 / 95%)),
    radial-gradient(circle at 74% 26%, rgb(109 145 184 / 20%), transparent 24%);
  box-shadow: var(--shadow);
}
.dashboard-hero { position: relative; }
.dashboard-hero::after { content: "CONTROL"; position: absolute; right: 2%; top: 50%; transform: translateY(-50%); color: rgb(255 255 255 / 2.5%); font-size: clamp(100px, 17vw, 260px); font-weight: 950; letter-spacing: -.08em; pointer-events: none; }
.dashboard-hero > * { position: relative; z-index: 1; }
.dashboard-hero h1 { margin: 9px 0 12px; font-size: clamp(35px, 5vw, 67px); line-height: 1; letter-spacing: -.055em; }
.dashboard-hero h1 span { color: var(--primary); }
.dashboard-hero p:not(.eyebrow) { max-width: 680px; margin: 0; color: var(--muted); line-height: 1.7; }
.hero-live { min-width: 240px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: rgb(255 255 255 / 3%); backdrop-filter: blur(12px); }
.hero-live > span { width: 11px; height: 11px; border-radius: 50%; background: var(--green); box-shadow: 0 0 18px rgb(54 217 139 / 70%); }
.hero-live small, .hero-live strong { display: block; }
.hero-live small { color: var(--muted-2); font-size: 8px; letter-spacing: .14em; }
.hero-live strong { margin-top: 4px; font-size: 11px; }
.dashboard-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stat-card { min-height: 92px; display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: 15px; background: linear-gradient(145deg, rgb(25 29 39 / 86%), rgb(12 15 21 / 90%)); }
.stat-icon { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: var(--primary); background: rgb(109 145 184 / 10%); font-size: 18px; font-weight: 950; }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { color: var(--muted-2); font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.stat-card strong { margin-top: 7px; font-size: 16px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 9px; }
.section-heading h2 { margin: 5px 0 0; font-size: 27px; }
.section-heading > span { color: var(--muted-2); font-size: 10px; }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.module-card { position: relative; min-height: 390px; display: flex; flex-direction: column; padding: 25px; overflow: hidden; border: 1px solid var(--border); border-radius: 19px; background: linear-gradient(145deg, rgb(25 29 39 / 94%), rgb(11 14 20 / 96%)); box-shadow: var(--soft-shadow); }
.module-card::after { content: ""; position: absolute; right: -70px; top: -80px; width: 220px; height: 220px; border-radius: 50%; filter: blur(3px); pointer-events: none; }
.discord-module-card::after { background: radial-gradient(circle, rgb(88 101 242 / 18%), transparent 67%); }
.module-card > * { position: relative; z-index: 1; }
.module-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 34px; }
.module-logo { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; color: #fff; font-size: 27px; font-weight: 950; }
.discord-logo { background: linear-gradient(145deg, #7c88ff, #5865f2); box-shadow: 0 16px 34px rgb(88 101 242 / 23%); }
.module-card h3 { margin: 7px 0 11px; font-size: 29px; letter-spacing: -.04em; }
.module-card p:not(.eyebrow) { max-width: 580px; margin: 0; color: var(--muted); line-height: 1.65; }
.module-feature-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0; }
.module-feature-list span { padding: 7px 9px; border: 1px solid var(--border); border-radius: 999px; color: #cdd2dc; background: rgb(255 255 255 / 3%); font-size: 9px; }
.muted-list span { color: var(--muted-2); }
.module-card-actions { display: flex; gap: 9px; margin-top: auto; }
.module-card > .button { align-self: flex-start; margin-top: auto; }
.quick-panel { margin-top: 1px; }
.dashboard-guild-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.dashboard-guild-item, .dashboard-guild-empty { min-height: 76px; display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--border); border-radius: 13px; color: var(--text); background: rgb(255 255 255 / 2.5%); text-align: left; }
.dashboard-guild-item { cursor: pointer; transition: .18s ease; }
.dashboard-guild-item:hover, .dashboard-guild-item.active { border-color: rgb(109 145 184 / 30%); background: rgb(109 145 184 / 6%); transform: translateY(-1px); }
.dashboard-guild-item img, .guild-fallback { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 13px; object-fit: cover; }
.guild-fallback { display: grid; place-items: center; color: #190b00; background: linear-gradient(145deg, var(--amber), var(--primary)); font-weight: 950; }
.dashboard-guild-item strong, .dashboard-guild-item small { display: block; }
.dashboard-guild-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-guild-item small { margin-top: 4px; color: var(--muted-2); font-size: 9px; }
.guild-arrow { margin-left: auto; color: var(--primary); }
.dashboard-guild-empty { grid-column: 1 / -1; }
.dashboard-guild-empty > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--primary); background: rgb(109 145 184 / 9%); font-size: 22px; }
.dashboard-guild-empty strong, .dashboard-guild-empty small { display: block; }
.dashboard-guild-empty small { margin-top: 4px; color: var(--muted-2); }
.dashboard-guild-empty .button { margin-left: auto; }

/* Mobile */
.mobile-backdrop { position: fixed; inset: 0; z-index: 49; background: rgb(0 0 0 / 66%); backdrop-filter: blur(3px); }
@media (max-width: 1180px) {
  .topbar { padding-inline: 20px; }
  .connection-pill { display: none; }
  .dashboard-guild-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; width: min(310px, 88vw); transform: translateX(-105%); transition: transform .22s ease; border-right: 1px solid var(--border); border-bottom: 0; }
  .sidebar.mobile-open { transform: translateX(0); }
  .workspace { margin-left: 0; }
  .mobile-menu { display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface-2); }
  .topbar-context { min-width: 0; }
  .server-picker-wrap { min-width: 0; flex: 1; }
  .server-picker-wrap label { display: none; }
  .server-picker-wrap .select { min-width: 0; }
  .login-layout { grid-template-columns: 1fr; }
  .login-hero { min-height: 56vh; border-right: 0; border-bottom: 1px solid var(--border); }
  .login-card-wrap { min-height: 44vh; }
  .module-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar { position: sticky; height: auto; min-height: 72px; flex-direction: row; align-items: center; padding: 12px 14px; }
  .topbar-context { display: none; }
  .topbar-spacer { display: none; }
  .user-menu > div { display: none; }
  .user-menu { padding-left: 0; border-left: 0; }
  .content { padding: 22px 14px 50px; }
  .dashboard-hero { min-height: 290px; align-items: flex-start; flex-direction: column; }
  .hero-live { min-width: 0; width: 100%; }
  .dashboard-stats, .module-grid, .dashboard-guild-list { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .module-card { min-height: 355px; }
  .future-features { grid-template-columns: 1fr; }
  .server-picker-wrap { width: 100%; }
  .login-card-wrap { padding: 24px 16px 42px; }
  .login-card { padding: 30px 24px; }
  .login-copy h1 { font-size: clamp(48px, 16vw, 82px); }
  .login-feature-row { gap: 12px; }
}
@media (max-width: 520px) {
  .module-card-actions { flex-direction: column; }
  .module-card-actions .button { width: 100%; }
  .dashboard-guild-empty { align-items: flex-start; flex-wrap: wrap; }
  .dashboard-guild-empty .button { width: 100%; margin-left: 0; }
  .chart-bar { width: 32px; }
}

/* --------------------------------------------------------------------------
   Discord Control – Premium-Oberfläche
   -------------------------------------------------------------------------- */

noscript {
  position: fixed;
  inset: 16px 16px auto;
  z-index: 999;
  padding: 14px 18px;
  border: 1px solid rgb(255 42 18 / 45%);
  border-radius: 12px;
  color: #ffd7d1;
  background: rgb(55 10 8 / 96%);
  box-shadow: var(--shadow);
  text-align: center;
  font-weight: 800;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 14%, rgb(109 145 184 / 7%), transparent 24%),
    radial-gradient(circle at 84% 72%, rgb(88 101 242 / 5%), transparent 26%);
}

.login-card {
  isolation: isolate;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), var(--primary), var(--danger), transparent);
}

.login-card::after {
  content: "";
  position: absolute;
  right: -110px;
  top: -100px;
  z-index: -1;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(109 145 184 / 13%), transparent 68%);
}

.login-hint {
  margin: 18px 0 0;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

.login-error {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid rgb(255 42 18 / 30%);
  border-radius: 10px;
  color: #ffc6be;
  background: rgb(255 42 18 / 7%);
  font-size: 11px;
  line-height: 1.55;
}

.action-card {
  min-height: 310px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.action-card:hover {
  transform: translateY(-4px);
  border-color: rgb(109 145 184 / 28%);
  box-shadow: 0 22px 55px rgb(0 0 0 / 28%), 0 0 0 1px rgb(109 145 184 / 5%);
}

.action-card::after {
  background: radial-gradient(circle, rgb(109 145 184 / 13%), transparent 68%);
}

.action-card:nth-child(2)::after {
  background: radial-gradient(circle, rgb(88 101 242 / 14%), transparent 68%);
}

.action-card:nth-child(3)::after {
  background: radial-gradient(circle, rgb(255 170 0 / 11%), transparent 68%);
}

.action-card:nth-child(4)::after {
  background: radial-gradient(circle, rgb(53 208 127 / 10%), transparent 68%);
}

.action-card .module-logo {
  color: #160900;
  background: linear-gradient(145deg, #ffd07c, var(--primary) 62%, var(--danger));
  box-shadow: 0 16px 34px rgb(109 145 184 / 19%);
}

.action-card:nth-child(2) .module-logo {
  color: #fff;
  background: linear-gradient(145deg, #7d88ff, #5865f2);
  box-shadow: 0 16px 34px rgb(88 101 242 / 22%);
}

.action-card:nth-child(3) .module-logo {
  background: linear-gradient(145deg, #fff0bc, var(--amber));
}

.action-card:nth-child(4) .module-logo {
  color: #07120c;
  background: linear-gradient(145deg, #9af0be, var(--green));
  box-shadow: 0 16px 34px rgb(53 208 127 / 16%);
}

.module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-panel {
  overflow: hidden;
}

.quick-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--amber), var(--primary), var(--danger));
}

.panel,
.module-card,
.stat-card,
.dashboard-hero,
.discord-preview {
  position: relative;
}

.panel::after,
.stat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgb(255 255 255 / 2.5%), transparent 38%);
}

.server-picker-wrap .select,
.select.channel-select {
  border-color: rgb(88 101 242 / 18%);
}

.select.channel-select:focus {
  border-color: rgb(109 145 184 / 72%);
}

.live-source {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #98a2b5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgb(53 208 127 / 60%);
}

@media (min-width: 1450px) {
  .module-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .action-card {
    min-height: 350px;
  }

  .action-card h3 {
    font-size: 24px;
  }
}

@media (max-width: 760px) {
  .login-hero {
    min-height: 52vh;
  }

  .login-feature-row {
    display: grid;
    gap: 9px;
  }

  .action-card {
    min-height: 300px;
  }
}

/* Discord Server Audit · v5.2 */
.module-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.audit-action::after {
  background: radial-gradient(circle, rgb(109 145 184 / 13%), transparent 68%);
}

.audit-action .module-logo {
  color: #fff;
  background: linear-gradient(145deg, #93afc8, var(--primary) 56%, var(--danger));
}

.audit-heading {
  align-items: flex-start;
}

.audit-heading > div:first-child {
  max-width: 820px;
}

.audit-running-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid rgb(109 145 184 / 28%);
  border-radius: var(--radius-lg);
  background: linear-gradient(110deg, rgb(109 145 184 / 12%), rgb(14 16 22 / 94%));
  box-shadow: 0 18px 50px rgb(0 0 0 / 18%);
}

.audit-running-banner strong,
.audit-running-banner span {
  display: block;
}

.audit-running-banner span {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 13px;
}

.audit-running-spinner {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 3px solid rgb(255 255 255 / 10%);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 850ms linear infinite;
}

.audit-empty {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 150px;
}

.audit-empty-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: 20px;
  color: #fff;
  font-weight: 900;
  font-size: 28px;
  background: linear-gradient(145deg, var(--amber), var(--primary), var(--danger));
  box-shadow: 0 18px 40px rgb(109 145 184 / 20%);
}

.audit-empty h2,
.audit-empty p {
  margin: 0;
}

.audit-empty p {
  margin-top: 6px;
  color: var(--text-muted);
}

.audit-score-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 20%, rgb(109 145 184 / 14%), transparent 34%),
    linear-gradient(145deg, rgb(23 25 34 / 98%), rgb(12 14 19 / 98%));
}

.audit-score-main {
  display: flex;
  align-items: center;
  gap: 20px;
}

.audit-score-main h2,
.audit-score-main p {
  margin: 0;
}

.audit-score-main h2 {
  margin-bottom: 4px;
  font-size: 25px;
}

.audit-score-main > div > p:last-child {
  color: var(--text-muted);
}

.audit-score-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  border: 8px solid rgb(255 255 255 / 7%);
  border-top-color: var(--primary);
  border-right-color: var(--amber);
  border-radius: 50%;
  font-size: 28px;
  font-weight: 900;
  box-shadow: inset 0 0 25px rgb(109 145 184 / 8%), 0 16px 38px rgb(0 0 0 / 20%);
}

.audit-score-ring[data-rating="good"] {
  border-top-color: var(--green);
  border-right-color: #8cf1be;
}

.audit-score-ring[data-rating="warning"] {
  border-top-color: var(--amber);
  border-right-color: var(--primary);
}

.audit-score-ring[data-rating="danger"] {
  border-top-color: var(--danger);
  border-right-color: var(--primary);
}

.audit-download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.audit-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.audit-score-card {
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgb(23 25 34 / 94%), rgb(13 15 20 / 96%));
}

.audit-score-card small,
.audit-score-card span {
  display: block;
  color: var(--text-muted);
}

.audit-score-card small {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
}

.audit-score-card strong {
  display: inline-block;
  margin: 5px 5px 0 0;
  font-size: 29px;
}

.audit-score-card span {
  display: inline;
  font-size: 12px;
}

.audit-count-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.audit-count-grid article {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgb(17 19 26 / 91%);
}

.audit-count-grid small {
  color: var(--text-muted);
}

.audit-count-grid strong {
  font-size: 20px;
}

.audit-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8f96a8;
  box-shadow: 0 0 12px currentColor;
}

.audit-dot.critical { color: var(--danger); background: var(--danger); }
.audit-dot.high { color: #ff6f55; background: #ff6f55; }
.audit-dot.medium { color: var(--amber); background: var(--amber); }
.audit-dot.low { color: #56a8ff; background: #56a8ff; }
.audit-dot.passed { color: var(--green); background: var(--green); }

.audit-filter-panel {
  margin-bottom: 18px;
}

.audit-filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0 18px;
}

.critical-only-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.critical-only-toggle input {
  accent-color: var(--danger);
}

.audit-finding-list {
  display: grid;
  gap: 12px;
}

.audit-finding {
  padding: 18px;
  border: 1px solid var(--border);
  border-left: 4px solid #8f96a8;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgb(21 23 31 / 96%), rgb(13 15 20 / 98%));
}

.audit-finding.severity-critical { border-left-color: var(--danger); }
.audit-finding.severity-high { border-left-color: #ff6f55; }
.audit-finding.severity-medium { border-left-color: var(--amber); }
.audit-finding.severity-low { border-left-color: #56a8ff; }
.audit-finding.severity-information { border-left-color: #8f96a8; }
.audit-finding.severity-passed { border-left-color: var(--green); }

.audit-finding-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.audit-finding-head > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.audit-finding-head code {
  max-width: 42%;
  color: var(--text-dim);
  font-size: 10px;
  text-align: right;
  overflow-wrap: anywhere;
}

.audit-severity,
.audit-category,
.audit-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.audit-severity.critical { color: #ff9285; border-color: rgb(255 42 18 / 35%); background: rgb(255 42 18 / 9%); }
.audit-severity.high { color: #ffa08d; border-color: rgb(255 111 85 / 32%); background: rgb(255 111 85 / 8%); }
.audit-severity.medium { color: #ffd173; border-color: rgb(255 170 0 / 32%); background: rgb(255 170 0 / 8%); }
.audit-severity.low { color: #8ec7ff; border-color: rgb(86 168 255 / 32%); background: rgb(86 168 255 / 8%); }
.audit-severity.information { color: #c0c5d1; }
.audit-severity.passed { color: #7de7b2; border-color: rgb(53 208 127 / 32%); background: rgb(53 208 127 / 8%); }
.audit-category { color: var(--text-muted); }

.audit-finding h3 {
  margin: 13px 0 4px;
  font-size: 18px;
}

.audit-object {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 12px;
}

.audit-detail-grid {
  display: grid;
  gap: 8px;
}

.audit-detail-grid > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid rgb(255 255 255 / 5%);
}

.audit-detail-grid strong {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.audit-detail-grid span {
  font-size: 13px;
  line-height: 1.55;
}

.audit-history-panel {
  margin-top: 18px;
}

.audit-history-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.audit-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgb(15 17 23 / 88%);
}

.audit-history-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.audit-history-main strong,
.audit-history-main small {
  display: block;
}

.audit-history-main small {
  margin-top: 3px;
  color: var(--text-muted);
}

.audit-status.completed { color: #7de7b2; border-color: rgb(53 208 127 / 30%); }
.audit-status.running { color: #ffd173; border-color: rgb(255 170 0 / 30%); }
.audit-status.failed { color: #ff9285; border-color: rgb(255 42 18 / 30%); }

.audit-history-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.button.compact {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 11px;
}

.button.danger {
  color: #ff9b8f;
  border-color: rgb(255 42 18 / 30%);
  background: rgb(255 42 18 / 8%);
}

.audit-list-empty {
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 1050px) {
  .audit-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-score-grid,
  .audit-count-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .audit-heading,
  .audit-score-hero,
  .audit-history-item {
    align-items: stretch;
    flex-direction: column;
  }

  .audit-heading .heading-actions,
  .audit-download-actions,
  .audit-history-actions {
    justify-content: stretch;
  }

  .audit-heading .button,
  .audit-download-actions .button,
  .audit-history-actions .button {
    flex: 1;
  }

  .audit-filter-grid,
  .audit-score-grid,
  .audit-count-grid {
    grid-template-columns: 1fr;
  }

  .audit-detail-grid > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .audit-finding-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .audit-finding-head code {
    max-width: 100%;
    text-align: left;
  }

  .audit-empty,
  .audit-score-main {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Server Audit 1.1.0 – erweiterte, designkonforme Ergebnisdarstellung */
.audit-version-meta {
  margin-top: 5px !important;
  color: var(--text-dim) !important;
  font-size: 10px;
  line-height: 1.5;
}

.audit-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.audit-status-grid article {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgb(20 22 29 / 96%), rgb(13 15 20 / 96%));
}

.audit-status-grid small,
.audit-status-grid strong {
  display: block;
}

.audit-status-grid small {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.audit-status-grid strong {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.audit-count-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.audit-dot.information {
  color: #8f96a8;
  background: #8f96a8;
}

.audit-filter-grid {
  grid-template-columns: minmax(240px, 2fr) repeat(6, minmax(130px, 1fr));
}

.audit-confidence,
.audit-accepted-risk {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.audit-confidence.confirmed {
  color: #7de7b2;
  border-color: rgb(53 208 127 / 30%);
  background: rgb(53 208 127 / 7%);
}

.audit-confidence.very_likely {
  color: #9acbff;
  border-color: rgb(86 168 255 / 30%);
  background: rgb(86 168 255 / 7%);
}

.audit-confidence.possible,
.audit-confidence.manual_review {
  color: #ffd173;
  border-color: rgb(255 170 0 / 30%);
  background: rgb(255 170 0 / 7%);
}

.audit-accepted-risk {
  color: #afc4d6;
  border-color: rgb(255 170 0 / 34%);
  background: rgb(255 170 0 / 8%);
}

.audit-change-plan {
  margin-top: 13px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgb(109 145 184 / 3%);
}

.audit-change-plan summary {
  color: var(--primary-light, #91acc5);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.audit-change-plan .audit-detail-grid {
  margin-top: 10px;
}

@media (max-width: 1280px) {
  .audit-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .audit-status-grid,
  .audit-count-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .audit-status-grid,
  .audit-count-grid {
    grid-template-columns: 1fr;
  }
}

/* === Discord Manager ====================================================
   Verwendet ausschließlich die bestehende Farbpalette und Panel-Komponenten. */
.server-editor-page { width: 100%; }
.editor-page-heading { align-items: center; }
.editor-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}
.editor-chat-panel,
.editor-live-panel { min-width: 0; }
.editor-chat-panel { display: flex; flex-direction: column; min-height: 640px; }
.editor-chat-messages {
  min-height: 260px;
  max-height: 410px;
  flex: 1;
  display: grid;
  align-content: start;
  gap: 11px;
  margin: 20px -5px 0 0;
  padding-right: 5px;
  overflow-y: auto;
}
.editor-chat-message {
  max-width: 94%;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
}
.editor-chat-message.user {
  justify-self: end;
  border-color: rgb(109 145 184 / 24%);
  background: rgb(109 145 184 / 9%);
}
.editor-chat-message-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.editor-chat-message-head span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #0b0c10;
  background: linear-gradient(145deg, var(--amber), var(--primary));
  font-size: 11px;
  font-weight: 950;
}
.editor-chat-message.user .editor-chat-message-head span { color: var(--text); background: var(--surface-3); }
.editor-chat-message-head strong { font-size: 11px; }
.editor-chat-message-head small { margin-left: auto; color: var(--muted-2); font-size: 9px; }
.editor-chat-message p { margin: 0; color: #d6d9e3; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.editor-quick-prompts { display: grid; gap: 7px; margin-top: 14px; }
.editor-quick-prompts button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgb(109 145 184 / 20%);
  border-radius: 8px;
  color: #c4d2df;
  background: rgb(109 145 184 / 6%);
  font-size: 10px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.editor-quick-prompts button:hover { border-color: rgb(109 145 184 / 42%); background: rgb(109 145 184 / 11%); }
.editor-chat-field { margin-top: 18px; padding-top: 0; }
.editor-chat-field textarea { min-height: 88px; }
.editor-prompt-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.editor-preview-head { align-items: center; }
.editor-preview-controls { display: grid; grid-template-columns: auto minmax(150px, 210px) auto; align-items: center; gap: 9px; }
.editor-preview-controls label { color: var(--muted-2); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.editor-preview-controls .select { height: 38px; }

.editor-discord-preview {
  min-height: 560px;
  display: grid;
  grid-template-columns: 300px minmax(440px, 1fr) 180px;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #171920;
  box-shadow: inset 0 1px rgb(255 255 255 / 2%);
}
.editor-discord-channels { min-width: 0; padding: 12px 10px; border-right: 1px solid #262934; background: #1b1d25; }
.editor-discord-server { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 4px 5px 15px; border-bottom: 1px solid #292c36; }
.editor-discord-server strong { min-width: 0; overflow: hidden; color: #f0f1f5; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.editor-channel-tree { display: grid; gap: 16px; padding-top: 14px; }
.editor-preview-category { min-width: 0; }
.editor-preview-category-head {
  min-width: 0;
  margin: 0 5px 4px;
  overflow: hidden;
  color: #858b9c;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.editor-preview-channel {
  width: 100%;
  min-width: 0;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  overflow: hidden;
  border: 0;
  border-radius: 5px;
  color: #9ca1b1;
  background: transparent;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.editor-preview-channel:hover { color: #d9dce5; background: #252832; }
.editor-preview-channel.active { color: #f3f4f7; background: #2a2d37; }
.editor-preview-channel.deleted { color: #ff7869; text-decoration: line-through; opacity: .55; }
.editor-preview-channel span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-discord-content { min-width: 0; display: flex; flex-direction: column; background: #1d1f27; }
.editor-discord-content > header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 16px;
  border-bottom: 1px solid #292c36;
  box-shadow: 0 1px 0 rgb(0 0 0 / 17%);
}
.editor-discord-content > header strong,
.editor-discord-content > header span { display: block; }
.editor-discord-content > header strong { max-width: 420px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.editor-discord-content > header span { max-width: 520px; margin-top: 2px; overflow: hidden; color: #73798a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.editor-discord-actions { flex-shrink: 0; color: #8990a2; font-size: 12px; }
.editor-discord-message-area { flex: 1; min-width: 0; padding: 24px 22px; overflow: hidden; }
.editor-preview-welcome { max-width: 620px; }
.editor-preview-message-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.editor-preview-message-head .bot-avatar { width: 34px; height: 34px; font-size: 12px; }
.editor-preview-message-head strong { font-size: 11px; }
.editor-preview-message-head small { margin-left: 6px; color: #6f7585; font-size: 8px; }
.editor-preview-embed {
  position: relative;
  min-height: 240px;
  max-width: 600px;
  padding: 28px;
  overflow: hidden;
  border-left: 4px solid var(--primary);
  border-radius: 5px 10px 10px 5px;
  background:
    radial-gradient(circle at 90% 25%, rgb(109 145 184 / 12%), transparent 30%),
    #14161d;
}
.editor-preview-embed::after {
  content: "N";
  position: absolute;
  top: 36px;
  right: 38px;
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(109 145 184 / 55%);
  border-radius: 24px;
  color: var(--primary);
  font-size: 48px;
  font-weight: 950;
  box-shadow: 0 0 38px rgb(109 145 184 / 10%);
}
.editor-preview-embed h3 { max-width: 70%; margin: 0 0 10px; font-size: 22px; letter-spacing: -.02em; }
.editor-preview-embed h3 span { color: var(--primary); }
.editor-preview-embed p { max-width: 70%; margin: 0; color: #b8bdca; font-size: 11px; line-height: 1.6; }
.editor-preview-embed ul { max-width: 70%; display: grid; gap: 9px; margin: 20px 0 0; padding: 0; list-style: none; color: #e1e3e9; font-size: 10px; }
.editor-preview-embed li::before { content: "◆"; margin-right: 8px; color: var(--primary); }
.editor-discord-members { min-width: 0; padding: 15px 10px; border-left: 1px solid #292c36; background: #191b22; }
.editor-member-group { margin-bottom: 17px; }
.editor-member-group > strong { display: block; margin: 0 5px 7px; color: #777d8e; font-size: 8px; text-transform: uppercase; }
.editor-member { min-width: 0; display: flex; align-items: center; gap: 7px; margin: 5px 3px; color: #aeb3c0; font-size: 10px; }
.editor-member i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #0b0c0f; background: linear-gradient(145deg, var(--amber), var(--primary)); font-style: normal; font-weight: 900; }
.editor-member span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.editor-workbench { margin-top: 24px; padding-top: 0; overflow: hidden; }
.editor-tabs { display: flex; gap: 3px; margin: 0 -24px; padding: 0 24px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.editor-tab {
  min-height: 52px;
  flex: 0 0 auto;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}
.editor-tab:hover { color: var(--text); }
.editor-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.editor-workbench-body { min-height: 260px; padding-top: 22px; }
.editor-structure-toolbar,
.editor-role-toolbar,
.editor-permission-toolbar,
.editor-typography-grid { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.editor-structure-section {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--input);
}
.editor-structure-section .editor-inline-prompt { background: var(--surface); }
.editor-structure-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #101219;
}
.editor-category-card {
  min-width: 210px;
  min-height: 100%;
  padding: 13px;
  border: 0;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
  background: transparent;
}
.editor-category-card:nth-child(4n) { border-right: 0; }
.editor-category-card.deleted { opacity: .55; background: rgb(255 42 18 / 3%); }
.editor-category-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--border-soft); }
.editor-category-card-head input { height: 35px; }
.editor-category-actions { display: flex; gap: 4px; }
.editor-mini-button { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 7px; color: var(--muted); background: var(--surface-2); cursor: pointer; }
.editor-mini-button:hover { color: var(--text); border-color: #444959; }
.editor-mini-button.danger { color: #ff8578; }
.editor-channel-edit-list { display: grid; gap: 7px; margin-top: 10px; }
.editor-channel-edit-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 30px 30px; align-items: center; gap: 6px; }
.editor-channel-edit-row input { height: 34px; }
.editor-channel-edit-row.deleted { opacity: .45; }
.editor-channel-edit-row.selected input { border-color: rgb(109 145 184 / 55%); box-shadow: 0 0 0 2px rgb(109 145 184 / 8%); }

.editor-channel-kind { color: var(--muted-2); font-size: 12px; text-align: center; }
.editor-role-layout { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 18px; }
.editor-role-list { max-height: 410px; display: grid; align-content: start; gap: 5px; overflow-y: auto; }
.editor-role-item { width: 100%; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 40px; padding: 0 11px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; text-align: left; cursor: pointer; }
.editor-role-item:hover { color: var(--text); background: var(--surface-2); }
.editor-role-item.active { color: var(--text); border-color: rgb(109 145 184 / 20%); background: rgb(109 145 184 / 8%); }
.editor-role-item.deleted { opacity: .45; text-decoration: line-through; }
.editor-role-color-dot { width: 10px; height: 10px; border-radius: 50%; }
.editor-role-item small { color: var(--muted-2); font-size: 9px; }
.editor-role-form { min-width: 0; padding: 17px; border: 1px solid var(--border); border-radius: 11px; background: var(--input); }
.editor-role-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.editor-role-form .field { margin-top: 14px; }
.editor-role-switches { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; }
.editor-permission-layout { display: grid; grid-template-columns: minmax(210px, 290px) minmax(0, 1fr); gap: 18px; }
.editor-permission-nav { display: grid; align-content: start; gap: 6px; }
.editor-permission-nav button { min-height: 40px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 800; text-align: left; cursor: pointer; }
.editor-permission-nav button.active { color: var(--text); border-color: rgb(109 145 184 / 18%); background: rgb(109 145 184 / 8%); }
.editor-permission-content { min-width: 0; }
.editor-permission-search { max-width: 420px; }
.editor-permission-groups { display: grid; gap: 14px; margin-top: 16px; }
.editor-permission-group { padding: 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--input); }
.editor-permission-group h3 { margin-bottom: 10px; color: #dfe2ea; font-size: 11px; }
.editor-permission-options { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 8px; }
.editor-permission-option { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--border-soft); border-radius: 8px; background: var(--surface); }
.editor-permission-option.danger { border-color: rgb(255 42 18 / 20%); background: rgb(255 42 18 / 5%); }
.editor-permission-option span { color: #cdd0d9; font-size: 10px; line-height: 1.35; }
.editor-channel-permission-table { display: grid; gap: 8px; margin-top: 16px; }
.editor-channel-permission-row { display: grid; grid-template-columns: minmax(190px, 1.3fr) repeat(3, minmax(150px, .8fr)); gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--input); }
.editor-channel-permission-row strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.editor-channel-permission-row .select { height: 37px; font-size: 10px; }
.editor-typography-grid { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); align-items: end; }
.editor-typography-grid .field { margin-top: 0; }
.editor-font-notice { margin-top: 17px; padding: 14px; border: 1px solid rgb(255 170 0 / 20%); border-radius: 10px; color: #dec8a1; background: rgb(255 170 0 / 6%); font-size: 11px; line-height: 1.55; }
.editor-change-list { display: grid; gap: 9px; }
.editor-change-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 47px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--input); }
.editor-change-item > span:first-child { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; color: #111218; background: var(--primary); font-size: 11px; font-weight: 950; }
.editor-change-item strong { display: block; font-size: 11px; }
.editor-change-item small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 9px; }
.editor-change-item em { color: var(--muted); font-size: 9px; font-style: normal; }

.editor-status-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; margin-top: 24px; }
.editor-summary-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.editor-summary-stat { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--input); }
.editor-summary-stat strong { display: block; color: var(--primary); font-size: 22px; }
.editor-summary-stat span { display: block; margin-top: 4px; color: var(--muted-2); font-size: 9px; }
.editor-validation-list { display: grid; gap: 8px; margin-top: 16px; }
.editor-validation-item { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 9px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; color: #cfd2db; background: var(--input); font-size: 10px; line-height: 1.45; }
.editor-validation-item.critical { border-color: rgb(255 42 18 / 25%); color: #ff9c92; }
.editor-validation-item.warning { border-color: rgb(255 170 0 / 24%); color: #e8c98b; }
.editor-validation-item.info { border-color: rgb(53 208 127 / 22%); color: #91dfb6; }

.editor-confirm-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgb(4 5 8 / 72%); backdrop-filter: blur(8px); }
.editor-confirm-dialog { width: min(520px, 100%); box-shadow: var(--shadow); }
.editor-confirm-dialog h2 { margin: 7px 0 10px; font-size: 22px; }
.editor-confirm-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }



/* Discord Manager – Prompt-, Detail-, Preset- und Fancy-Text-Erweiterungen */
.editor-toolbar-select { width: 150px; height: 42px; }
.editor-inline-prompt {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 15px;
  border: 1px solid rgb(109 145 184 / 16%);
  border-radius: 11px;
  background: linear-gradient(145deg, rgb(109 145 184 / 4%), transparent), var(--input);
}
.editor-inline-prompt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.editor-inline-prompt-head h3 { margin-top: 4px; }
.editor-inline-prompt-head p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.editor-inline-prompt textarea { min-height: 104px; margin: 0; }
.editor-inline-prompt-examples { display: flex; flex-wrap: wrap; gap: 7px; }
.editor-inline-prompt-examples button {
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #c9cdd8;
  background: var(--surface-2);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}
.editor-inline-prompt-examples button:hover { color: var(--text); border-color: rgb(109 145 184 / 28%); background: rgb(109 145 184 / 7%); }
.editor-section-apply-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--border-soft);
}
.editor-section-apply-row > span {
  margin-right: auto;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.45;
}
.editor-channel-detail {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--input);
  scroll-margin-top: 105px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.editor-channel-detail.attention {
  border-color: rgb(109 145 184 / 58%);
  box-shadow: 0 0 0 3px rgb(109 145 184 / 8%);
}
.editor-channel-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 0 13px; margin-top: 4px; }
.editor-channel-detail-grid .field { margin-top: 15px; }
.editor-channel-topic-field { grid-column: 1 / -1; }
.editor-channel-topic-field textarea { min-height: 78px; }
.editor-role-bottom-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.editor-permission-preset-bar {
  display: grid;
  grid-template-columns: minmax(230px, 340px) auto auto;
  align-items: end;
  gap: 9px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input);
}
.editor-permission-preset-bar .field { margin: 0; }
.editor-channel-preset-panel,
.editor-visibility-panel,
.editor-font-gallery {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--input);
}
.editor-channel-preset-grid { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 0 12px; margin-top: 5px; }
.editor-channel-preset-grid .field { margin-top: 14px; }
.editor-channel-preset-actions { justify-content: flex-end; margin-top: 15px; }
.editor-visibility-panel .editor-structure-toolbar,
.editor-font-gallery .editor-structure-toolbar { margin-bottom: 12px; }
.editor-visibility-grid { display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); gap: 8px; }
.editor-visibility-row { display: grid; grid-template-columns: minmax(0, 1fr) 142px; align-items: center; gap: 9px; padding: 8px 9px; border: 1px solid var(--border-soft); border-radius: 8px; background: var(--surface); }
.editor-visibility-row span { min-width: 0; overflow: hidden; color: #cfd2dc; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.editor-visibility-row .select { height: 34px; font-size: 9px; }
.editor-advanced-permission-title { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.editor-channel-advanced-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-bottom: 14px; }
.editor-channel-advanced-toolbar .field { margin-top: 0; }
.editor-permission-state-select { width: 132px; height: 34px; flex: 0 0 132px; font-size: 9px; }
.editor-design-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 17px; }
.editor-typography-grid-expanded { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.editor-font-samples { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 8px; }
.editor-font-sample { min-width: 0; min-height: 60px; display: grid; align-content: center; gap: 5px; padding: 9px 10px; overflow: hidden; border: 1px solid var(--border-soft); border-radius: 8px; color: var(--text); background: var(--surface); text-align: left; cursor: pointer; }
.editor-font-sample:hover { border-color: rgb(109 145 184 / 30%); background: rgb(109 145 184 / 6%); }
.editor-font-sample strong { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.editor-font-sample small { color: var(--muted-2); font-size: 9px; }

@media (max-width: 1500px) {
  .editor-top-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-discord-preview { grid-template-columns: 280px minmax(400px, 1fr); }
  .editor-discord-members { display: none; }
  .editor-permission-options { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .editor-channel-detail-grid,
  .editor-channel-preset-grid,
  .editor-font-samples { grid-template-columns: repeat(2, minmax(170px, 1fr)); }
  .editor-visibility-grid { grid-template-columns: repeat(2, minmax(190px, 1fr)); }
}
@media (max-width: 1180px) {
  .editor-top-grid { grid-template-columns: 1fr; }
  .editor-chat-panel { min-height: auto; }
  .editor-chat-messages { min-height: 220px; max-height: 330px; }
  .editor-discord-preview { min-width: 760px; }
  .editor-live-panel { overflow-x: auto; }
  .editor-status-grid { grid-template-columns: 1fr; }
  .editor-typography-grid { grid-template-columns: 1fr 1fr; }
  .editor-permission-preset-bar { grid-template-columns: 1fr 1fr; }
  .editor-permission-preset-bar .field { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .editor-page-heading { align-items: flex-start; }
  .editor-preview-controls { width: 100%; grid-template-columns: 1fr; }
  .editor-discord-preview { min-width: 680px; grid-template-columns: 260px minmax(390px, 1fr); }
  .editor-role-layout,
  .editor-permission-layout { grid-template-columns: 1fr; }
  .editor-role-form-grid,
  .editor-typography-grid { grid-template-columns: 1fr; }
  .editor-permission-options { grid-template-columns: 1fr; }
  .editor-channel-permission-row { grid-template-columns: 1fr; }
  .editor-summary-stats { grid-template-columns: 1fr 1fr; }
  .editor-structure-toolbar,
  .editor-role-toolbar,
  .editor-permission-toolbar { align-items: flex-start; flex-direction: column; }
  .editor-structure-toolbar .heading-actions { width: 100%; flex-wrap: wrap; }
  .editor-toolbar-select { width: 100%; }
  .editor-inline-prompt-head { flex-direction: column; }
  .editor-channel-detail-grid,
  .editor-channel-preset-grid,
  .editor-font-samples,
  .editor-visibility-grid { grid-template-columns: 1fr; }
  .editor-permission-preset-bar { grid-template-columns: 1fr; }
  .editor-visibility-row { grid-template-columns: minmax(0, 1fr) 130px; }
  .editor-channel-advanced-toolbar { grid-template-columns: 1fr; gap: 10px; }
  .editor-permission-state-select { width: 124px; flex-basis: 124px; }
}

/* Editor-spezifische Native Inputs im bestehenden Panel-Stil */
.server-editor-page input[type="number"] {
  width: 100%;
  height: 45px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  color: var(--text);
  background: var(--input);
}
.server-editor-page input[type="number"]:focus { border-color: rgb(109 145 184 / 70%); box-shadow: 0 0 0 3px rgb(109 145 184 / 9%); }
.server-editor-page input[type="color"] {
  width: 100%;
  height: 45px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--input);
  cursor: pointer;
}

/* =========================================================
   Feature Suite 6.0 – Remote, Moderation, Community,
   Orders, AutoMod, Embed Engine und Statistiken
   ========================================================= */
.feature-page { display: grid; gap: 18px; }
.feature-page.hidden { display: none; }
.feature-grid { display: grid; gap: 18px; }
.feature-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-card { min-width: 0; padding: 20px; }
.feature-card > h3 { margin: 0 0 16px; font-size: 17px; }
.feature-card label { display: grid; gap: 7px; margin: 0 0 13px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .035em; }
.feature-card .input,
.feature-card .select,
.feature-card .textarea { width: 100%; }
.feature-card input[type="number"], .feature-card input[type="datetime-local"], .feature-card input[type="password"], .feature-card input[type="color"] {
  min-height: 43px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; outline: none; color: var(--text); background: var(--input); color-scheme: dark;
}
.feature-card input[type="color"] { padding: 4px; cursor: pointer; }
.feature-card input:focus, .feature-card textarea:focus, .feature-card select:focus { border-color: rgb(109 145 184 / 65%); box-shadow: 0 0 0 3px rgb(109 145 184 / 8%); }
.feature-status { padding: 8px 11px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 11px; font-weight: 800; }
.feature-status.danger { color: #ff978a; border-color: rgb(255 42 18 / 28%); background: rgb(255 42 18 / 8%); }
.form-grid.compact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.toggle-line { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 9px !important; min-height: 34px; color: var(--text) !important; font-size: 12px !important; text-transform: none; }
.toggle-line input[type="checkbox"], .mini-toggle input { accent-color: var(--primary); }
.multi-select { min-height: 122px !important; padding: 6px !important; }
.multi-select option { padding: 6px 8px; border-radius: 5px; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.input-action-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.input-action-row .button { white-space: nowrap; }
.compact-row { margin: -3px 0 8px; }
.button.compact { min-height: 34px; padding: 0 10px; font-size: 10px; }
.compact-select { width: auto !important; min-width: 120px; }
.feature-output { min-height: 72px; max-height: 230px; margin: 14px 0 0; padding: 12px; overflow: auto; border: 1px solid var(--border-soft); border-radius: 9px; color: #c7cad3; background: #101117; font: 11px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
.permission-toolbar { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(180px, .6fr) auto; gap: 10px; margin-bottom: 14px; }
.permission-matrix { display: grid; gap: 7px; }
.permission-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 9px; background: var(--surface-2); }
.permission-row.critical { border-color: rgb(255 170 0 / 18%); background: rgb(255 170 0 / 3%); }
.permission-row > span:first-child { display: grid; gap: 3px; min-width: 0; }
.permission-row strong { font-size: 12px; }
.permission-row small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.permission-row-controls { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.mini-toggle { display: flex !important; align-items: center; gap: 5px !important; margin: 0 !important; color: var(--muted) !important; font-size: 9px !important; }
.feature-tabs { display: flex; flex-wrap: wrap; gap: 7px; padding: 5px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--surface); }
.feature-tabs button { min-height: 34px; padding: 0 13px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; font-weight: 800; font-size: 10px; }
.feature-tabs button.active { color: #fff; background: rgb(109 145 184 / 15%); box-shadow: inset 0 0 0 1px rgb(109 145 184 / 18%); }
.feature-tab-content { display: grid; gap: 18px; }
.feature-tab-content.hidden { display: none; }
.record-list { display: grid; gap: 7px; }
.record-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--border-soft); border-radius: 9px; background: var(--surface-2); }
.record-row > div { min-width: 0; display: grid; gap: 4px; }
.record-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.record-row small { color: var(--muted); font-size: 9px; }
.record-actions { display: flex; flex: 0 0 auto; gap: 6px; }
.empty-card { padding: 17px; border: 1px dashed var(--border); border-radius: 9px; color: var(--muted); text-align: center; font-size: 11px; }
.inline-add { display: grid; grid-template-columns: minmax(130px, .55fr) minmax(170px, 1fr) auto; gap: 8px; margin-top: 10px; }
.notice-box { margin-top: 16px; padding: 13px; border: 1px solid rgb(109 145 184 / 16%); border-radius: 9px; background: rgb(109 145 184 / 5%); }
.notice-box strong { font-size: 11px; }
.notice-box p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.embed-builder-grid { grid-template-columns: minmax(420px, .85fr) minmax(480px, 1.15fr); }
.discord-preview-shell { min-height: 260px; padding: 18px; border: 1px solid #252832; border-radius: 11px; background: #313338; color: #dbdee1; }
.preview-content { margin-bottom: 8px; color: #dbdee1; font-size: 13px; white-space: pre-wrap; }
.discord-embed-card { max-width: 560px; padding: 12px 14px; border-left: 4px solid var(--primary); border-radius: 4px; background: #2b2d31; box-shadow: 0 1px 1px rgb(0 0 0 / 10%); }
.discord-embed-card > strong { display: block; margin: 4px 0 7px; color: #f2f3f5; font-size: 15px; }
.discord-embed-card > p { margin: 0 0 10px; color: #dbdee1; font-size: 12px; line-height: 1.5; }
.discord-embed-card > small { display: block; margin-top: 10px; color: #b5bac1; font-size: 9px; }
.discord-embed-card > img { display: block; max-width: 100%; max-height: 270px; margin-top: 12px; border-radius: 5px; object-fit: cover; }
.preview-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 12px; }
.preview-fields span { display: grid; gap: 3px; min-width: 0; font-size: 10px; }
.preview-fields span.wide { grid-column: 1 / -1; }
.preview-fields b { color: #f2f3f5; font-size: 10px; }
.feature-subhead { margin-top: 24px !important; }
.stats-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stats-mini span { display: grid; gap: 4px; padding: 9px; border: 1px solid var(--border-soft); border-radius: 8px; color: var(--muted); font-size: 9px; }
.stats-mini strong { color: var(--text); font-size: 15px; }
#statsChart { width: 100%; max-width: 100%; border-radius: 8px; background: #12141b; }
.feature-card hr { height: 1px; margin: 17px 0; border: 0; background: var(--border-soft); }
.feature-card code { color: #a8bfd4; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

@media (max-width: 1250px) {
  .feature-grid.two, .embed-builder-grid { grid-template-columns: 1fr; }
  .stats-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .form-grid.compact, .permission-toolbar, .inline-add, .stats-cards, .stats-mini { grid-template-columns: 1fr; }
  .permission-row { align-items: flex-start; flex-direction: column; }
  .permission-row-controls { width: 100%; justify-content: flex-start; }
  .preview-fields { grid-template-columns: 1fr; }
  .preview-fields span.wide { grid-column: auto; }
}
.report-add-grid { display: grid; grid-template-columns: minmax(120px,.55fr) minmax(120px,.55fr) minmax(110px,.45fr) minmax(190px,1fr) auto; gap: 8px; margin-top: 10px; }
.feature-card input[type="file"] { width: 100%; min-height: 43px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); background: var(--input); }
.feature-card input[type="time"] { min-height: 43px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; color: var(--text); background: var(--input); color-scheme: dark; }
@media (max-width: 980px) { .report-add-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .report-add-grid { grid-template-columns: 1fr; } }
.feature-status.success { color: #7fe3ac; border-color: rgb(53 208 127 / 30%); background: rgb(53 208 127 / 8%); }
.remote-access-hint { display: grid; gap: 4px; margin: -2px 0 14px; padding: 11px 13px; border: 1px solid var(--border-soft); border-radius: 9px; background: var(--surface-2); }
.remote-access-hint strong { color: var(--text); font-size: 12px; }
.remote-access-hint span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.remote-access-hint.highest { border-color: rgb(109 145 184 / 38%); background: rgb(109 145 184 / 7%); }
.remote-access-hint.highest strong { color: #9eb9d1; }
.remote-discord-help { margin-top: 14px; padding: 11px 13px; border: 1px solid var(--border-soft); border-radius: 9px; color: var(--muted); background: #101117; font-size: 11px; line-height: 1.65; }
.remote-discord-help code { color: #c5d3df; }

/* AutoMod managed exception lists */
.managed-selection-block {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgb(18 20 27 / 62%);
}
.managed-selection-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.managed-selection-heading > div { min-width: 0; }
.managed-selection-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .035em;
}
.managed-selection-heading small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.managed-selection-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  margin-bottom: 10px;
}
.managed-selection-toolbar .select,
.managed-selection-toolbar .button { margin: 0; }
.managed-selection-list {
  display: grid;
  gap: 7px;
}
.managed-selection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 9px 8px 11px;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: var(--surface-2);
}
.managed-selection-row.stale {
  border-color: rgb(255 170 0 / 45%);
  background: rgb(255 170 0 / 5%);
}
.managed-selection-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.managed-selection-info > div { min-width: 0; }
.managed-selection-info strong,
.managed-selection-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.managed-selection-info strong {
  color: var(--text);
  font-size: 12px;
}
.managed-selection-info small {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
}
.managed-selection-role-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgb(255 255 255 / 4%);
}
.managed-selection-icon {
  width: 21px;
  flex: 0 0 21px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}
.managed-selection-delete {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  border: 1px solid rgb(255 42 18 / 28%);
  border-radius: 8px;
  color: #ff6a58;
  background: rgb(255 42 18 / 7%);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.managed-selection-delete:hover {
  border-color: rgb(255 42 18 / 55%);
  background: rgb(255 42 18 / 14%);
  transform: translateY(-1px);
}
.managed-selection-empty {
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 9px;
  color: var(--muted-2);
  background: rgb(255 255 255 / 1.5%);
  font-size: 11px;
  text-align: center;
}
.managed-selection-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 11px;
}
@media (max-width: 760px) {
  .managed-selection-heading { flex-direction: column; }
  .managed-selection-toolbar { grid-template-columns: 1fr; }
  .managed-selection-heading .button,
  .managed-selection-toolbar .button,
  .managed-selection-actions .button { width: 100%; }
}

/* Ticket Center */
.ticket-overview-cards { margin-bottom: 18px; }
.ticket-archive-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.6fr);
  gap: 16px;
}
.ticket-archive-list {
  max-height: 720px;
  overflow: auto;
  margin-top: 12px;
}
.ticket-archive-row {
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.ticket-archive-row:hover { border-color: rgb(109 145 184 / 45%); }
.ticket-archive-detail { min-height: 420px; }
.ticket-archive-detail-content { display: grid; gap: 16px; }
.ticket-archive-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.ticket-archive-head small,
.ticket-close-reason small {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.ticket-archive-head h3 { margin: 5px 0 0; }
.ticket-archive-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.ticket-archive-meta span {
  padding: 11px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface-2);
}
.ticket-archive-meta small,
.ticket-archive-meta strong { display: block; }
.ticket-archive-meta small { color: var(--muted-2); font-size: 10px; margin-bottom: 4px; }
.ticket-archive-meta strong { color: var(--text); font-size: 12px; overflow-wrap: anywhere; }
.ticket-close-reason {
  padding: 13px 14px;
  border: 1px solid rgb(109 145 184 / 20%);
  border-radius: 10px;
  background: rgb(109 145 184 / 5%);
}
.ticket-close-reason p { margin: 7px 0 0; color: var(--text); line-height: 1.55; }
.ticket-transcript { display: grid; gap: 8px; max-height: 680px; overflow: auto; padding-right: 3px; }
.ticket-message {
  padding: 11px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface-2);
}
.ticket-message.deleted { opacity: .72; border-style: dashed; }
.ticket-message > div { display: flex; justify-content: space-between; gap: 12px; }
.ticket-message strong { font-size: 12px; }
.ticket-message time { color: var(--muted-2); font-size: 10px; white-space: nowrap; }
.ticket-message p { margin: 7px 0 0; color: var(--text); line-height: 1.5; overflow-wrap: anywhere; }
.ticket-message small { color: var(--muted-2); font-size: 10px; }
.ticket-attachment-list { display: grid; gap: 8px; }
.ticket-attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface-2);
}
.ticket-attachment-row strong,
.ticket-attachment-row small { display: block; }
.ticket-attachment-row small { margin-top: 3px; color: var(--muted-2); font-size: 10px; }
@media (max-width: 1050px) {
  .ticket-archive-grid { grid-template-columns: 1fr; }
  .ticket-archive-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .ticket-archive-meta { grid-template-columns: 1fr; }
  .ticket-attachment-row { align-items: stretch; flex-direction: column; }
}


/* ==========================================================================
   MODERN NEUTRAL UI — v6.2.2
   Ruhiges Graphit-Design mit dezentem Stahlblau. Keine Branding-Farbwelt.
   ========================================================================== */
:root {
  color-scheme: dark;
  --bg: #0a0e13;
  --bg-deep: #070a0e;
  --surface: #11171f;
  --surface-2: #161d26;
  --surface-3: #1c2530;
  --input: #0d131a;
  --border: rgb(255 255 255 / 8%);
  --border-soft: rgb(255 255 255 / 5%);
  --text: #edf2f7;
  --muted: #94a0ad;
  --muted-2: #63707d;
  --primary: #6d91b8;
  --primary-hover: #82a5c8;
  --danger: #e05d63;
  --amber: #d2a85d;
  --green: #52b788;
  --blue: #6d91b8;
  --shadow: 0 24px 70px rgb(0 0 0 / 28%);
  --soft-shadow: 0 10px 32px rgb(0 0 0 / 18%);
}

html, body { background: var(--bg-deep); }
body {
  background: linear-gradient(180deg, #090d12 0%, #0b1016 48%, #090d12 100%);
}
body::before {
  opacity: .07;
  background-size: 56px 56px;
}
.ambient-one { background: rgb(109 145 184 / 7%); }
.ambient-two { background: rgb(102 119 137 / 5%); }

/* Login */
.login-hero {
  background:
    linear-gradient(120deg, rgb(7 10 14 / 35%), rgb(7 10 14 / 94%)),
    radial-gradient(circle at 25% 34%, rgb(109 145 184 / 10%), transparent 34%);
}
.login-copy h1 span {
  color: #c7d6e4;
  background: none;
  -webkit-text-fill-color: currentColor;
}
.login-card {
  border-radius: 18px;
  background: rgb(17 23 31 / 96%);
  box-shadow: var(--shadow);
}
.brand-mark, .brand-mark.small {
  color: #d9e3ec;
  background: linear-gradient(145deg, #263342, #18212b);
  border: 1px solid rgb(255 255 255 / 8%);
  box-shadow: none;
}
.panel-wordmark span, .eyebrow { color: var(--primary); }
.discord-symbol, .discord-orb {
  color: #dce6ef;
  background: #253240;
  box-shadow: none;
}

/* Navigation */
.sidebar {
  background: #0d1218;
  box-shadow: 10px 0 36px rgb(0 0 0 / 14%);
}
.module-nav-block { background: rgb(255 255 255 / 1.8%); }
.nav-icon {
  color: #8fa8bf;
  background: rgb(109 145 184 / 7%);
}
.nav-item:hover {
  border-color: rgb(255 255 255 / 6%);
  background: rgb(255 255 255 / 3.5%);
}
.nav-item.active {
  border-color: rgb(109 145 184 / 24%);
  background: rgb(109 145 184 / 9%);
  box-shadow: inset 2px 0 0 var(--primary);
}
.nav-item.active .nav-icon {
  color: #c8d8e7;
  background: rgb(109 145 184 / 13%);
}
.sidebar-note {
  background: rgb(255 255 255 / 2.5%);
}
.shield-icon {
  color: #9eb5ca;
  background: rgb(109 145 184 / 8%);
}
.core-orb {
  color: #dce6ef;
  background: #263442;
}

/* Topbar + surfaces */
.topbar {
  background: rgb(10 14 19 / 88%);
  box-shadow: 0 8px 28px rgb(0 0 0 / 12%);
}
.panel, .feature-card, .module-card, .stat-card {
  background: #11171f;
  box-shadow: var(--soft-shadow);
}
.panel:hover { border-color: rgb(255 255 255 / 11%); }
.dashboard-hero {
  background:
    linear-gradient(120deg, rgb(17 23 31 / 96%), rgb(11 16 22 / 98%)),
    radial-gradient(circle at 78% 25%, rgb(109 145 184 / 9%), transparent 30%);
  box-shadow: var(--soft-shadow);
}
.dashboard-hero h1 span { color: #b8cadb; }
.dashboard-hero::after { color: rgb(255 255 255 / 1.6%); }
.stat-icon, .dashboard-guild-empty > span {
  color: #a9bfd3;
  background: rgb(109 145 184 / 8%);
}
.guild-fallback, .bot-avatar {
  color: #dce6ef;
  background: #263442;
}
.dashboard-guild-item:hover, .dashboard-guild-item.active {
  border-color: rgb(109 145 184 / 26%);
  background: rgb(109 145 184 / 7%);
}

/* Forms */
input[type="text"], input[type="number"], input[type="password"], input[type="datetime-local"], textarea, .select, .input {
  border-color: rgb(255 255 255 / 8%);
  background: #0d131a;
}
input[type="text"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="datetime-local"]:focus, textarea:focus, .select:focus, .input:focus,
.server-editor-page input[type="number"]:focus, .feature-card input:focus, .feature-card textarea:focus, .feature-card select:focus {
  border-color: rgb(109 145 184 / 70%);
  box-shadow: 0 0 0 3px rgb(109 145 184 / 10%);
}
.select optgroup { color: #acc0d2; background: #101720; }
.select option { background: #101720; }
code, .feature-card code, .remote-discord-help code { color: #b6c8d8; background: #0b1016; }
.switch input:checked + span { border-color: var(--primary); background: var(--primary); }
input[type="range"] { accent-color: var(--primary); }

/* Buttons */
.button {
  border-radius: 9px;
  font-weight: 750;
}
.button:hover { transform: none; }
.button.primary {
  color: #f7fafc;
  border-color: #789abb;
  background: #6d91b8;
  box-shadow: none;
}
.button.primary:hover {
  filter: none;
  border-color: #8caac5;
  background: #789abd;
}
.button.secondary {
  border-color: rgb(255 255 255 / 9%);
  background: #171e27;
}
.button.secondary:hover {
  border-color: rgb(109 145 184 / 28%);
  background: #1b242e;
}
.button.ghost:hover, .icon-button:hover { background: rgb(255 255 255 / 5%); }

/* Tabs, selections and manager */
.feature-tabs button.active, .editor-role-item.active, .editor-permission-nav button.active, .radio-card:has(input:checked) {
  color: var(--text);
  border-color: rgb(109 145 184 / 24%);
  background: rgb(109 145 184 / 9%);
  box-shadow: none;
}
.editor-category-card, .editor-channel-edit-row, .editor-role-item, .managed-selection-block, .record-item {
  box-shadow: none;
}
.editor-channel-edit-row.selected input, .editor-font-sample:hover, .editor-inline-prompt-examples button:hover, .editor-quick-prompts button:hover {
  border-color: rgb(109 145 184 / 32%);
  background-color: rgb(109 145 184 / 6%);
}
.notice-box, .remote-access-hint.highest, .ticket-close-reason {
  border-color: rgb(109 145 184 / 18%);
  background: rgb(109 145 184 / 5%);
}
.ticket-archive-row:hover { border-color: rgb(109 145 184 / 36%); }

/* Previews stay neutral instead of inheriting the panel accent too strongly. */
.discord-preview, .discord-preview-shell {
  background: #11161d;
}

/* Keep semantic states visually distinct. */
.status-badge.online, .feature-status.success { color: #8fd1ad; }
.status-badge.offline, .feature-status.danger { color: #e99095; }

/* ================================================================
   v6.3.0 · DESIGN 2 · Modern Warm / Neutral
   Dark navigation, warm off-white workspace, quiet neutral accents.
   ================================================================ */
:root {
  --bg: #f3f1ed;
  --surface: #fbfaf7;
  --surface-2: #f1eee8;
  --surface-3: #e9e5de;
  --input: #f8f6f2;
  --border: #ddd8cf;
  --border-soft: #e8e3dc;
  --text: #1d232b;
  --muted: #6d737d;
  --muted-2: #969ba2;
  --primary: #596574;
  --primary-hover: #45515f;
  --danger: #c44f4f;
  --amber: #b88742;
  --green: #3d9668;
  --shadow: 0 12px 34px rgb(44 39 32 / 8%);
  --sidebar: #1b2028;
  --sidebar-2: #232a34;
  --sidebar-text: #f1f3f5;
  --sidebar-muted: #a5adb8;
}

html { background: var(--bg); color-scheme: light; }
body {
  color: var(--text);
  background:
    radial-gradient(circle at 82% 2%, rgb(255 255 255 / 72%), transparent 31%),
    linear-gradient(180deg, #f7f4ef 0%, var(--bg) 100%);
}
.ambient { display: none !important; }

/* Login */
.login-view { background: linear-gradient(135deg, #eeeae3 0%, #faf8f4 55%, #efece6 100%); }
.login-layout { border: 1px solid var(--border); background: rgb(251 250 247 / 92%); box-shadow: 0 28px 80px rgb(53 47 39 / 12%); }
.login-hero { color: #f5f6f7; background: linear-gradient(145deg, #171c23, #222933); }
.login-card-wrap { background: #f8f6f2; }
.login-card { border-color: var(--border); color: var(--text); background: #fffdf9; box-shadow: 0 18px 44px rgb(50 43 34 / 8%); }
.brand-mark { color: #fff; background: linear-gradient(145deg, #6e7885, #414b58); box-shadow: 0 12px 30px rgb(45 54 64 / 18%); }
.panel-wordmark span, .login-copy h1 span, .eyebrow { color: #6b7480; }
.login-hero .eyebrow, .login-hero .panel-wordmark span, .login-hero .login-copy h1 span { color: #d8dde3; }
.login-feature-row span { border-color: rgb(255 255 255 / 12%); background: rgb(255 255 255 / 5%); }

/* Shell / Sidebar */
.app-shell { grid-template-columns: 258px minmax(0, 1fr); }
.sidebar {
  width: 258px;
  border-right: 0;
  background: linear-gradient(180deg, #1a1f27 0%, #202630 100%);
  box-shadow: 8px 0 30px rgb(25 29 35 / 7%);
  backdrop-filter: none;
}
.brand { border-bottom-color: rgb(255 255 255 / 7%); }
.brand strong { color: var(--sidebar-text); }
.brand span, .nav-group-label { color: #818b98; }
.brand-mark.small { border-radius: 11px; background: #eef0f2; color: #222831; box-shadow: none; }
.module-nav-head { border-color: rgb(255 255 255 / 7%); background: rgb(255 255 255 / 3%); }
.module-nav-head strong { color: #eef1f4; }
.module-nav-head small { color: #8e98a4; }
.nav-item { color: var(--sidebar-muted); border-radius: 10px; }
.nav-item:hover { color: #fff; background: rgb(255 255 255 / 6%); }
.nav-item.active { color: #fff; border-color: rgb(255 255 255 / 5%); background: linear-gradient(90deg, rgb(255 255 255 / 11%), rgb(255 255 255 / 6%)); box-shadow: inset 3px 0 0 #d4d8dc; }
.nav-icon { color: #c9d0d8; background: rgb(255 255 255 / 6%); }
.nav-item.active .nav-icon { color: #242b34; background: #eef0f2; }
.sidebar-note { border-color: rgb(255 255 255 / 8%); color: #eef1f4; background: rgb(255 255 255 / 5%); }
.sidebar-note span { color: #9ba4af; }
.shield-icon { color: #c9d0d8; background: rgb(255 255 255 / 6%); }
.workspace { background: transparent; }

/* Topbar */
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--border-soft);
  background: rgb(250 248 244 / 92%);
  box-shadow: 0 5px 18px rgb(52 47 40 / 3%);
  backdrop-filter: blur(18px);
}
.topbar-context strong { color: #1f252d; }
.topbar-context small, .server-picker-wrap label, .user-menu span { color: var(--muted); }
.module-orb, .module-orb.mini { color: #fff; background: #5d6875; box-shadow: none; }
.connection-pill { color: #59616b; border-color: var(--border); background: #f5f3ef; }
.connection-pill.online { color: #2e7c57; border-color: rgb(61 150 104 / 24%); background: rgb(61 150 104 / 7%); }
.user-menu strong { color: #252b33; }
.icon-button:hover { color: #1d232b; background: #ece9e3; }

/* Main spacing / heading */
.content { width: min(1540px, 100%); padding: 30px 34px 70px; }
.page-heading h1, .section-heading h2, .dashboard-hero h1 { color: #1b2128; }
.page-heading p:not(.eyebrow), .section-heading p:not(.eyebrow), .dashboard-hero p { color: #717781; }
.section-heading { margin-bottom: 22px; }
.section-heading h2 { letter-spacing: -.025em; }
.eyebrow { color: #7a838f; letter-spacing: .12em; }

/* Dashboard */
.dashboard-hero {
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #fcfbf8 0%, #f6f3ee 100%);
  box-shadow: var(--shadow);
}
.dashboard-hero::after { opacity: .08; filter: grayscale(1); }
.hero-live { border-color: var(--border); background: #f3f0eb; }
.hero-live small { color: #848a93; }
.hero-live strong { color: #262c33; }
.dashboard-stats { gap: 16px; }
.stat-card {
  min-height: 108px;
  border-color: var(--border);
  background: #fcfbf8;
  box-shadow: 0 5px 18px rgb(50 44 36 / 4%);
}
.stat-card:hover { transform: translateY(-1px); border-color: #cbc5bb; box-shadow: 0 9px 25px rgb(50 44 36 / 7%); }
.stat-card small { color: #818791; }
.stat-card strong { color: #1d232b; }
.stat-icon { color: #4d5763; border-color: #e3dfd8; background: #f0ede8; box-shadow: none; }
.module-card { border-color: var(--border); background: #fbfaf7; box-shadow: 0 8px 26px rgb(52 46 38 / 5%); }
.module-card:hover { border-color: #cfc9c0; box-shadow: 0 14px 34px rgb(52 46 38 / 8%); }
.module-card h3 { color: #20262e; }
.module-card p { color: #737983; }
.module-logo { color: #4f5965; background: #efede8; box-shadow: none; }

/* Cards / panels / tables */
.panel {
  border-color: var(--border);
  color: var(--text);
  background: #fbfaf7;
  box-shadow: 0 6px 22px rgb(49 43 35 / 5%);
}
.panel:hover { border-color: #d4cec5; }
.panel h2, .panel h3, .panel-heading h3, .feature-card h3 { color: #20262e; }
.panel > p, .panel-title-row p, .feature-card > p { color: var(--muted); }
.compact-title-row, hr { border-color: var(--border-soft) !important; }
.feature-tabs, .editor-tabs, .social-platform-tabs { border-color: var(--border); background: #efede8; }
.feature-tabs button, .editor-tab, .social-platform-tabs button { color: #747b84; background: transparent; }
.feature-tabs button.active, .editor-tab.active, .social-platform-tabs button.active { color: #20262e; background: #fffdf9; box-shadow: 0 2px 8px rgb(42 38 33 / 6%); }
.record-row, .empty-card, .notice-box, .stats-mini, .remote-command-row, .permission-matrix > *, .mapping-row, .managed-selection-item {
  border-color: var(--border);
  color: var(--text);
  background: #f7f5f1;
}
.record-row strong, .managed-selection-item strong { color: #262c33; }
.record-row small, .empty-card, .notice-box p { color: var(--muted); }
.feature-output { border-color: var(--border); color: #36414c; background: #efede8; }
.table-wrap, .audit-table-wrap { border-color: var(--border); background: #fbfaf7; }
table, th, td { border-color: var(--border-soft) !important; }
th { color: #727984 !important; background: #f3f0eb !important; }
td { color: #313841 !important; background: #fbfaf7; }

/* Forms */
.field label, .label-row label, .feature-card label, .mapping-role-heading > span, .mapping-emoji-field > span { color: #4e5660; }
input[type="text"], input[type="password"], input[type="number"], input[type="datetime-local"], input[type="time"], input[type="url"], textarea, .input, .textarea, .select {
  border-color: #d8d2c9 !important;
  color: #252b33 !important;
  background-color: #f9f7f3 !important;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 75%);
}
input::placeholder, textarea::placeholder { color: #a0a4aa; }
input:focus, textarea:focus, .input:focus, .textarea:focus, .select:focus {
  border-color: #929aa4 !important;
  box-shadow: 0 0 0 3px rgb(89 101 116 / 9%) !important;
}
.select { background-image: linear-gradient(45deg, transparent 50%, #777f88 50%), linear-gradient(135deg, #777f88 50%, transparent 50%) !important; }
.color-input input[type="color"] { border-color: var(--border); background: #f7f5f1; }
code { color: #4f5964; border-color: #ded8cf; background: #efede8; }
.switch > span { border-color: #c9c4bc; background: #d9d5ce; }
.switch > span::after { background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 14%); }
.switch input:checked + span { border-color: #566270; background: #566270; }
.toggle-line { color: #4d555f !important; }

/* Buttons */
.button { border-radius: 9px; box-shadow: none; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; border-color: #4e5966; background: linear-gradient(180deg, #65717f, #515d69); box-shadow: 0 6px 14px rgb(44 54 64 / 13%); }
.button.primary:hover { filter: none; background: linear-gradient(180deg, #596572, #46515d); }
.button.secondary { color: #4e5660; border-color: #d5d0c7; background: #f6f4f0; }
.button.secondary:hover { color: #282e36; border-color: #c4beb5; background: #eeebe6; }
.button.ghost { color: #707782; }
.button.danger { color: #aa4141; border-color: rgb(196 79 79 / 22%); background: rgb(196 79 79 / 7%); }
.status-badge { color: #626a74; border: 1px solid #d6d1c8; background: #f2efea; }
.status-badge.online { color: #347d59; border-color: rgb(61 150 104 / 24%); background: rgb(61 150 104 / 8%); }
.status-badge.danger, .notice-box.danger { color: #9f4141; border-color: rgb(196 79 79 / 25%); background: rgb(196 79 79 / 6%); }

/* Managed lists / selections */
.managed-selection-block { border-color: var(--border); background: #f7f5f1; }
.managed-selection-toolbar { border-color: var(--border-soft); background: #f0ede8; }
.managed-selection-label { color: #39414a; }
.managed-selection-heading small, .field-help, .counter { color: #888e96; }

/* Keep real Discord previews dark by design */
.discord-preview, .discord-preview-shell, .embed-preview, .welcome-card-preview { color: #f2f3f5; }
.discord-preview { border-color: #30343d; background: #1e2026; }
.discord-preview-shell { border-color: #2c3038; background: #1e2026; }
.embed-preview { background: #25272e; }
.discord-preview input, .discord-preview textarea { color-scheme: dark; }

/* Social Media */
.social-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.social-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.social-main-stack { min-width: 0; display: grid; gap: 20px; }
.social-creator-sidebar { position: sticky; top: 96px; padding: 17px; }
.social-creator-list { display: grid; gap: 7px; margin-top: 14px; }
.social-creator-item {
  width: 100%; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px;
  padding: 10px; border: 1px solid transparent; border-radius: 10px; color: #424a54; background: transparent; text-align: left; cursor: pointer;
}
.social-creator-item:hover { border-color: var(--border); background: #f3f0eb; }
.social-creator-item.active { border-color: #cfc9c0; background: #ece9e3; }
.social-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: #596574; font-size: 14px; font-weight: 850; }
.social-creator-copy { min-width: 0; }
.social-creator-copy strong, .social-creator-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-creator-copy strong { color: #242a32; font-size: 12px; }
.social-creator-copy small { margin-top: 3px; color: #8b9097; font-size: 10px; }
.social-platform-icons { display: flex; gap: 4px; }
.social-mini-platform { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 6px; color: #fff; font-size: 10px; font-weight: 850; }
.social-mini-platform.twitch, .platform-badge.twitch, .twitch-icon { background: #9146ff !important; color: #fff !important; }
.social-mini-platform.tiktok, .platform-badge.tiktok, .tiktok-icon { background: #24272d !important; color: #fff !important; }
.social-global-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.social-platform-tabs { display: inline-flex; gap: 3px; margin: 22px 0 16px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; }
.social-platform-tabs button { padding: 8px 18px; border: 0; border-radius: 7px; cursor: pointer; font-weight: 750; }
.social-platform-editor { display: grid; gap: 14px; }
.platform-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.platform-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 31px; padding: 0 12px; border-radius: 8px; font-size: 11px; font-weight: 850; }
.social-preview-card { margin-top: 6px; padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: #f3f0eb; }
.social-preview-card > small { display: block; margin-bottom: 9px; color: #868c94; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.social-preview-embed { position: relative; overflow: hidden; padding: 16px 17px 16px 20px; border: 1px solid #ded9d0; border-radius: 10px; background: #fffdf9; box-shadow: 0 5px 18px rgb(48 42 35 / 5%); }
.social-preview-embed::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #9146ff; }
.tiktok-preview .social-preview-embed::before { background: #fe2c55; }
.social-preview-embed strong { display: block; color: #222831; font-size: 13px; }
.social-preview-embed p { min-height: 38px; margin: 8px 0 12px; color: #616872; font-size: 12px; line-height: 1.55; white-space: pre-line; }
.social-preview-embed button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 7px; color: #fff; background: #6650a6; font-size: 10px; font-weight: 800; }
.tiktok-preview .social-preview-embed button { background: #22272e; }
.social-save-row { justify-content: flex-end; margin-top: 8px; }
.disabled-option { opacity: .5; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #c8c2b9 transparent; }
.sidebar { scrollbar-color: #3b4350 transparent; }

/* Toast / overlays */
.toast { color: #fff; background: #2d343d; box-shadow: 0 16px 36px rgb(30 34 40 / 18%); }
.toast.error { background: #9f4646; }
.loading-overlay { background: rgb(245 242 237 / 68%); backdrop-filter: blur(3px); }
.loading-spinner { border-color: #d9d4cb; border-top-color: #596574; }
.modal, .confirm-card { border-color: var(--border); color: var(--text); background: #fbfaf7; }
.modal-backdrop, .editor-confirm-overlay { background: rgb(35 39 44 / 35%); backdrop-filter: blur(4px); }

@media (max-width: 1100px) {
  .social-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .social-layout { grid-template-columns: 1fr; }
  .social-creator-sidebar { position: static; }
  .social-creator-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .content { padding: 22px 16px 55px; }
  .social-stats, .social-global-grid, .social-creator-list { grid-template-columns: 1fr; }
  .social-heading { align-items: flex-start; }
}
.social-connect-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 14px; border: 1px solid var(--border); border-radius: 10px; background: #f7f5f1;
}
.social-connect-row > div:first-child { display: grid; gap: 3px; }
.social-connect-row strong { color: #2a3038; font-size: 12px; }
.social-connect-row small { display: block; }
@media (max-width: 680px) {
  .social-connect-row { align-items: flex-start; flex-direction: column; }
}


/* Dashboard compact shortcuts (v6.3.0 overview fix) */
.dashboard-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.dashboard-shortcut-card {
  min-width: 0;
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: #fbfaf7;
  box-shadow: 0 4px 14px rgb(52 46 38 / 4%);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.dashboard-shortcut-card:hover {
  border-color: #c9c3b9;
  background: #fffdf9;
  box-shadow: 0 8px 20px rgb(52 46 38 / 7%);
  transform: translateY(-1px);
}
.dashboard-shortcut-card:focus-visible {
  outline: 2px solid #98a4b1;
  outline-offset: 2px;
}
.dashboard-shortcut-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid #e1ddd6;
  border-radius: 11px;
  color: #58636f;
  background: #efede8;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}
.dashboard-shortcut-icon svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}
.dashboard-shortcut-copy {
  min-width: 0;
  flex: 1;
  display: block;
}
.dashboard-shortcut-copy strong,
.dashboard-shortcut-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-shortcut-copy strong {
  color: #20262e;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: -.01em;
}
.dashboard-shortcut-copy small {
  margin-top: 4px;
  color: #818791;
  font-size: 9px;
  font-weight: 600;
}
.dashboard-shortcut-arrow {
  flex: 0 0 auto;
  color: #a2a8ae;
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
  transition: color .18s ease, transform .18s ease;
}
.dashboard-shortcut-card:hover .dashboard-shortcut-arrow {
  color: #626d78;
  transform: translateX(2px);
}
@media (max-width: 1380px) {
  .dashboard-shortcut-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1040px) {
  .dashboard-shortcut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .dashboard-shortcut-grid { grid-template-columns: 1fr; }
  .dashboard-shortcut-card { min-height: 76px; padding: 11px 12px; }
}


/* Sidebar comfort fix (v6.3.0) */
@media (min-width: 981px) {
  .app-shell { grid-template-columns: 292px minmax(0, 1fr); }
  .sidebar { width: 292px; padding-inline: 18px; }
}

/* The sidebar wordmark no longer uses the decorative white D tile. */
.sidebar .brand {
  gap: 0;
  padding-inline: 8px;
}

/* Keep the navigation scrollbar quiet and close to the sidebar tone. */
.navigation {
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: #282f38 transparent;
}
.navigation:hover { scrollbar-color: #343c46 transparent; }
.navigation::-webkit-scrollbar { width: 4px; }
.navigation::-webkit-scrollbar-track { background: transparent; }
.navigation::-webkit-scrollbar-thumb {
  min-height: 42px;
  border-radius: 999px;
  background: #282f38;
}
.navigation:hover::-webkit-scrollbar-thumb { background: #343c46; }
.navigation::-webkit-scrollbar-corner { background: transparent; }

@media (max-width: 980px) {
  .sidebar { width: min(320px, 88vw); }
}

/* Sidebar readability refinement fix (v6.3.0) */
.sidebar .module-nav-block {
  border-color: transparent;
  background: rgb(255 255 255 / 2.2%);
  box-shadow: none;
}
.sidebar .module-nav-head {
  border-color: transparent;
  background: rgb(255 255 255 / 2%);
}
.sidebar .module-nav-head strong { color: #f1f4f7; }
.sidebar .module-nav-head small { color: #aeb6c1; }
.sidebar .module-nav-items { border-top-color: rgb(255 255 255 / 4%); }
.sidebar .nav-item {
  color: #d1d7df;
  border-color: transparent;
}
.sidebar .nav-item:hover {
  color: #ffffff;
  border-color: transparent;
  background: rgb(255 255 255 / 7%);
}
.sidebar .nav-item.active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(90deg, rgb(255 255 255 / 10%), rgb(255 255 255 / 5%));
  box-shadow: inset 3px 0 0 #d4d8dc;
}
.sidebar .nav-copy strong { color: #eef2f6; }
.sidebar .nav-copy small { color: #aeb6c1; }
.sidebar .nav-item.active .nav-copy small { color: #c5ccd4; }
.sidebar .nav-icon {
  color: #d6dde5;
  background: rgb(255 255 255 / 7%);
}
.sidebar .brand span,
.sidebar .nav-group-label { color: #98a3af; }

/* Unified dropdown + social media usability fix (v6.3.0) */
/* Remove the decorative module tile from every page header. */
.topbar-context .module-orb { display: none !important; }
.topbar-context { gap: 0; }

/* One calm, light dropdown language across the complete panel. */
.select {
  min-height: 46px !important;
  padding: 0 44px 0 14px !important;
  border: 1px solid #d7d1c8 !important;
  border-radius: 11px !important;
  color: #28313a !important;
  background-color: #fffdf9 !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #66717c 50%),
    linear-gradient(135deg, #66717c 50%, transparent 50%) !important;
  background-position: calc(100% - 19px) 20px, calc(100% - 14px) 20px !important;
  background-size: 5px 5px !important;
  background-repeat: no-repeat !important;
  box-shadow: 0 3px 10px rgb(48 42 35 / 4%), inset 0 1px 0 rgb(255 255 255 / 85%) !important;
  color-scheme: light !important;
}
.select:hover { border-color: #c7c0b6 !important; background-color: #ffffff !important; }
.select:focus {
  border-color: #8f99a4 !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgb(89 101 116 / 9%), 0 4px 12px rgb(48 42 35 / 5%) !important;
}
.select:disabled { color: #989da3 !important; background-color: #f1efeb !important; cursor: not-allowed; opacity: .8; }
.select option, .select optgroup { color: #28313a !important; background: #fffdf9 !important; }

/* The guild picker uses the same control, just slightly more prominent. */
.server-picker-wrap { min-width: 390px; }
.server-picker-wrap label { display: none !important; }
.server-picker-wrap .select {
  min-width: 300px;
  height: 48px !important;
  border-radius: 12px !important;
  font-size: 13px;
  font-weight: 700;
}
.server-picker-wrap .sync-button {
  width: 46px;
  height: 46px;
  border-color: #d7d1c8;
  border-radius: 11px;
  color: #606a75;
  background: #fffdf9;
}
.server-picker-wrap .sync-button:hover { color: #28313a; border-color: #c7c0b6; background: #fff; }

/* Social Media: guided, spacious setup instead of a dense form wall. */
.social-media-page { --social-gap: 18px; }
.social-heading { align-items: flex-end; }
.social-heading > div:first-child { max-width: 850px; }
.social-heading p:not(.eyebrow) { max-width: 800px; }
.social-stats { gap: 14px; margin-bottom: 18px; }
.social-stats .stat-card { min-height: 94px; }
.social-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 18px; }
.social-main-stack { gap: 18px; }
.social-creator-sidebar { top: 94px; padding: 18px; }
.social-creator-sidebar .panel-heading { align-items: flex-start; }
.social-creator-sidebar .panel-heading p,
.social-panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.social-creator-list { gap: 8px; margin-top: 15px; }
.social-creator-item { min-height: 58px; padding: 9px; }
.social-help-card { display: grid; gap: 9px; margin-top: 16px; padding: 13px; border: 1px solid #e1dcd4; border-radius: 11px; background: #f5f2ed; }
.social-help-card strong { color: #303740; font-size: 11px; }
.social-help-card span { color: #727982; font-size: 9px; line-height: 1.45; }
.social-help-card b { color: #4e5965; }

.social-setup-panel, .social-editor-panel, .social-permissions-panel { padding: 20px; }
.social-panel-heading { align-items: flex-start; margin-bottom: 18px; }
.social-master-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(250px, .85fr); gap: 14px; margin-bottom: 16px; }
.social-switch-card {
  min-height: 78px;
  display: grid !important;
  grid-template-columns: 18px minmax(0,1fr) !important;
  align-items: start !important;
  gap: 11px !important;
  margin: 0 !important;
  padding: 15px !important;
  border: 1px solid #ded8cf;
  border-radius: 12px;
  color: #2c333b !important;
  background: #f7f5f1;
  cursor: pointer;
}
.social-switch-card.compact { min-height: 68px; }
.social-switch-card input { margin-top: 2px; accent-color: #596574; }
.social-switch-card span { display: grid; gap: 4px; }
.social-switch-card strong { font-size: 11px; }
.social-switch-card small { color: #7f858d; font-size: 9px; font-weight: 600; line-height: 1.45; }

.social-field-block { display: grid !important; gap: 7px !important; margin: 0 !important; color: #4e5660 !important; font-size: 10px !important; font-weight: 750 !important; letter-spacing: .01em !important; }
.social-field-block > span { color: #444d57; font-size: 10px; font-weight: 800; }
.social-field-block > small { color: #8a9097; font-size: 8.5px; font-weight: 600; line-height: 1.45; }
.social-field-block .input, .social-field-block .select, .social-field-block .textarea { margin: 0; }
.social-field-block .input, .social-field-block input[type="password"], .social-field-block input[type="number"], .social-field-block input[type="url"] {
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #d7d1c8 !important;
  border-radius: 11px !important;
  color: #28313a !important;
  background: #fffdf9 !important;
  box-shadow: 0 3px 10px rgb(48 42 35 / 4%), inset 0 1px 0 rgb(255 255 255 / 85%) !important;
  color-scheme: light !important;
}
.social-field-block .textarea { min-height: 116px; padding: 12px 13px; }
.social-field-block input:focus, .social-field-block textarea:focus { border-color: #8f99a4 !important; box-shadow: 0 0 0 3px rgb(89 101 116 / 9%) !important; }
.input-with-unit { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: stretch; }
.input-with-unit .input { border-radius: 11px 0 0 11px !important; }
.input-with-unit em { min-width: 72px; display: grid; place-items: center; padding: 0 11px; border: 1px solid #d7d1c8; border-left: 0; border-radius: 0 11px 11px 0; color: #737b84; background: #f1efeb; font-size: 9px; font-style: normal; font-weight: 750; }

.social-api-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.social-api-card { min-width: 0; padding: 16px; border: 1px solid #ddd7ce; border-radius: 13px; background: #f9f7f3; }
.social-api-head, .social-editor-intro { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 11px; margin-bottom: 16px; }
.social-api-head > div, .social-editor-intro > div { min-width: 0; }
.social-api-head strong, .social-editor-intro strong { display: block; color: #252c34; font-size: 12px; }
.social-api-head small, .social-editor-intro small { display: block; margin-top: 4px; color: #7d848c; font-size: 9px; line-height: 1.45; }
.social-api-logo { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: #fff; font-size: 16px; font-weight: 900; }
.social-api-logo.twitch { background: #7650c8; }
.social-api-logo.tiktok { background: #262c33; }
.social-mini-toggle { display: grid !important; grid-template-columns: 34px auto !important; grid-template-rows: auto auto; align-items: center !important; gap: 2px 8px !important; margin: 0 !important; color: #626a74 !important; cursor: pointer; }
.social-mini-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.social-mini-toggle > span { grid-row: 1 / span 2; width: 34px; height: 20px; position: relative; border: 1px solid #c7c2ba; border-radius: 999px; background: #d9d5cf; transition: .18s; }
.social-mini-toggle > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 16%); transition: .18s; }
.social-mini-toggle input:checked + span { border-color: #566270; background: #566270; }
.social-mini-toggle input:checked + span::after { transform: translateX(14px); }
.social-mini-toggle em { font-size: 8px; font-style: normal; font-weight: 750; white-space: nowrap; }
.social-form-grid { display: grid; gap: 13px; }
.social-form-grid.two-cols { grid-template-columns: repeat(2,minmax(0,1fr)); }
.social-form-grid.three-cols { grid-template-columns: repeat(3,minmax(0,1fr)); }
.social-form-grid.four-cols { grid-template-columns: repeat(4,minmax(0,1fr)); }
.social-span-2 { grid-column: span 2; }
.social-card-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.social-settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #e2ddd5; }
.social-settings-footer strong, .social-settings-footer small { display: block; }
.social-settings-footer strong { color: #363e47; font-size: 10px; }
.social-settings-footer small { margin-top: 3px; color: #858b92; font-size: 8.5px; }

.social-profile-basics { display: grid; grid-template-columns: minmax(0,1fr) minmax(270px,.55fr); gap: 14px; margin-bottom: 4px; }
.social-platform-tabs { margin: 18px 0; padding: 4px; }
.social-platform-tabs button { min-width: 110px; min-height: 36px; }
.social-editor-intro { padding: 13px; border: 1px solid #e0dbd3; border-radius: 12px; background: #f7f5f1; }
.social-message-layout { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(300px,.9fr); gap: 14px; margin-top: 14px; align-items: stretch; }
.social-message-fields { display: grid; gap: 13px; }
.social-preview-card { height: 100%; margin: 0; padding: 14px; display: flex; flex-direction: column; }
.social-preview-embed { flex: 1; }
.social-connect-row { margin: 14px 0; background: #f7f5f1; }
.social-connect-row p { margin: 4px 0 0; color: #8a9097; font-size: 8.5px; }
.social-info-box { margin-bottom: 14px; }
.social-disabled-feature { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,.55fr); gap: 12px; align-items: center; }
.social-save-row { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #e2ddd5; }

@media (max-width: 1450px) {
  .social-form-grid.four-cols { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .social-form-grid.three-cols { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1220px) {
  .social-layout { grid-template-columns: 1fr; }
  .social-creator-sidebar { position: static; }
  .social-creator-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .social-help-card { display: none; }
  .social-api-grid, .social-master-row { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .server-picker-wrap { min-width: 0; }
  .social-message-layout, .social-profile-basics { grid-template-columns: 1fr; }
  .social-form-grid.four-cols, .social-form-grid.three-cols, .social-form-grid.two-cols { grid-template-columns: 1fr; }
  .social-span-2 { grid-column: auto; }
  .social-disabled-feature { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .social-creator-list { grid-template-columns: 1fr; }
  .social-api-head, .social-editor-intro { grid-template-columns: 42px minmax(0,1fr); }
  .social-mini-toggle { grid-column: 1 / -1; justify-self: start; }
  .social-settings-footer { align-items: stretch; flex-direction: column; }
  .social-settings-footer .button { width: 100%; }
}

/* Discord Manager layman-friendly structure fix (v6.3.0) */
.topbar-context .module-orb.mini {
  display: none;
}
.topbar-context {
  gap: 0;
}

.editor-structure-toolbar {
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.editor-structure-toolbar .heading-actions.editor-structure-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.editor-structure-toolbar .heading-actions.editor-structure-actions .button,
.editor-structure-toolbar .heading-actions.editor-structure-actions .select {
  min-height: 42px;
}
.editor-structure-help {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.editor-structure-help > div {
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f7f5f1;
}
.editor-structure-help strong {
  display: block;
  color: #222831;
  font-size: 12px;
}
.editor-structure-help span {
  display: block;
  margin-top: 6px;
  color: #727983;
  font-size: 11px;
  line-height: 1.45;
}
.editor-structure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 16px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
@media (min-width: 1540px) {
  .editor-structure-grid {
    grid-template-columns: repeat(3, minmax(300px, 1fr));
  }
}
.editor-category-card {
  min-width: 0;
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfaf7;
  box-shadow: 0 8px 22px rgb(52 46 38 / 4%);
}
.editor-category-card:nth-child(4n) { border-right: 1px solid var(--border); }
.editor-category-card.deleted {
  opacity: .72;
  border-color: rgb(196 79 79 / 24%);
  background: rgb(196 79 79 / 4%);
}
.editor-category-card-head {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 0;
  border: 0;
  align-items: start;
}
.editor-category-title-block {
  min-width: 0;
  display: grid;
  gap: 7px;
}
.editor-category-label {
  color: #7a838f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.editor-category-name-input {
  height: 40px !important;
  font-size: 14px;
  font-weight: 800;
}
.editor-category-help {
  margin: 0;
  color: #767e87;
  font-size: 10px;
  line-height: 1.45;
}
.editor-category-head-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}
.editor-category-count {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #d6d1c8;
  border-radius: 999px;
  color: #5f6771;
  background: #f3f0eb;
  font-size: 10px;
  font-weight: 850;
}
.editor-category-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.editor-mini-button {
  width: 34px;
  height: 34px;
  border: 1px solid #d7d1c8;
  border-radius: 10px;
  color: #58636f;
  background: #f6f4f0;
  box-shadow: none;
  font-size: 14px;
  font-weight: 900;
}
.editor-mini-button:hover {
  color: #1d232b;
  border-color: #c4beb5;
  background: #eeebe6;
}
.editor-mini-button.danger {
  color: #aa4141;
  border-color: rgb(196 79 79 / 20%);
  background: rgb(196 79 79 / 6%);
}
.editor-mini-button.danger:hover {
  border-color: rgb(196 79 79 / 35%);
  background: rgb(196 79 79 / 10%);
}
.editor-channel-edit-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.editor-channel-empty {
  padding: 16px;
  border: 1px dashed #d8d2c9;
  border-radius: 12px;
  color: #757c86;
  background: #f7f5f1;
  text-align: center;
}
.editor-channel-empty strong,
.editor-channel-empty span {
  display: block;
}
.editor-channel-empty span {
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.5;
}
.editor-channel-edit-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f7f5f1;
}
.editor-channel-edit-row.deleted {
  opacity: .6;
}
.editor-channel-edit-row.selected {
  border-color: #9aa4af;
  box-shadow: 0 0 0 3px rgb(89 101 116 / 8%);
  background: #fbfaf7;
}
.editor-channel-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.editor-channel-kind-badge {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #ddd8d0;
  border-radius: 10px;
  color: #4f5965;
  background: #efede8;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}
.editor-channel-kind-badge.type-text { background: #f1efe9; }
.editor-channel-kind-badge.type-voice { background: #eef2f5; }
.editor-channel-kind-badge.type-announcement { background: #f5f1ea; }
.editor-channel-kind-badge.type-forum { background: #eef3ed; }
.editor-channel-kind-badge.type-stage { background: #f2eff6; }
.editor-channel-name-wrap {
  min-width: 0;
}
.editor-channel-name-wrap input {
  height: 38px;
}
.editor-channel-name-wrap small {
  display: block;
  margin-top: 5px;
  color: #818791;
  font-size: 10px;
  line-height: 1.4;
}
.editor-channel-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}
.editor-row-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #d5d0c7;
  border-radius: 10px;
  color: #4e5660;
  background: #f6f4f0;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}
.editor-row-button:hover {
  color: #282e36;
  border-color: #c4beb5;
  background: #eeebe6;
}
.editor-row-button.danger {
  color: #9f4141;
  border-color: rgb(196 79 79 / 22%);
  background: rgb(196 79 79 / 7%);
}
.editor-row-button.danger:hover {
  border-color: rgb(196 79 79 / 35%);
  background: rgb(196 79 79 / 11%);
}
.editor-category-footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.editor-category-footer .button {
  min-height: 38px;
}
.editor-channel-detail {
  margin-top: 18px;
}
@media (max-width: 1280px) {
  .editor-structure-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 920px) {
  .editor-structure-help {
    grid-template-columns: 1fr;
  }
  .editor-category-card-head,
  .editor-channel-edit-row,
  .editor-channel-main {
    grid-template-columns: 1fr;
  }
  .editor-category-head-side,
  .editor-channel-row-actions {
    justify-items: stretch;
    justify-content: flex-start;
  }
  .editor-row-button,
  .editor-category-footer .button {
    width: 100%;
    justify-content: center;
  }
  .editor-structure-toolbar .heading-actions.editor-structure-actions {
    width: 100%;
    justify-content: stretch;
  }
  .editor-structure-toolbar .heading-actions.editor-structure-actions > * {
    flex: 1 1 180px;
  }
}

/* User-specific panel permissions + protected System Admin (v6.3.0) */
.access-new-permissions {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f7f5f1;
}
.access-permission-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.access-permission-heading strong,
.access-permission-heading small {
  display: block;
}
.access-permission-heading strong {
  color: #242a32;
  font-size: 12px;
}
.access-permission-heading small {
  margin-top: 4px;
  color: #7c838c;
  font-size: 10px;
  line-height: 1.45;
}
.access-permission-quick-actions {
  display: flex;
  gap: 7px;
}
.access-permission-grid {
  display: grid;
  gap: 12px;
}
.access-permission-grid.compact-grid {
  margin-top: 2px;
}
.access-permission-group {
  padding: 13px;
  border: 1px solid #ded9d0;
  border-radius: 12px;
  background: #fbfaf7;
}
.access-permission-group h4 {
  margin: 0 0 10px;
  color: #69717c;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.access-permission-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.access-permission-option {
  position: relative;
  min-height: 62px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #ded9d0;
  border-radius: 11px;
  color: #48515c;
  background: #f7f5f1;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.access-permission-option:hover {
  border-color: #c7c1b8;
  background: #fffdf9;
}
.access-permission-option:has(input:checked) {
  border-color: #9ea8b3;
  background: #f1f3f4;
  box-shadow: inset 3px 0 0 #6d7885;
}
.access-permission-option.sensitive:has(input:checked) {
  border-color: #b7a77e;
  background: #f7f3e9;
  box-shadow: inset 3px 0 0 #9e8a59;
}
.access-permission-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.access-permission-check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border: 1px solid #c8c2b9;
  border-radius: 6px;
  background: #fffdf9;
}
.access-permission-option input:checked + .access-permission-check {
  border-color: #66717e;
  background: #66717e;
}
.access-permission-option input:checked + .access-permission-check::after {
  content: "✓";
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.access-permission-option input:disabled + .access-permission-check {
  border-color: #61705f;
  background: #61705f;
}
.access-permission-copy {
  min-width: 0;
}
.access-permission-copy strong,
.access-permission-copy small {
  display: block;
}
.access-permission-copy strong {
  color: #2b323a;
  font-size: 11px;
}
.access-permission-copy small {
  margin-top: 4px;
  color: #7b828b;
  font-size: 9px;
  line-height: 1.4;
}
.access-user-item.access-user-permission-card {
  display: block;
  padding: 16px;
  background: #fbfaf7;
}
.access-user-item.access-user-permission-card.system-admin {
  border-color: #b7c2b5;
  background: linear-gradient(180deg, #fbfcfa 0%, #f5f8f4 100%);
}
.access-user-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.access-user-status-wrap {
  flex: 0 0 auto;
}
.access-user-permission-block {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-soft);
}
.access-user-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-soft);
}
.access-user-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.access-user-card-footer .button {
  min-height: 36px;
  font-size: 10px;
}
.access-user-item.disabled-user {
  opacity: .72;
}
.access-user-item.disabled-user .access-user-permission-block {
  filter: saturate(.75);
}
@media (max-width: 1180px) {
  .access-permission-items {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .access-permission-heading,
  .access-user-card-header,
  .access-user-card-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .access-user-secondary-actions,
  .access-permission-quick-actions {
    width: 100%;
  }
  .access-user-secondary-actions .button,
  .access-user-card-footer > .button,
  .access-permission-quick-actions .button {
    flex: 1 1 auto;
  }
}


/* Ticket form + emoji picker usability fix (v6.3.0) */
.tickets-page .feature-card > label,
.tickets-page .ticket-type-basic-grid > label { display:grid; gap:7px; margin-top:14px; }
.ticket-type-basic-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(230px,300px); gap:14px; align-items:end; margin-top:12px; }
.tickets-page .ticket-text-input { min-height:48px; padding:0 14px !important; font-size:13px; }
.ticket-description-input { min-height:96px !important; padding:12px 14px !important; resize:vertical; font-size:13px; line-height:1.5; }
.tickets-page textarea.textarea:not(.ticket-description-input) { min-height:118px; padding:13px 14px !important; font-size:13px; line-height:1.55; }
.ticket-emoji-field { position:relative; }
.ticket-emoji-selector { position:relative; }
.ticket-emoji-trigger { width:100%; min-height:48px; display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:10px; padding:5px 12px 5px 7px; border:1px solid #d8d2c9; border-radius:10px; color:#252b33; background:#f9f7f3; text-align:left; cursor:pointer; transition:border-color .15s,box-shadow .15s,background .15s; }
.ticket-emoji-trigger:hover { border-color:#c8c1b7; background:#fffdf9; }
.ticket-emoji-trigger[aria-expanded="true"] { border-color:#929aa4; box-shadow:0 0 0 3px rgb(89 101 116 / 9%); }
.ticket-emoji-trigger-preview { width:42px; height:38px; display:grid; place-items:center; overflow:hidden; border:1px solid #e1ddd6; border-radius:9px; background:#efede8; font-size:22px; }
.ticket-emoji-trigger-preview img { width:26px; height:26px; object-fit:contain; }
.ticket-emoji-trigger-copy { min-width:0; }
.ticket-emoji-trigger-copy strong,.ticket-emoji-trigger-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ticket-emoji-trigger-copy strong { color:#252b33; font-size:12px; }
.ticket-emoji-trigger-copy small { margin-top:3px; color:#858b93; font-size:9px; }
.ticket-emoji-trigger-chevron { color:#69737e; font-size:18px; }
.ticket-emoji-picker { position:absolute; top:calc(100% + 8px); right:0; z-index:70; width:min(620px,calc(100vw - 48px)); max-height:min(620px,72vh); display:flex; flex-direction:column; overflow:hidden; border:1px solid #d5cfc6; border-radius:14px; background:#fffdf9; box-shadow:0 24px 60px rgb(44 39 33 / 18%); }
.ticket-emoji-picker.hidden { display:none; }
.ticket-emoji-picker-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 15px 10px; }
.ticket-emoji-picker-head strong,.ticket-emoji-picker-head small { display:block; }
.ticket-emoji-picker-head strong { color:#252b33; font-size:13px; }
.ticket-emoji-picker-head small { margin-top:3px; color:#858b93; font-size:9px; }
.ticket-emoji-search { min-height:42px !important; margin:0 14px 10px; }
.ticket-emoji-picker-body { min-height:0; flex:1; padding:0 14px 14px; overflow-y:auto; scrollbar-width:thin; }
.ticket-emoji-picker-section + .ticket-emoji-picker-section { margin-top:14px; }
.ticket-emoji-section-title { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:7px; color:#69717b; }
.ticket-emoji-section-title strong { color:#424a54; font-size:10px; font-weight:900; letter-spacing:.07em; text-transform:uppercase; }
.ticket-emoji-section-title span { font-size:9px; }
.ticket-emoji-grid { display:grid; grid-template-columns:repeat(10,minmax(38px,1fr)); gap:5px; }
.ticket-emoji-grid.server { grid-template-columns:repeat(5,minmax(92px,1fr)); }
.ticket-emoji-option { min-width:0; min-height:42px; display:grid; place-items:center; padding:4px; border:1px solid transparent; border-radius:9px; color:#252b33; background:transparent; font-size:23px; cursor:pointer; }
.ticket-emoji-option:hover { border-color:#d9d4cb; background:#f2efea; }
.ticket-emoji-option.server-emoji { min-height:58px; grid-template-columns:28px minmax(0,1fr); gap:6px; padding:6px 8px; text-align:left; }
.ticket-emoji-option.server-emoji img { width:28px; height:28px; object-fit:contain; }
.ticket-emoji-option.server-emoji small { min-width:0; overflow:hidden; color:#68717b; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.ticket-emoji-search-empty { grid-column:1/-1; padding:16px; border:1px dashed #d8d2c9; border-radius:10px; color:#858b93; background:#f7f5f1; font-size:10px; text-align:center; }
.ticket-inline-emoji { display:inline-flex; align-items:center; justify-content:center; }
.ticket-inline-emoji-image { width:20px; height:20px; object-fit:contain; vertical-align:middle; }
.ticket-type-list-title { display:inline-flex !important; align-items:center; gap:7px; }
@media (max-width:900px) {
  .ticket-type-basic-grid { grid-template-columns:1fr; }
  .ticket-emoji-picker { right:auto; left:0; width:min(560px,calc(100vw - 36px)); }
  .ticket-emoji-grid { grid-template-columns:repeat(8,minmax(36px,1fr)); }
  .ticket-emoji-grid.server { grid-template-columns:repeat(3,minmax(90px,1fr)); }
}
@media (max-width:560px) {
  .ticket-emoji-grid { grid-template-columns:repeat(6,minmax(34px,1fr)); }
  .ticket-emoji-grid.server { grid-template-columns:repeat(2,minmax(90px,1fr)); }
}


/* =====================================================================
   v6.3.0 · NEO DARK UI · 2026-08-28
   Global design system: sidebar, dashboard, forms, tables, modules & login.
   ===================================================================== */
:root {
  --bg: #070b14;
  --surface: #0d1524;
  --surface-2: #111c2e;
  --surface-3: #162238;
  --input: #09111f;
  --border: #1b2a41;
  --border-soft: #142238;
  --text: #f4f7fb;
  --muted: #9aa7b8;
  --muted-2: #66758a;
  --primary: #8b5cf6;
  --primary-hover: #a78bfa;
  --primary-pink: #ec4899;
  --primary-pink-2: #f472b6;
  --danger: #f05263;
  --amber: #f5a524;
  --green: #38d27a;
  --info: #38bdf8;
  --shadow: 0 18px 48px rgb(0 0 0 / 28%);
  --sidebar: #080e1a;
  --sidebar-2: #0d1626;
  --sidebar-text: #f6f8fb;
  --sidebar-muted: #91a0b3;
}
html { color-scheme: dark !important; background: var(--bg) !important; }
body {
  color: var(--text) !important;
  background:
    radial-gradient(circle at 78% -10%, rgb(124 58 237 / 10%), transparent 34%),
    radial-gradient(circle at 30% 110%, rgb(236 72 153 / 6%), transparent 32%),
    #070b14 !important;
}
.ambient { display: block !important; opacity: .18; filter: blur(20px); }
.ambient-one { background: #7c3aed !important; }
.ambient-two { background: #ec4899 !important; }

/* App shell / sidebar */
.app-shell { grid-template-columns: 292px minmax(0,1fr) !important; }
.sidebar {
  width: 292px !important;
  padding: 20px 16px 16px !important;
  overflow: hidden !important;
  border-right: 1px solid #15243a !important;
  background: linear-gradient(180deg, rgb(8 14 26 / 99%), rgb(8 13 23 / 99%)) !important;
  box-shadow: 18px 0 50px rgb(0 0 0 / 13%);
  backdrop-filter: blur(20px);
}
.sidebar .brand {
  min-height: 62px !important;
  margin: 0 2px !important;
  padding: 3px 10px 18px !important;
  border-bottom: 1px solid #15243a !important;
}
.sidebar .brand strong { color:#f7f9fc !important; font-size:18px !important; letter-spacing:-.02em; }
.sidebar .brand span { margin-top:4px !important; color:#728198 !important; font-size:9px !important; font-weight:800; letter-spacing:.16em; text-transform:uppercase; }
.navigation {
  display:block !important;
  flex:1 1 auto;
  min-height:0;
  margin-top:13px !important;
  padding-right:3px !important;
  overflow-y:auto !important;
  scrollbar-width:thin;
  scrollbar-color:#26364d transparent !important;
}
.navigation::-webkit-scrollbar { width:4px; }
.navigation::-webkit-scrollbar-thumb { border-radius:999px; background:#26364d; }
.sidebar-bot-status {
  min-height:54px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  margin:0 2px 13px;
  padding:9px 11px;
  border:1px solid #1a2940;
  border-radius:11px;
  background:linear-gradient(135deg,#101a2a,#0d1523);
  box-shadow:inset 0 1px 0 rgb(255 255 255 / 2%);
}
.sidebar-bot-status .module-orb { width:34px !important; height:34px !important; border-radius:9px !important; color:#d7c7ff !important; background:linear-gradient(145deg,rgb(139 92 246 / 25%),rgb(236 72 153 / 12%)) !important; box-shadow:none !important; }
.sidebar-bot-copy { min-width:0; }
.sidebar-bot-copy strong,.sidebar-bot-copy small { display:block; }
.sidebar-bot-copy strong { color:#eef2f8; font-size:11px; }
.sidebar-bot-copy small { margin-top:3px; overflow:hidden; color:#73849b; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.status-dot { box-shadow:0 0 12px currentColor; }

.module-nav-items { padding:0 !important; border:0 !important; }
.nav-category { margin:0 0 6px; border:0; }
.nav-category > summary {
  height:30px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:0 9px;
  color:#65758b;
  list-style:none;
  font-size:8px;
  font-weight:900;
  letter-spacing:.13em;
  text-transform:uppercase;
  cursor:pointer;
  user-select:none;
}
.nav-category > summary::-webkit-details-marker { display:none; }
.nav-category > summary:hover { color:#a0aec0; }
.nav-category-chevron { color:#53657d; font-size:13px; line-height:1; transition:transform .18s ease; }
.nav-category:not([open]) .nav-category-chevron { transform:rotate(-90deg); }
.nav-category-items { display:grid; gap:2px; padding:0 2px 3px; }
.nav-item {
  position:relative;
  min-height:43px !important;
  display:grid !important;
  grid-template-columns:31px minmax(0,1fr);
  align-items:center;
  gap:10px !important;
  margin:0 !important;
  padding:5px 9px !important;
  border:1px solid transparent !important;
  border-radius:9px !important;
  color:#9aa8bb !important;
  background:transparent !important;
  font-weight:700 !important;
  box-shadow:none !important;
  transition:color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease !important;
}
.nav-item:hover {
  color:#eef2f8 !important;
  border-color:#17263c !important;
  background:#0f1929 !important;
  transform:translateX(1px);
}
.nav-item.active {
  color:#fff !important;
  border-color:rgb(139 92 246 / 32%) !important;
  background:linear-gradient(90deg,rgb(124 58 237 / 24%),rgb(236 72 153 / 12%) 76%,rgb(236 72 153 / 5%)) !important;
  box-shadow:inset 2px 0 0 #ec4899, 0 0 18px rgb(124 58 237 / 7%) !important;
}
.nav-icon {
  width:31px !important;
  height:31px !important;
  display:grid !important;
  place-items:center;
  border:1px solid #1a2940 !important;
  border-radius:8px !important;
  color:#8796aa !important;
  background:#101929 !important;
  box-shadow:none !important;
}
.nav-icon svg { width:15px !important; height:15px !important; fill:currentColor; }
.nav-item:hover .nav-icon { color:#c2cce0 !important; border-color:#263852 !important; }
.nav-item.active .nav-icon {
  color:#f5eaff !important;
  border-color:rgb(236 72 153 / 32%) !important;
  background:linear-gradient(145deg,rgb(139 92 246 / 27%),rgb(236 72 153 / 18%)) !important;
}
.nav-copy strong,.nav-copy small { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nav-copy strong { color:inherit !important; font-size:11px !important; font-weight:760 !important; }
.nav-copy small { margin-top:2px !important; color:#596b82 !important; font-size:8px !important; font-weight:600 !important; }
.nav-item.active .nav-copy small { color:#9c8fc5 !important; }
.sidebar-note {
  flex:0 0 auto;
  min-height:58px;
  margin:10px 2px 0 !important;
  padding:10px 12px !important;
  border:1px solid #1b2a41 !important;
  border-radius:11px !important;
  color:#eef2f7 !important;
  background:linear-gradient(145deg,#101a2a,#0b1321) !important;
  box-shadow:inset 0 1px 0 rgb(255 255 255 / 2%);
}
.sidebar-note .shield-icon { color:#ec4899 !important; }
.sidebar-note strong { margin:0 0 3px !important; font-size:11px !important; }
.sidebar-note span { color:#687a91 !important; font-size:8px !important; }

/* Workspace / topbar */
.workspace { grid-column:2 !important; min-width:0; background:transparent !important; }
.topbar {
  height:70px !important;
  padding:0 30px !important;
  border-bottom:1px solid #17263d !important;
  background:rgb(7 12 22 / 88%) !important;
  box-shadow:0 10px 35px rgb(0 0 0 / 10%);
  backdrop-filter:blur(20px) saturate(120%);
}
.topbar-context strong { color:#f4f7fb !important; font-size:13px !important; }
.topbar-context small,.server-picker-wrap label,.user-menu span { color:#63748b !important; }
.module-orb.mini { color:#e8ddff !important; border:1px solid rgb(139 92 246 / 30%); background:rgb(124 58 237 / 15%) !important; }
.connection-pill { color:#92a3b8 !important; border-color:#1c2c44 !important; background:#0d1727 !important; }
.connection-pill.online { color:#84e7aa !important; border-color:rgb(56 210 122 / 22%) !important; background:rgb(56 210 122 / 7%) !important; }
.user-menu strong { color:#e9edf4 !important; }
.user-menu img { border:1px solid #25364e; }

/* Main content and headings */
.content { width:min(1580px,100%) !important; padding:28px 30px 70px !important; }
.page-heading { align-items:center !important; margin-bottom:22px !important; }
.page-heading h1,.section-heading h2,.dashboard-hero h1 { color:#f5f7fb !important; }
.page-heading h1 { margin:5px 0 7px !important; font-size:clamp(26px,3vw,36px) !important; letter-spacing:-.035em; }
.page-heading p:not(.eyebrow),.section-heading p:not(.eyebrow),.dashboard-hero p { color:#8594a8 !important; }
.eyebrow { color:#a78bfa !important; font-size:9px !important; letter-spacing:.14em !important; }
.section-heading { margin:4px 0 16px !important; }
.section-heading > span { color:#63748a !important; }

/* Dashboard */
.dashboard-page { gap:16px !important; }
.dashboard-hero {
  min-height:112px !important;
  padding:20px 22px !important;
  border:1px solid #1a2940 !important;
  border-radius:12px !important;
  background:linear-gradient(135deg,#0e1828 0%,#0b1422 65%,rgb(124 58 237 / 8%) 100%) !important;
  box-shadow:0 12px 38px rgb(0 0 0 / 16%) !important;
}
.dashboard-hero::after { content:"" !important; display:none !important; }
.dashboard-hero h1 { margin:5px 0 7px !important; font-size:28px !important; letter-spacing:-.035em !important; }
.dashboard-user-name { display:none !important; }
.dashboard-hero p:not(.eyebrow) { max-width:720px; line-height:1.55 !important; }
.hero-live { min-width:190px; padding:10px 12px !important; border-color:#21324a !important; border-radius:10px !important; background:#0a1321 !important; }
.hero-live small { color:#64758c !important; }
.hero-live strong { color:#dfe7f2 !important; }
.dashboard-stats { grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:12px !important; }
.stat-card {
  min-height:88px !important;
  padding:14px !important;
  border:1px solid #1a2940 !important;
  border-radius:11px !important;
  color:#f1f5fa !important;
  background:linear-gradient(145deg,#0e1828,#0b1422) !important;
  box-shadow:0 8px 24px rgb(0 0 0 / 12%) !important;
}
.stat-card:hover { border-color:#2b3e59 !important; transform:translateY(-1px); }
.stat-card small { color:#6f8097 !important; font-size:8px !important; }
.stat-card strong { color:#eef3f9 !important; }
.stat-icon { color:#d9ccff !important; border-color:rgb(139 92 246 / 20%) !important; background:rgb(124 58 237 / 10%) !important; box-shadow:none !important; }
.dashboard-shortcut-grid { grid-template-columns:repeat(4,minmax(0,1fr)) !important; gap:10px !important; }
.dashboard-shortcut-card {
  min-height:72px !important;
  padding:12px !important;
  border:1px solid #19283f !important;
  border-radius:10px !important;
  color:#cbd5e1 !important;
  background:#0d1726 !important;
  box-shadow:none !important;
}
.dashboard-shortcut-card:hover { border-color:rgb(139 92 246 / 34%) !important; background:linear-gradient(145deg,#111c2d,#101827) !important; transform:translateY(-1px) !important; }
.dashboard-shortcut-icon { color:#c8b8ff !important; border-color:#243650 !important; background:#111d30 !important; }
.dashboard-shortcut-copy strong { color:#e8edf5 !important; }
.dashboard-shortcut-copy small { color:#66778e !important; }
.dashboard-shortcut-arrow { color:#596b83 !important; }
.dashboard-guild-item,.dashboard-guild-empty { border-color:#1a2940 !important; color:#e7edf5 !important; background:#0d1726 !important; }
.dashboard-guild-item:hover,.dashboard-guild-item.active { border-color:rgb(139 92 246 / 34%) !important; background:rgb(124 58 237 / 8%) !important; }
.guild-fallback { background:#152239 !important; color:#b8a7ef !important; }

/* Panels, cards, tables */
.panel,.feature-card,.module-card,.stat-card,.quick-panel,.social-creator-sidebar {
  border-color:#1a2940 !important;
  color:var(--text) !important;
  background:linear-gradient(145deg,#0e1828,#0c1523) !important;
  box-shadow:0 8px 28px rgb(0 0 0 / 12%) !important;
}
.panel:hover,.feature-card:hover,.module-card:hover { border-color:#23364f !important; }
.panel h2,.panel h3,.panel-heading h3,.feature-card h3,.module-card h3 { color:#eef3f9 !important; }
.panel > p,.panel-title-row p,.feature-card > p,.module-card p { color:#7f8fa4 !important; }
.compact-title-row,hr { border-color:#18273d !important; }
.feature-tabs,.editor-tabs,.social-platform-tabs {
  padding:4px !important;
  border-color:#1b2a41 !important;
  border-radius:10px !important;
  background:#091321 !important;
}
.feature-tabs button,.editor-tab,.social-platform-tabs button { color:#72839a !important; background:transparent !important; }
.feature-tabs button.active,.editor-tab.active,.social-platform-tabs button.active {
  color:#f5f7fb !important;
  background:linear-gradient(180deg,rgb(124 58 237 / 20%),rgb(236 72 153 / 10%)) !important;
  box-shadow:inset 0 0 0 1px rgb(139 92 246 / 20%) !important;
}
.record-row,.empty-card,.notice-box,.stats-mini,.remote-command-row,.permission-matrix > *,.mapping-row,.managed-selection-item,
.access-new-permissions,.access-permission-group,.access-permission-option,.access-user-item.access-user-permission-card,
.ticket-emoji-trigger,.ticket-emoji-search-empty,.social-preview-card {
  border-color:#1b2a41 !important;
  color:#d8e0eb !important;
  background:#0a1422 !important;
}
.record-row:hover,.managed-selection-item:hover,.access-permission-option:hover { border-color:#2a3c57 !important; background:#0d192a !important; }
.record-row strong,.managed-selection-item strong,.access-permission-copy strong,.access-permission-heading strong,.access-user-card-header strong { color:#e8eef6 !important; }
.record-row small,.empty-card,.notice-box p,.access-permission-copy small,.access-permission-heading small { color:#718198 !important; }
.table-wrap,.audit-table-wrap { border-color:#1a2940 !important; background:#0c1625 !important; }
table,th,td { border-color:#17263b !important; }
th { color:#73859d !important; background:#0a1320 !important; }
td { color:#d7e0ea !important; background:#0d1726 !important; }
tbody tr:hover td { background:#101c2d !important; }
.feature-output { border-color:#1a2940 !important; color:#b9c8d8 !important; background:#07101c !important; }

/* Forms */
.field label,.label-row label,.feature-card label,.mapping-role-heading > span,.mapping-emoji-field > span,.toggle-line { color:#a9b5c5 !important; }
input[type="text"],input[type="password"],input[type="number"],input[type="datetime-local"],input[type="time"],input[type="url"],textarea,.input,.textarea,.select,
.ticket-text-input,.ticket-description-input,.ticket-emoji-search {
  border-color:#1d2d45 !important;
  color:#e9eef6 !important;
  background-color:#08111f !important;
  box-shadow:inset 0 1px 0 rgb(255 255 255 / 2%) !important;
}
input::placeholder,textarea::placeholder { color:#4f6077 !important; }
input:focus,textarea:focus,.input:focus,.textarea:focus,.select:focus,.ticket-emoji-trigger[aria-expanded="true"] {
  border-color:rgb(139 92 246 / 68%) !important;
  box-shadow:0 0 0 3px rgb(124 58 237 / 12%) !important;
}
.select { color-scheme:dark; background-image:linear-gradient(45deg,transparent 50%,#74859c 50%),linear-gradient(135deg,#74859c 50%,transparent 50%) !important; }
.select option { color:#dfe7f1; background:#0b1422; }
.color-input input[type="color"] { border-color:#1d2d45 !important; background:#091321 !important; }
code { color:#c4b5fd !important; border-color:#243650 !important; background:#091321 !important; }
.switch > span { border-color:#293a52 !important; background:#172238 !important; }
.switch > span::after { background:#dfe7f2 !important; box-shadow:0 2px 6px rgb(0 0 0 / 35%) !important; }
.switch input:checked + span { border-color:#a855f7 !important; background:linear-gradient(90deg,#7c3aed,#db2777) !important; }
input[type="range"] { accent-color:#8b5cf6 !important; }

/* Buttons / controls */
.button { min-height:38px; border-radius:9px !important; box-shadow:none !important; }
.button.primary {
  color:#fff !important;
  border-color:rgb(236 72 153 / 48%) !important;
  background:linear-gradient(135deg,#7c3aed,#db2777) !important;
  box-shadow:0 8px 22px rgb(124 58 237 / 16%) !important;
}
.button.primary:hover { filter:brightness(1.08) !important; background:linear-gradient(135deg,#8b5cf6,#ec4899) !important; }
.button.secondary { color:#bac5d3 !important; border-color:#243650 !important; background:#101a2b !important; }
.button.secondary:hover { color:#f3f6fa !important; border-color:#354a67 !important; background:#142137 !important; }
.button.ghost { color:#8595aa !important; }
.button.danger { color:#ff8792 !important; border-color:rgb(240 82 99 / 28%) !important; background:rgb(240 82 99 / 8%) !important; }
.icon-button { color:#9baabc !important; border-color:#21324a !important; background:#0e1828 !important; }
.icon-button:hover { color:#f1f5f9 !important; border-color:#334964 !important; background:#142137 !important; }
.status-badge { color:#8fa0b5 !important; border-color:#24354e !important; background:#101a2a !important; }
.status-badge.online { color:#79dda0 !important; border-color:rgb(56 210 122 / 25%) !important; background:rgb(56 210 122 / 8%) !important; }
.status-badge.danger,.notice-box.danger { color:#ff8d97 !important; border-color:rgb(240 82 99 / 28%) !important; background:rgb(240 82 99 / 7%) !important; }

/* Managed lists / permissions */
.managed-selection-block { border-color:#1a2940 !important; background:#0a1422 !important; }
.managed-selection-toolbar { border-color:#18273d !important; background:#091321 !important; }
.managed-selection-label { color:#c0cad7 !important; }
.managed-selection-heading small,.field-help,.counter { color:#64758b !important; }
.access-permission-option:has(input:checked) { border-color:rgb(139 92 246 / 36%) !important; background:rgb(124 58 237 / 8%) !important; box-shadow:inset 2px 0 0 #8b5cf6 !important; }
.access-permission-option.sensitive:has(input:checked) { border-color:rgb(236 72 153 / 38%) !important; background:rgb(236 72 153 / 7%) !important; box-shadow:inset 2px 0 0 #ec4899 !important; }
.access-permission-check { border-color:#304159 !important; background:#0b1524 !important; }
.access-permission-option input:checked + .access-permission-check { border-color:#8b5cf6 !important; background:#7c3aed !important; }
.access-user-item.access-user-permission-card.system-admin { border-color:rgb(56 210 122 / 24%) !important; background:linear-gradient(145deg,#0d1927,#0b1722) !important; }
.access-user-permission-block,.access-user-card-footer { border-color:#18273d !important; }

/* Ticket emoji picker */
.ticket-emoji-trigger-preview { border-color:#22344d !important; background:#101b2d !important; }
.ticket-emoji-trigger-copy strong { color:#e9eef6 !important; }
.ticket-emoji-trigger-copy small,.ticket-emoji-trigger-chevron { color:#6d7e94 !important; }
.ticket-emoji-picker { border-color:#243650 !important; background:#0b1524 !important; box-shadow:0 26px 70px rgb(0 0 0 / 45%) !important; }
.ticket-emoji-picker-head strong { color:#edf2f8 !important; }
.ticket-emoji-picker-head small { color:#718198 !important; }
.ticket-emoji-picker-body { scrollbar-color:#33465f transparent !important; }
.ticket-emoji-section-title { color:#6e8097 !important; }
.ticket-emoji-section-title strong { color:#a8b5c5 !important; }
.ticket-emoji-option { color:#e5ebf3 !important; }
.ticket-emoji-option:hover { border-color:#2a3d57 !important; background:#111d30 !important; }
.ticket-emoji-option.server-emoji small { color:#718198 !important; }

/* Social media */
.social-creator-item { color:#aeb9c8 !important; }
.social-creator-item:hover { border-color:#22334c !important; background:#101b2d !important; }
.social-creator-item.active { border-color:rgb(139 92 246 / 34%) !important; background:rgb(124 58 237 / 9%) !important; }
.social-avatar { background:linear-gradient(145deg,#7c3aed,#db2777) !important; }
.social-creator-copy strong { color:#e9eef6 !important; }
.social-creator-copy small { color:#6e7e94 !important; }
.social-preview-card { background:#091321 !important; }
.social-preview-card > small { color:#65758c !important; }
.social-preview-embed { border-color:#20324b !important; background:#0d1726 !important; box-shadow:none !important; }
.social-preview-embed strong { color:#edf2f8 !important; }
.social-preview-embed p { color:#8e9caf !important; }

/* Keep previews distinctly Discord-like while matching surrounding Neo Dark */
.discord-preview,.discord-preview-shell,.embed-preview,.welcome-card-preview { color:#f2f3f5 !important; }
.discord-preview,.discord-preview-shell { border-color:#25364d !important; background:#1e2026 !important; }
.embed-preview { border-color:#25364d !important; background:#25272e !important; }

/* Login */
.login-view { background:radial-gradient(circle at 25% 20%,rgb(124 58 237 / 12%),transparent 30%),linear-gradient(135deg,#070b14,#0a1020 58%,#0a0d17) !important; }
.login-layout { border-color:#1a2940 !important; background:#0b1422 !important; box-shadow:0 32px 90px rgb(0 0 0 / 40%) !important; }
.login-hero { color:#f7f8fb !important; background:linear-gradient(145deg,#0b1321,#0b1020 60%,#17102a) !important; }
.login-card-wrap { background:#09111e !important; }
.login-card { border-color:#1c2d46 !important; color:#eef3f9 !important; background:#0d1726 !important; box-shadow:0 20px 50px rgb(0 0 0 / 24%) !important; }
.login-card h2 { color:#f5f7fb !important; }
.login-card .muted,.login-hint { color:#74859c !important; }
.panel-wordmark span,.login-copy h1 span { color:#c084fc !important; }
.brand-mark { color:#fff !important; background:linear-gradient(145deg,#7c3aed,#ec4899) !important; box-shadow:0 18px 42px rgb(124 58 237 / 22%) !important; }

/* Misc / overlays / scrollbars */
* { scrollbar-color:#293b54 transparent; }
.toast { color:#fff !important; background:#121e30 !important; border:1px solid #243650; box-shadow:0 18px 46px rgb(0 0 0 / 35%) !important; }
.toast.error { background:#38151d !important; border-color:rgb(240 82 99 / 30%) !important; }
.loading-overlay { background:rgb(5 9 17 / 72%) !important; backdrop-filter:blur(4px); }
.loading-spinner { border-color:#23344d !important; border-top-color:#a855f7 !important; }

@media (max-width: 1180px) {
  .dashboard-shortcut-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
}
@media (max-width: 980px) {
  .app-shell { grid-template-columns:1fr !important; }
  .sidebar { width:min(292px,88vw) !important; }
  .workspace { grid-column:1 !important; }
  .dashboard-shortcut-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}
@media (max-width: 720px) {
  .content { padding:22px 16px 60px !important; }
  .topbar { padding:0 15px !important; }
  .dashboard-hero { padding:17px !important; }
  .dashboard-stats,.dashboard-shortcut-grid { grid-template-columns:1fr !important; }
  .hero-live { width:100%; min-width:0; }
}


/* =====================================================================
   v6.3.0 · NEO DARK MANAGER HOTFIX · 2026-08-28
   Discord Manager structure cards / steps fully aligned to Neo Dark.
   ===================================================================== */
.editor-structure-help > div {
  border-color: rgba(132, 154, 190, 0.14);
  background:
    linear-gradient(180deg, rgba(16, 24, 39, 0.92), rgba(11, 17, 32, 0.96));
  box-shadow: 0 14px 34px rgba(3, 8, 18, 0.34);
}
.editor-structure-help strong {
  color: #f3f6fd;
  font-size: 12px;
}
.editor-structure-help span {
  color: #9aa9bf;
}

.editor-category-card {
  border-color: rgba(132, 154, 190, 0.12);
  background:
    linear-gradient(180deg, rgba(18, 27, 44, 0.96), rgba(11, 17, 32, 0.98));
  box-shadow: 0 18px 40px rgba(3, 8, 18, 0.28);
}
.editor-category-card.deleted {
  border-color: rgba(239, 68, 68, 0.22);
  background: linear-gradient(180deg, rgba(42, 15, 22, 0.82), rgba(24, 11, 17, 0.94));
}
.editor-category-label {
  color: #7f8fa9;
}
.editor-category-help {
  color: #8d9cb0;
}
.editor-category-count {
  border-color: rgba(132, 154, 190, 0.14);
  color: #d7deea;
  background: rgba(15, 24, 39, 0.9);
}
.editor-mini-button {
  border-color: rgba(132, 154, 190, 0.14);
  color: #a7b4c6;
  background: rgba(17, 25, 40, 0.96);
}
.editor-mini-button:hover {
  color: #f3f6fd;
  border-color: rgba(168, 85, 247, 0.32);
  background: rgba(124, 58, 237, 0.12);
}
.editor-mini-button.danger {
  color: #f0a1a1;
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(80, 22, 30, 0.34);
}
.editor-mini-button.danger:hover {
  border-color: rgba(239, 68, 68, 0.38);
  background: rgba(112, 28, 38, 0.42);
}

.editor-channel-empty {
  border-color: rgba(132, 154, 190, 0.2);
  color: #9aa9bf;
  background: rgba(12, 20, 34, 0.9);
}
.editor-channel-edit-row {
  border-color: rgba(132, 154, 190, 0.12);
  background: rgba(12, 20, 34, 0.92);
}
.editor-channel-edit-row.selected {
  border-color: rgba(168, 85, 247, 0.38);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12);
  background: rgba(18, 28, 46, 0.96);
}
.editor-channel-kind-badge {
  border-color: rgba(132, 154, 190, 0.14);
  color: #d7deea;
  background: rgba(17, 25, 40, 0.96);
}
.editor-channel-kind-badge.type-text {
  color: #bcd6ff;
  background: rgba(55, 125, 255, 0.12);
}
.editor-channel-kind-badge.type-voice {
  color: #b8ebda;
  background: rgba(34, 197, 94, 0.11);
}
.editor-channel-kind-badge.type-announcement {
  color: #ffd4a0;
  background: rgba(245, 158, 11, 0.11);
}
.editor-channel-kind-badge.type-forum {
  color: #dfc7ff;
  background: rgba(168, 85, 247, 0.13);
}
.editor-channel-kind-badge.type-stage {
  color: #ffc6ea;
  background: rgba(236, 72, 153, 0.12);
}
.editor-channel-name-wrap small {
  color: #8797ac;
}
.editor-row-button {
  border-color: rgba(132, 154, 190, 0.14);
  color: #d2d9e5;
  background: rgba(17, 25, 40, 0.96);
}
.editor-row-button:hover {
  color: #ffffff;
  border-color: rgba(168, 85, 247, 0.28);
  background: rgba(124, 58, 237, 0.12);
}
.editor-row-button.danger {
  color: #f0a1a1;
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(80, 22, 30, 0.34);
}
.editor-row-button.danger:hover {
  border-color: rgba(239, 68, 68, 0.38);
  background: rgba(112, 28, 38, 0.42);
}
.editor-category-footer {
  border-top-color: rgba(132, 154, 190, 0.12);
}
.editor-channel-detail {
  border-color: rgba(132, 154, 190, 0.12);
  background: linear-gradient(180deg, rgba(18, 27, 44, 0.96), rgba(11, 17, 32, 0.98));
  box-shadow: 0 18px 40px rgba(3, 8, 18, 0.26);
}
.editor-channel-detail.attention {
  border-color: rgba(168, 85, 247, 0.42);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.10);
}



/* Simple Social Media UI current-theme fix (v6.3.0) */
.social-simple-page .social-simple-layout{display:grid;grid-template-columns:minmax(250px,300px) minmax(0,1fr);gap:18px;align-items:start}
.social-simple-page .social-simple-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.social-simple-page .social-connection-stat strong{font-size:14px!important}
.social-simple-page .social-connection-ready{color:#79dda0!important}
.social-simple-page .social-connection-needed{color:#f5b95f!important}
.social-simple-page .social-simple-sidebar{position:sticky;top:88px}
.social-simple-page .simple-help{display:grid;gap:7px;border-color:#1b2b42!important;background:#0a1422!important}
.social-simple-page .simple-help strong{color:#e6edf6!important}
.social-simple-page .simple-help span{color:#8494a9!important}
.social-simple-page .simple-help b{color:#c5d0dd!important}
.social-simple-page .social-simple-main{display:grid;gap:16px}
.social-simple-page .social-simple-editor{padding:22px}
.social-simple-master-switches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}
.social-simple-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.social-simple-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}
.social-simple-page .social-switch-card{border-color:#1d2d45!important;color:#d7e0ea!important;background:#0a1422!important}
.social-simple-page .social-switch-card strong{color:#dfe7f1!important}
.social-simple-page .social-switch-card small{color:#75869c!important}
.social-simple-page .anti-spam-option{border-color:rgb(139 92 246 / 24%)!important;background:rgb(124 58 237 / 7%)!important}
.social-offline-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,360px);gap:16px;align-items:center;margin-top:16px;padding:16px;border:1px solid #1d2d45;border-radius:13px;background:#0a1422}
.social-offline-card strong,.social-offline-card small{display:block}.social-offline-card strong{color:#e3eaf3}.social-offline-card small{margin-top:5px;color:#75869c;font-size:10px}
.social-simple-details{margin-top:16px;border:1px solid #1d2d45;border-radius:13px;background:#091321;overflow:hidden}
.social-simple-details>summary{min-height:52px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:0 16px;cursor:pointer;list-style:none;color:#d5deea;font-size:11px;font-weight:850}
.social-simple-details>summary::-webkit-details-marker{display:none}.social-simple-details>summary:after{content:'⌄';font-size:17px;color:#74859c}.social-simple-details[open]>summary:after{transform:rotate(180deg)}
.social-simple-details>summary span{display:grid;gap:3px}.social-simple-details>summary small{color:#6e7e94;font-size:9px;font-weight:600}.social-simple-details>summary>strong{color:#8fa0b5;font-size:10px}
.social-simple-details[open]>summary{border-bottom:1px solid #18273d;background:#0d1726}
.simple-message-layout,.social-technical-content{padding:16px}
.simple-save-row{margin-top:18px;padding-top:16px;border-top:1px solid #18273d}
.social-simple-connection-panel,.social-tiktok-optional-panel{padding:0!important;overflow:hidden}
.social-simple-connection-panel .social-simple-details,.social-tiktok-optional-panel .social-simple-details{margin:0;border:0;border-radius:0}
.social-technical-content{display:grid;gap:14px}
.social-simple-page .social-card-actions{display:flex;justify-content:flex-end;gap:9px}
.social-simple-page .social-platform-tabs{margin:6px 0 0}
.social-simple-page .social-field-block>span{color:#aebac9!important}
.social-simple-page .social-field-block>small{color:#6e7e94!important}
.social-simple-page .social-preview-card{border-color:#1d2d45!important;background:#091321!important}
.social-simple-page .social-preview-embed{border-color:#20324b!important;background:#0d1726!important}
.social-simple-page .social-technical-content .notice-box{border-color:#1e3048!important;background:#0b1625!important}
.social-simple-page .social-technical-content .notice-box strong{color:#dfe7f1!important}
.social-simple-page .social-technical-content .notice-box p{color:#7e8fa5!important}
.social-simple-page .social-creator-sidebar,.social-simple-page .social-editor-panel,.social-simple-page .social-simple-connection-panel,.social-simple-page .social-tiktok-optional-panel,.social-simple-page .social-permissions-panel{border-color:#1a2940!important;background:linear-gradient(180deg,#0d1726,#0a1321)!important}
@media(max-width:1200px){.social-simple-page .social-simple-layout{grid-template-columns:1fr}.social-simple-page .social-simple-sidebar{position:static}.social-simple-page .social-simple-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.social-simple-master-switches,.social-simple-form,.social-simple-options,.social-offline-card{grid-template-columns:1fr}.social-simple-page .social-simple-stats{grid-template-columns:1fr}.social-simple-page .simple-save-row{display:grid;grid-template-columns:1fr}.social-simple-page .simple-save-row .button{width:100%}}
