/* Ashen Manager Dashboard – calm control-plane layer
   Loaded last on purpose: this removes the former zoom/scenery stack without
   changing any server-side actions or permission checks. */

:root {
  --calm-bg: #05080d;
  --calm-sidebar: rgba(6, 10, 16, 0.96);
  --calm-topbar: rgba(6, 10, 16, 0.9);
  --calm-surface: rgba(9, 14, 22, 0.94);
  --calm-surface-raised: #0d141e;
  --calm-surface-hover: #111a26;
  --calm-line: rgba(151, 178, 204, 0.16);
  --calm-line-strong: rgba(74, 214, 235, 0.38);
  --calm-text: #f1f4f6;
  --calm-muted: #96a2ae;
  --calm-dim: #687582;
  --calm-cyan: #35d6e9;
  --calm-violet: #8d72ff;
  --calm-green: #49d99a;
  --calm-yellow: #e4b95f;
  --calm-red: #ed7180;
  --calm-radius: 11px;
  --control-accent: var(--calm-cyan);
  --control-accent-hover: #74e7f3;
  --control-border: var(--calm-line);
  --control-border-strong: var(--calm-line-strong);
  --control-surface: var(--calm-surface);
  --control-surface-raised: var(--calm-surface-raised);
  --control-text: var(--calm-text);
  --control-muted: var(--calm-muted);
  --control-dim: var(--calm-dim);
  --control-success: var(--calm-green);
  --control-warning: var(--calm-yellow);
  --control-danger: var(--calm-red);
  --control-radius: var(--calm-radius);
  --control-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

body.ng-dashboard-page {
  min-height: 100dvh;
  background-color: var(--calm-bg) !important;
  background-image: url("lunii-dashboard-ambient.png") !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-attachment: fixed !important;
  color: var(--calm-text);
}

body.ng-dashboard-page[data-ng-background="1"] {
  background-image: var(--ng-custom-background-image, url("lunii-dashboard-ambient.png")) !important;
  background-size: var(--ng-custom-background-size, cover) !important;
}

body.ng-dashboard-page::before {
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  display: block !important;
  background:
    linear-gradient(90deg, rgba(3, 6, 10, 0.86) 0%, rgba(3, 6, 10, 0.73) 52%, rgba(3, 6, 10, 0.82) 100%),
    linear-gradient(180deg, rgba(3, 6, 10, 0.2), rgba(3, 6, 10, 0.8)) !important;
  content: "" !important;
  pointer-events: none;
}

body.ng-dashboard-page::after {
  content: none !important;
}

body.ng-dashboard-page :is(#ng-aurora, #ng-grid, #ng-scanline) {
  display: none !important;
}

body.ng-dashboard-page #ng-starfield {
  z-index: 0;
  opacity: 0.18;
}

body.ng-dashboard-page.shimmer-disabled #ng-starfield {
  display: none !important;
}

body.ng-dashboard-page.shimmer-enabled :is(.ng-context-panel, .ng-workspace, .ng-public-auth, .ng-status-panel) {
  animation: none !important;
}

body.ng-dashboard-page .grid-orbit-reveal,
body.ng-dashboard-page .grid-orbit-reveal.is-visible {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

body.ng-dashboard-page:has(.ng-superuser-switch input:checked) {
  --control-accent: var(--calm-cyan);
  --control-accent-hover: #74e7f3;
  --control-border-strong: var(--calm-line-strong);
}

.ng-app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  zoom: 1;
}

.ng-sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  border-right: 1px solid var(--calm-line);
  background: var(--calm-sidebar);
  box-shadow: 14px 0 50px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

.ng-sidebar .ng-brand {
  min-height: 78px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--calm-line);
}

.ng-logo {
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(141, 114, 255, 0.34);
  border-radius: 50%;
  background: #090d13;
  box-shadow: none;
}

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

.ng-logo-large {
  width: 64px;
  height: 64px;
}

.ng-brand strong {
  color: var(--calm-text);
  font-size: 15px;
  letter-spacing: -0.02em;
}

