.moderation-manager-head {
  padding: 0 0 14px;
}

.moderation-manager-head h2 {
  margin: 0;
  color: var(--dg-text);
  font-size: 1.2rem;
  font-weight: 750;
}

.moderation-manager-head .page-eyebrow,
.moderation-manager-head p {
  display: none;
}

.moderation-manager-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.moderation-manager-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 48px;
  margin: 0 -24px 24px;
  padding: 0 24px;
  border-top: 1px solid rgba(var(--dg-highlight-rgb), 0.28);
  border-bottom: 1px solid rgba(var(--dg-highlight-rgb), 0.28);
  background: linear-gradient(90deg, rgba(var(--dg-highlight-rgb), 0.16), rgba(12, 20, 29, 0.7));
}

.moderation-tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 47px;
  padding: 0 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--dg-text-muted);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
}

.moderation-tab-button:hover,
.moderation-tab-current {
  color: var(--dg-text);
  background: rgba(var(--dg-highlight-rgb), 0.12);
}

.moderation-tab-current {
  color: var(--dg-highlight);
  border-bottom-color: var(--dg-highlight);
}

.moderation-tab-primary {
  margin-right: auto;
  color: var(--dg-text);
  background: rgba(var(--dg-highlight-rgb), 0.13);
  border-bottom-color: var(--dg-highlight);
}

.moderation-manager-tabs .moderation-tab-primary,
.moderation-manager-tabs .moderation-tab-button:not(.moderation-tab-current) {
  display: none;
}

.moderation-manager-tabs {
  justify-content: flex-start;
}

@media (max-width: 740px) {
  .moderation-manager-head,
  .moderation-manager-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .moderation-manager-actions .dg-table-action,
  .moderation-manager-head > .dg-table-action {
    justify-content: center;
    text-align: center;
  }
}

.report-action-menu { position: relative; display: inline-flex; }
.report-action-menu-items { position: absolute; z-index: 25; top: calc(100% + 6px); right: 0; display: none; min-width: 150px; padding: 6px; border: 1px solid var(--dg-border); border-radius: 10px; background: var(--dg-bg-deep); }
.report-action-menu.is-open .report-action-menu-items { display: grid; gap: 4px; }
.report-action-menu-items button { border: 0; border-radius: 7px; padding: 8px 10px; background: transparent; color: var(--dg-text); text-align: left; cursor: pointer; }
.report-action-menu-items button:hover { background: rgba(var(--dg-highlight-rgb), .12); color: var(--dg-highlight); }
.report-action-menu-items button.is-danger:hover { background: rgba(255,82,82,.12); color: #ff8f8f; }
.dg-modal-label { display: grid; gap: 7px; margin-top: 16px; color: var(--dg-text-muted); }
.dg-modal-label textarea { width: 100%; box-sizing: border-box; resize: none; padding: 10px 12px; border: 1px solid var(--dg-line); border-radius: 9px; background: var(--dg-bg-deep); color: var(--dg-text); }


.whitelist-role-search { width: 100%; min-height: 42px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--dg-line); border-radius: 9px; background: var(--dg-bg-deep); color: var(--dg-text); outline: 0; }
.whitelist-role-search:focus { border-color: var(--dg-highlight); }

.mc-layout { display: grid; gap: 18px; }
.mc-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; background: rgba(11, 15, 20, .55); }
.mc-tab { display: inline-flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #c4cdd8; font-size: .88rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.mc-tab i { font-size: 15px; opacity: .85; }
.mc-tab b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--dg-text-muted); font-size: .72rem; font-weight: 700; text-align: center; }
.mc-tab:hover { background: rgba(255, 255, 255, .04); color: #fff; }
.mc-tab.is-active { border-color: color-mix(in srgb, var(--dg-highlight) 65%, transparent); background: color-mix(in srgb, var(--dg-highlight) 8%, transparent); color: var(--dg-highlight); }
.mc-tab.is-active b { background: color-mix(in srgb, var(--dg-highlight) 18%, transparent); color: var(--dg-highlight); }
.mc-panel { display: grid; gap: 14px; }

.mc-intro { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--dg-highlight) 22%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--dg-highlight) 5%, transparent); }
.mc-intro-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--dg-highlight) 14%, transparent); color: var(--dg-highlight); font-size: 18px; }
.mc-intro strong { display: block; color: #fff; font-size: .95rem; }
.mc-intro p { margin: 4px 0 0; color: var(--dg-text-muted); font-size: .86rem; line-height: 1.5; }
.mc-steps { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0 0; padding: 0; list-style: none; counter-reset: mc-step; }
.mc-steps li { display: inline-flex; align-items: center; gap: 8px; color: #c4cdd8; font-size: .82rem; counter-increment: mc-step; }
.mc-steps li::before { content: counter(mc-step); display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--dg-highlight) 16%, transparent); color: var(--dg-highlight); font-size: .72rem; font-weight: 800; }