.ng-brand small {
  margin-top: 4px;
  color: var(--calm-dim);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.ng-sidebar-server {
  gap: 6px;
  margin: 16px 14px 10px;
  padding: 13px 14px;
  border-color: var(--calm-line);
  border-radius: var(--calm-radius);
  background: rgba(13, 20, 30, 0.78);
}

.ng-sections {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 8px 12px 16px;
  overflow-y: auto;
}

.ng-section {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 48px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #909ba7;
}

.ng-section:hover,
.ng-section:focus-visible {
  border-color: var(--calm-line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--calm-text);
  transform: none;
}

.ng-section.is-active {
  border-color: rgba(53, 214, 233, 0.25);
  background: rgba(53, 214, 233, 0.075);
  color: var(--calm-text);
}

.ng-section-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #778492;
}

.ng-section-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ng-section.is-active .ng-section-icon {
  border-color: rgba(53, 214, 233, 0.2);
  background: rgba(53, 214, 233, 0.08);
  color: var(--calm-cyan);
}

.ng-section-main strong {
  color: inherit;
  font-size: 13px;
  font-weight: 680;
}

.ng-section-count {
  min-width: 24px;
  padding: 2px 5px;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--calm-dim);
  font-size: 10px;
}

.ng-sidebar-footer {
  gap: 11px;
  padding: 13px;
  border-top-color: var(--calm-line);
}

.ng-account > span {
  background: #131a23;
  color: #bac2ca;
}

.ng-main-column {
  min-width: 0;
  min-height: 100dvh;
  background: transparent;
}

.ng-command-top {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 68px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--calm-line);
  background: var(--calm-topbar);
  backdrop-filter: blur(18px);
}

.ng-command-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  gap: 18px;
  width: min(1240px, 100%);
  margin: 0 auto;
}

.ng-command-location span {
  color: var(--calm-dim);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.ng-command-location strong {
  color: var(--calm-text);
  font-size: 14px;
}

.ng-command-actions {
  gap: 7px;
}

.ng-mode-switch,
.ng-guild-switch,
.ng-superuser-switch label {
  border-color: var(--calm-line);
  border-radius: 9px;
  background: rgba(11, 17, 25, 0.9);
}

.ng-mode-switch {
  grid-template-columns: repeat(2, minmax(82px, 1fr));
}

.ng-mode,
.ng-mini-btn,
#lunii-theme-btn {
  min-height: 36px;
  border-radius: 7px;
  font-size: 11px;
}

.ng-mode.is-active,
body.ng-dashboard-page .ng-mode.is-active {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: #e9edf1 !important;
  color: #081018 !important;
  box-shadow: none !important;
}

.ng-guild-switch {
  grid-template-columns: auto minmax(160px, 240px) auto;
}

.ng-guild-switch select {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--calm-text);
}

.ng-superuser-switch label {
  min-height: 44px;
  padding: 0 11px;
}

.ng-context-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  width: min(1240px, calc(100% - 48px));
  align-items: end;
  margin: 24px auto 0;
  padding: 26px 28px 22px;
  border: 1px solid var(--calm-line);
  border-radius: 13px;
  background: rgba(6, 11, 17, 0.91);
  box-shadow: 0 22px 68px rgba(0, 0, 0, 0.2);
  text-align: left;
  backdrop-filter: blur(12px);
}

.ng-context-copy > p {
  display: block;
  max-width: 650px;
  margin: 8px 0 0;
  color: var(--calm-muted);
  font-size: 13px;
}

.ng-kicker,
.dashboard-section-label {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--calm-cyan);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ng-context-copy h1 {
  margin: 7px 0 0;
  color: var(--calm-text);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.ng-module-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  margin-top: 18px;
  overflow: visible;
}

.ng-module {
  min-height: 34px;
  padding: 0 10px;
  border-color: transparent;
  border-radius: 7px;
  background: transparent;
  color: #7e8994;
  font-size: 10px;
}

.ng-module span {
  color: #66727f;
}

.ng-module:hover,
.ng-module:focus-visible {
  border-color: var(--calm-line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--calm-text);
  transform: none;
}

.ng-module.is-active {
  border-color: rgba(53, 214, 233, 0.24);
  background: rgba(53, 214, 233, 0.08);
  color: var(--calm-text);
}

.ng-module.is-active span {
  color: var(--calm-cyan);
}

.ng-context-stats {
  display: flex;
  grid-column: auto;
  justify-content: flex-end;
  gap: 0;
  margin: 0;
}

.ng-context-stats article {
  min-width: 96px;
  max-width: 170px;
  padding: 8px 16px;
  border: 0;
  border-left: 1px solid var(--calm-line);
  border-radius: 0;
  background: transparent;
}

.ng-context-stats span {
  color: var(--calm-dim);
  font-size: 8px;
}

.ng-context-stats strong {
  margin-top: 5px;
  color: var(--calm-text);
  font-size: 12px;
}

.ng-function-hub {
  display: none;
}

.ng-workspace {
  width: min(1240px, calc(100% - 48px));
  margin: 14px auto 52px;
  padding: 28px;
  border: 1px solid var(--calm-line);
  border-radius: 13px;
  background: rgba(6, 11, 17, 0.93);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.ng-content {
  display: grid;
  gap: 22px;
}

.ng-content > .page-header,
.ng-content > .workspace-page-header {
  display: none;
}

body.ng-dashboard-page .ng-content :is(.card, .panel-card, .summary-card, .feature-card, .stat-card, .metric-card, .economy-module-card) {
  border: 1px solid var(--calm-line);
  border-radius: var(--calm-radius);
  background: rgba(10, 16, 24, 0.92);
  box-shadow: none;
}

body.ng-dashboard-page .ng-content :is(.card, .panel-card, .summary-card, .feature-card, .stat-card, .metric-card, .economy-module-card):hover,
body.ng-dashboard-page .ng-content :is(.card, .panel-card, .summary-card, .feature-card, .stat-card, .metric-card, .economy-module-card):focus-within {
  border-color: rgba(151, 178, 204, 0.25);
  background: rgba(11, 18, 27, 0.95);
}

/* Shared dashboard metrics: the production layout has no .lunii-scene wrapper. */
body.ng-dashboard-page .ng-content .dashboard-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

body.ng-dashboard-page .ng-content .dashboard-metric-grid > .metric-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 82px;
  padding: 14px 16px;
}