.mc-list-head { display: flex; justify-content: space-between; gap: 12px; padding: 0 4px; color: var(--dg-text-dim); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.dg-setup-list { display: flex; flex-direction: column; gap: 10px; }
.dg-setup-item { position: relative; border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; background: rgba(255, 255, 255, .02); transition: border-color .2s ease, opacity .2s ease; }
.dg-setup-item:hover { border-color: rgba(255, 255, 255, .12); }
.dg-setup-item.is-open { border-color: color-mix(in srgb, var(--dg-highlight) 30%, transparent); }
.dg-setup-item.is-disabled .dg-setup-item-main { opacity: .55; }
.dg-setup-item-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-radius: 10px; cursor: pointer; user-select: none; outline: none; transition: background .15s ease; }
.dg-setup-item-header:hover, .dg-setup-item-header:focus-visible { background: rgba(255, 255, 255, .03); }
.dg-setup-item-main { display: grid; gap: 4px; min-width: 0; }
.dg-setup-item-name { color: #e6eef6; font-size: .92rem; font-weight: 600; }
.mc-row-sub { overflow: hidden; color: var(--dg-text-muted); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.mc-row-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.mc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; background: rgba(255, 255, 255, .04); color: #c4cdd8; font-size: .74rem; font-weight: 600; }
.mc-chip i { font-size: 12px; }
.mc-chip--accent { border-color: color-mix(in srgb, var(--dg-highlight) 30%, transparent); background: color-mix(in srgb, var(--dg-highlight) 10%, transparent); color: var(--dg-highlight); }
.mc-chip--warn { border-color: rgba(246, 189, 56, .3); background: rgba(246, 189, 56, .1); color: var(--dg-warn); }
.dg-setup-item-controls { display: flex; flex-shrink: 0; align-items: center; gap: 14px; }
.dg-setup-remove { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--dg-text-dim); font-size: 15px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.dg-setup-remove:hover { background: rgba(237, 66, 69, .12); color: #ff6b6b; }
.dg-setup-expand-icon { color: #8b9bb4; font-size: 14px; transition: transform .2s ease; }
.dg-setup-item.is-open .dg-setup-expand-icon { transform: rotate(180deg); }
.dg-setup-item-body { padding: 16px 18px 18px; border-top: 1px solid rgba(255, 255, 255, .06); }

.mc-form { display: grid; gap: 16px; }
.mc-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mc-field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.mc-label { color: #e6eef6; font-size: .82rem; font-weight: 700; }
.mc-hint { color: var(--dg-text-dim); font-size: .76rem; line-height: 1.4; }
.mc-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-quick-btn { min-height: 30px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; background: transparent; color: #c4cdd8; font-size: .78rem; font-weight: 600; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.mc-quick-btn:hover { border-color: color-mix(in srgb, var(--dg-highlight) 45%, transparent); color: var(--dg-highlight); }
.mc-quick-btn.is-active { border-color: color-mix(in srgb, var(--dg-highlight) 65%, transparent); background: color-mix(in srgb, var(--dg-highlight) 12%, transparent); color: var(--dg-highlight); }
.mc-duration { display: grid; grid-template-columns: repeat(3, minmax(0, 120px)); gap: 10px; }
.mc-duration label { display: grid; gap: 4px; color: var(--dg-text-dim); font-size: .74rem; }
.mc-duration input { text-align: center; }
.mc-form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .06); }

.btn-add { width: 100%; padding: 14px 18px; border: 1px dashed rgba(255, 255, 255, .18); border-radius: 10px; background: rgba(255, 255, 255, .025); color: rgba(255, 255, 255, .85); font-size: .92rem; font-weight: 600; cursor: pointer; transition: all .25s cubic-bezier(.16, 1, .3, 1); }
.btn-add:hover:not(:disabled) { border-color: color-mix(in srgb, var(--dg-highlight) 55%, transparent); background: color-mix(in srgb, var(--dg-highlight) 10%, transparent); color: var(--dg-highlight); transform: translateY(-1px); }
.btn-add:disabled { cursor: not-allowed; opacity: .45; }

.dg-empty-card { display: grid; justify-items: center; gap: 6px; padding: 28px 18px; border: 1.5px dashed rgba(255, 255, 255, .14); border-radius: 12px; color: var(--dg-text-muted); text-align: center; }
.dg-empty-card i { color: var(--dg-highlight); font-size: 22px; }
.dg-empty-card strong { color: #e6eef6; font-size: .92rem; }
.dg-empty-card span { font-size: .82rem; }

@media (max-width: 720px) {
  .mc-form-grid { grid-template-columns: 1fr; }
  .mc-tab span { display: none; }
  .dg-setup-item-header { align-items: flex-start; }
}

.whitelist-server-list { display: grid; gap: 16px; margin-top: 20px; }
.whitelist-server-card { display: grid; gap: 14px; padding: 14px 16px; }
.whitelist-server-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.whitelist-server-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.whitelist-server-head h3 { margin: 0 0 4px; }
.whitelist-server-card p { margin: 0; color: var(--dg-text-muted); }
.whitelist-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.whitelist-page-head h3 { margin: 0 0 5px; }
.whitelist-page-head p { margin: 0; color: var(--dg-text-muted); }
.whitelist-switch { position: relative; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.whitelist-switch input { position: absolute; opacity: 0; }
.whitelist-switch span { position: relative; width: 46px; height: 24px; border-radius: 24px; background: rgba(255, 255, 255, .2); transition: background .4s; }
.whitelist-switch span::after { content: ''; position: absolute; left: 2px; bottom: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .4s; }
.whitelist-switch input:checked + span { background: var(--dg-highlight); }
.whitelist-switch input:checked + span::after { transform: translateX(22px); }
.whitelist-role-picker { position: relative; }
.whitelist-role-trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid rgba(var(--dg-highlight-rgb), .28); border-radius: 10px; background: rgba(3, 11, 17, .88); color: var(--dg-text); cursor: pointer; text-align: left; }
.whitelist-role-panel { position: absolute; z-index: 20; right: 0; left: 0; top: calc(100% + 6px); padding: 10px; border: 1px solid rgba(var(--dg-highlight-rgb), .32); border-radius: 12px; background: var(--dg-bg-deep); box-shadow: none; }
.whitelist-role-search { width: 100%; box-sizing: border-box; margin-bottom: 8px; }
.whitelist-role-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 7px; max-height: 250px; overflow: auto; }
.whitelist-role-options label { display: flex; align-items: center; gap: 8px; padding: 9px; border-radius: 8px; background: rgba(255,255,255,.025); cursor: pointer; }
.role-color-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--role-color); flex: 0 0 auto; }
.whitelist-modal-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(2, 6, 10, .84); }
.whitelist-modal { width: min(680px, 100%); max-height: min(760px, calc(100vh - 40px)); display: grid; gap: 16px; overflow-x: hidden; overflow-y: auto; padding: 24px; border: 1px solid rgba(var(--dg-highlight-rgb), .45); border-radius: 18px; background: var(--dg-bg-deep); box-shadow: none; }
.whitelist-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--dg-line); }
.whitelist-modal-head h3 { margin: 4px 0 0; }
.whitelist-modal-close { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--dg-text-muted); cursor: pointer; }
.whitelist-modal-close:hover { color: var(--dg-highlight); background: rgba(var(--dg-highlight-rgb), .1); }
.whitelist-modal > label { display: grid; gap: 6px; color: var(--dg-text-muted); font-size: .82rem; }
.whitelist-modal input[name="whitelist_name"] { min-height: 42px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--dg-line); border-radius: 9px; background: var(--dg-bg-deep); color: var(--dg-text); outline: 0; }
.whitelist-modal input[name="whitelist_name"]:focus { border-color: var(--dg-highlight); box-shadow: none; }
@media (max-width: 600px) { .whitelist-server-head, .whitelist-page-head { align-items: flex-start; flex-direction: column; } .whitelist-server-card { grid-template-columns: 1fr; } }