body.ng-dashboard-page .ng-content .dashboard-metric-grid .metric-label {
  display: block;
  color: var(--calm-dim);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body.ng-dashboard-page .ng-content .dashboard-metric-grid .metric-value {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--calm-text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body.ng-page-verify .verify-metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.ng-page-verify .verify-metric-grid .metric-value::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
  background: #68717c;
  box-shadow: 0 0 0 3px rgba(104, 113, 124, 0.1);
  content: '';
}

body.ng-page-verify .verify-metric-grid .metric-card.is-positive .metric-value::before {
  background: #47d998;
  box-shadow: 0 0 0 3px rgba(71, 217, 152, 0.1);
}

body.ng-page-verify .verify-metric-grid .metric-card.is-warning .metric-value::before {
  background: #efb75d;
  box-shadow: 0 0 0 3px rgba(239, 183, 93, 0.1);
}

body.ng-page-verify .verify-metric-grid .metric-card.is-danger .metric-value::before {
  background: #ed7180;
  box-shadow: 0 0 0 3px rgba(237, 113, 128, 0.1);
}

body.ng-dashboard-page :is(button, .btn, .ng-btn, .ng-mini-btn, #lunii-theme-btn, .ng-mode, .lunii-form-popout, .lunii-upload-button) {
  border: 1px solid var(--calm-line);
  border-radius: 8px;
  background: #111923;
  color: #e1e6ea;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

body.ng-dashboard-page :is(button, .btn, .ng-btn, .ng-mini-btn, #lunii-theme-btn, .ng-mode, .lunii-form-popout, .lunii-upload-button):hover {
  border-color: rgba(53, 214, 233, 0.35);
  background: #16212d;
  color: #fff;
  transform: translateY(-1px);
}

body.ng-dashboard-page :is(.btn.primary, .ng-btn-primary) {
  border-color: #edf1f4;
  background: #edf1f4;
  color: #071019;
}

body.ng-dashboard-page :is(.btn.primary, .ng-btn-primary):hover {
  border-color: var(--calm-cyan);
  background: var(--calm-cyan);
  color: #041014;
}

body.ng-dashboard-page .btn.danger {
  border-color: rgba(237, 113, 128, 0.35);
  background: rgba(237, 113, 128, 0.09);
  color: #ff9aa6;
}

body.ng-dashboard-page :is(input.input, select.input, textarea.input, .ng-content input:not([type="checkbox"]):not([type="radio"]), .ng-content select, .ng-content textarea) {
  min-height: 44px;
  border: 1px solid var(--calm-line);
  border-radius: 8px;
  background: #080d13;
  color: var(--calm-text);
  box-shadow: none;
}

body.ng-dashboard-page :is(input.input, select.input, textarea.input, .ng-content input:not([type="checkbox"]):not([type="radio"]), .ng-content select, .ng-content textarea):focus {
  border-color: rgba(53, 214, 233, 0.62);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(53, 214, 233, 0.08);
}

body.ng-dashboard-page :is(a, button, input, select, textarea, [role="button"], [role="switch"]):focus-visible {
  outline: 2px solid #72e7f4 !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(53, 214, 233, 0.18);
}

body.ng-dashboard-page .ng-content label {
  color: #aab3bc;
  font-size: 11px;
  font-weight: 650;
}

/* Farbflächen müssen die allgemeinen Button-Regeln mit ID-Spezifität überstimmen. */
body.ng-dashboard-page button.dashboard-color-picker-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 !important;
  border-radius: 50% !important;
  background: var(--calm-surface-raised) !important;
}

body.ng-dashboard-page .dashboard-color-picker-swatch {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

body.ng-dashboard-page .dashboard-color-picker-popover {
  box-sizing: border-box;
  width: min(360px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 16px;
  border-color: var(--calm-line-strong);
  border-radius: 18px;
  background: var(--calm-surface-raised);
}

body.ng-dashboard-page .dashboard-color-picker-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 36px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}

body.ng-dashboard-page .dashboard-color-picker-grid {
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

body.ng-dashboard-page .dashboard-color-picker-grid > label:first-child {
  justify-items: center;
}

body.ng-dashboard-page .dashboard-color-picker-presets {
  grid-template-columns: repeat(9, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  gap: 7px;
}

body.ng-dashboard-page button.dashboard-color-picker-preset {
  width: 100%;
  max-width: 32px;
  height: auto;
  min-width: 0;
  min-height: 0 !important;
  aspect-ratio: 1;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50% !important;
  background: var(--picked-color, var(--calm-cyan)) !important;
}

body.ng-dashboard-page .dashboard-color-picker-popover input[type="color"],
body.ng-dashboard-page .ng-content .dashboard-color-circle-field input[type="color"] {
  display: block;
  box-sizing: border-box;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  margin: 0;
  padding: 4px;
  overflow: hidden;
  appearance: none;
  border: 1px solid var(--calm-line-strong);
  border-radius: 50%;
  background: var(--calm-surface-raised);
  cursor: pointer;
}

body.ng-dashboard-page input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

/* Getrennte Regeln: unbekannte Browser-Pseudoelemente dürfen die andere nicht verwerfen. */
body.ng-dashboard-page input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 50%;
}

body.ng-dashboard-page input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 50%;
}

.dashboard-start {
  padding: 2px;
}

.dashboard-navigation-status[hidden] {
  display: none;
}

.dashboard-navigation-status {
  position: fixed;
  inset: auto 18px 18px auto;
  z-index: 16000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  max-width: min(560px, calc(100% - 36px));
  padding: 14px 16px;
  border: 1px solid var(--calm-line-strong);
  border-radius: 12px;
  background: var(--calm-surface-raised);
  color: var(--calm-text);
  box-shadow: var(--control-shadow);
}

.dashboard-navigation-status a {
  color: var(--calm-cyan);
}

.dashboard-start-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 22px;
}

.dashboard-start-head h2 {
  margin: 8px 0 0;
  color: var(--calm-text);
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -0.045em;
}

.dashboard-start-head p {
  margin: 0 0 3px;
  color: var(--calm-muted);
  font-size: 12px;
  line-height: 1.6;
}

.dashboard-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-quick-card {
  display: grid;
  min-height: 184px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--calm-line);
  border-radius: 10px;
  background: rgba(10, 16, 24, 0.88);
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.dashboard-quick-card:hover,
.dashboard-quick-card:focus-visible {
  border-color: rgba(53, 214, 233, 0.38);
  background: var(--calm-surface-hover);
  transform: translateY(-2px);
}

.dashboard-quick-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(53, 214, 233, 0.24);
  border-radius: 8px;
  color: var(--calm-cyan);
  font-size: 9px;
  font-weight: 800;
}

.dashboard-quick-card strong {
  margin-top: 20px;
  color: var(--calm-text);
  font-size: 14px;
}

.dashboard-quick-card small {
  margin-top: 8px;
  color: var(--calm-muted);
  font-size: 11px;
  line-height: 1.55;
}

.dashboard-quick-card em {
  align-self: end;
  margin-top: 18px;
  color: var(--calm-cyan);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.dashboard-health-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--calm-line);
  border-radius: 10px;
  background: rgba(8, 13, 20, 0.86);
}

.dashboard-health-strip article {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--calm-line);
}

.dashboard-health-strip article:last-child {
  border-right: 0;
}

.dashboard-health-strip span {
  color: var(--calm-dim);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-health-strip strong {
  overflow: hidden;
  color: var(--calm-text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-system-details {
  overflow: hidden;
  border: 1px solid var(--calm-line);
  border-radius: 10px;
  background: rgba(8, 13, 20, 0.88);
}

.dashboard-system-details > summary {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  list-style: none;
}

.dashboard-system-details > summary::-webkit-details-marker {
  display: none;
}

.dashboard-system-details > summary span,
.dashboard-system-details > summary strong,
.dashboard-system-details > summary small {
  display: block;
}

.dashboard-system-details > summary strong {
  color: var(--calm-text);
  font-size: 13px;
}

.dashboard-system-details > summary small {
  margin-top: 4px;
  color: var(--calm-muted);
  font-size: 10px;
}

.dashboard-system-details > summary em {
  color: var(--calm-cyan);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.dashboard-system-details[open] > summary {
  border-bottom: 1px solid var(--calm-line);
}

.dashboard-system-details .module-status-board {
  margin: 0;
  padding: 22px;
}

.dashboard-system-details .module-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-settings-layout,
.server-cards-stack {
  display: grid;
  gap: 16px;
}

.dashboard-settings-card {
  padding: 0 !important;
  overflow: hidden;
}

.dashboard-settings-card > header,
.required-channel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--calm-line);
}

.dashboard-settings-card > header > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.dashboard-settings-card > header > div > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(53, 214, 233, 0.24);
  border-radius: 8px;
  color: var(--calm-cyan);
  font-size: 8px;
  font-weight: 800;
}

.dashboard-settings-card > header h2,
.required-channel-head h2 {
  margin: 0;
  color: var(--calm-text);
  font-size: 18px;
  letter-spacing: -0.025em;
}

.dashboard-settings-card > header p,
.required-channel-head p {
  max-width: 480px;
  margin: 3px 0 0;
  color: var(--calm-muted);
  font-size: 11px;
}

.dashboard-settings-card > form,
.required-channel-form {
  padding: 22px;
}

.settings-subsection + .settings-subsection {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--calm-line);
}

.settings-subsection-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.settings-subsection-head strong {
  color: var(--calm-text);
  font-size: 13px;
}

.settings-subsection-head span {
  color: var(--calm-dim);
  font-size: 10px;
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-channel-grid {
  align-items: start;
}

.field-hint {
  display: block;
  margin-top: 7px;
  color: var(--calm-dim);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.5;
}

.channel-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.channel-presets > span {
  margin-right: 2px;
  color: var(--calm-dim);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.ng-dashboard-page .channel-presets button {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: transparent;
  color: #8e99a5;
  font-size: 9px;
}

body.ng-dashboard-page .channel-presets button.is-selected {
  border-color: rgba(53, 214, 233, 0.38);
  background: rgba(53, 214, 233, 0.08);
  color: var(--calm-cyan);
}

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

.feature-toggle-grid.compact {
  max-width: 760px;
}

body.ng-dashboard-page label.checkbox.setting-toggle,
body.ng-dashboard-page label.checkbox.setting-toggle.lunii-switch-control {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  min-height: 72px;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid var(--calm-line);
  border-radius: 9px;
  background: #090f17;
  cursor: pointer;
}

body.ng-dashboard-page label.checkbox.setting-toggle:hover,
body.ng-dashboard-page label.checkbox.setting-toggle:focus-within {
  border-color: rgba(53, 214, 233, 0.28);
  background: #0c141e;
}

body.ng-dashboard-page .setting-toggle > span,
body.ng-dashboard-page .setting-toggle > span > strong,
body.ng-dashboard-page .setting-toggle > span > small {
  display: block;
}

body.ng-dashboard-page .setting-toggle > span > strong {
  color: var(--calm-text);
  font-size: 11px;
}

body.ng-dashboard-page .setting-toggle > span > small {
  margin-top: 4px;
  color: var(--calm-dim);
  font-size: 9px;
  font-weight: 500;
}

body.ng-dashboard-page label.checkbox.lunii-switch-control > input[type="checkbox"],
body.ng-dashboard-page .ng-superuser-switch label > input[type="checkbox"] {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 36px;
  min-width: 36px;
  width: 36px;
  max-width: 36px;
  min-height: 20px;
  height: 20px;
  max-height: 20px;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 1px solid #3a4551;
  border-radius: 999px;
  background: #222b35;
  box-shadow: none;
}

body.ng-dashboard-page label.checkbox.lunii-switch-control > input[type="checkbox"]::after,
body.ng-dashboard-page .ng-superuser-switch label > input[type="checkbox"]::after {
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  background: #d9dfe4;
  box-shadow: none;
}

body.ng-dashboard-page label.checkbox.lunii-switch-control > input[type="checkbox"]:checked,
body.ng-dashboard-page .ng-superuser-switch label > input[type="checkbox"]:checked {
  border-color: rgba(53, 214, 233, 0.75);
  background: #168596;
}

body.ng-dashboard-page label.checkbox.lunii-switch-control > input[type="checkbox"]:checked::after,
body.ng-dashboard-page .ng-superuser-switch label > input[type="checkbox"]:checked::after {
  transform: translateX(16px);
}

.lunii-switch-state {
  min-width: 24px;
  color: var(--calm-dim);
  font-size: 8px;
}

.lunii-switch-control.is-on .lunii-switch-state {
  color: var(--calm-cyan);
}

.settings-save-row {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--calm-line);
}

.settings-save-row > span {
  color: var(--calm-dim);
  font-size: 9px;
}

.settings-save-row .btn {
  min-width: 190px;
}

.required-channel-card {
  padding: 0 !important;
  overflow: hidden;
}

.required-channel-head > div {
  max-width: 660px;
}

.required-channel-head h2 {
  margin-top: 7px;
  font-size: 22px;
}

.required-channel-status {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(73, 217, 154, 0.25);
  border-radius: 999px;
  background: rgba(73, 217, 154, 0.07);
  color: var(--calm-green);
  font-size: 9px;
  font-weight: 800;
}

.required-channel-status.is-disabled {
  border-color: var(--calm-line);
  background: rgba(151, 163, 174, 0.07);
  color: var(--calm-muted);
}

.required-channel-status.is-warning {
  border-color: rgba(238, 196, 93, 0.32);
  background: rgba(238, 196, 93, 0.09);
  color: #f0cc73;
}

.required-channel-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  gap: 18px;
  align-items: start;
}

.required-channel-toggles {
  display: grid;
  gap: 8px;
}

.server-cards-stack > .server-list-card,
.server-cards-stack > .card {
  padding: 20px;
}

.server-cards-stack table {
  margin-top: 14px;
}

.server-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.server-actions form {
  margin: 0;
}

.module-status-board-head h2 {
  max-width: 720px;
  color: var(--calm-text);
  font-size: 22px;
}

.module-status-card {
  border-radius: 9px;
  background: #090f17;
}

.module-status-card:hover {
  transform: translateY(-1px);
}

.lunii-form-toolbar {
  display: none;
}

@media (max-width: 1180px) {
  .ng-app-shell {
    grid-template-columns: 244px minmax(0, 1fr);
  }

  .ng-context-panel {
    grid-template-columns: 1fr;
  }

  .ng-context-stats {
    justify-content: flex-start;
  }

  .ng-context-stats article:first-child {
    border-left: 0;
    padding-left: 0;
  }

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

@media (max-width: 980px) {
  .ng-app-shell {
    display: block;
    width: 100%;
    min-height: 100dvh;
  }

  .ng-sidebar {
    position: fixed;
    width: min(294px, 88vw);
    height: 100dvh;
  }

  .ng-command-top {
    padding: 10px 14px;
  }

  .ng-command-row {
    grid-template-columns: 1fr;
  }

  .ng-context-panel,
  .ng-workspace {
    width: min(100% - 28px, 900px);
  }

  .dashboard-start-head {
    grid-template-columns: 1fr;
    gap: 10px;
  }

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

  .form-grid.three,
  .required-channel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body.ng-dashboard-page {
    background-position: 72% top !important;
  }

  .ng-context-panel,
  .ng-workspace {
    width: calc(100% - 20px);
    padding: 18px;
    border-radius: 11px;
  }

  .ng-context-panel {
    margin-top: 10px;
  }

  .ng-context-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .ng-context-stats article {
    min-width: 0;
    padding: 8px 10px;
  }

  .dashboard-quick-grid,
  .dashboard-health-strip,
  .feature-toggle-grid,
  .dashboard-system-details .module-status-grid {
    grid-template-columns: 1fr;
  }

  body.ng-page-verify .verify-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-quick-card {
    min-height: 150px;
  }

  .dashboard-health-strip article {
    border-right: 0;
    border-bottom: 1px solid var(--calm-line);
  }

  .dashboard-health-strip article:last-child {
    border-bottom: 0;
  }

  .dashboard-settings-card > header,
  .required-channel-head,
  .settings-subsection-head,
  .settings-save-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-settings-card > form,
  .required-channel-form {
    padding: 16px;
  }

  .settings-save-row .btn {
    width: 100%;
  }

  .server-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .ng-command-actions {
    grid-template-columns: 1fr;
  }

  .ng-guild-switch,
  .ng-superuser-switch {
    grid-column: 1;
  }

  .ng-context-stats {
    grid-template-columns: 1fr;
  }

  body.ng-page-verify .verify-metric-grid {
    grid-template-columns: 1fr;
  }

  body.ng-page-verify .verify-metric-grid > .metric-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 58px;
  }

  body.ng-page-verify .verify-metric-grid .metric-value {
    justify-self: end;
    text-align: right;
  }

  .ng-context-stats article,
  .ng-context-stats article:first-child {
    border-left: 0;
    border-bottom: 1px solid var(--calm-line);
    padding: 9px 0;
  }

  .ng-context-stats article:last-child {
    border-bottom: 0;
  }

  body.ng-dashboard-page label.checkbox.setting-toggle,
  body.ng-dashboard-page label.checkbox.setting-toggle.lunii-switch-control {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  body.ng-dashboard-page .setting-toggle .lunii-switch-state {
    grid-column: 2;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.ng-dashboard-page *,
  body.ng-dashboard-page *::before,
  body.ng-dashboard-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
