/* The server dashboard (/Dashboard). Uses the site's colours (--bs-*, --sigil-accent-*) so it follows the light and dark looks. The page's
   sidebar and boxes reuse the edit-profile classes (edit-shell, edit-sidebar, edit-section-box). */

.dash-home,
.dash-shell {
  max-width: 76rem;
  margin: 0 auto;
  padding-bottom: 1rem;
}

.dash-home-head {
  margin-bottom: 1.5rem;
}

.dash-card {
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(208, 184, 255, 0.25);
  background: linear-gradient(180deg, rgba(88, 101, 242, 0.05), transparent 35%), var(--bs-body-bg);
}

.dash-signin {
  max-width: 38rem;
}

/* ---------- pills ---------- */

.dash-pill {
  display: inline-block;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.dash-pill-role { background: rgba(var(--sigil-accent-1-rgb), 0.12); border-color: rgba(var(--sigil-accent-1-rgb), 0.35); }
.dash-pill-ok { background: rgba(34, 197, 94, 0.14); border-color: rgba(34, 197, 94, 0.45); }
.dash-pill-warn { background: rgba(142, 160, 255, 0.16); border-color: rgba(142, 160, 255, 0.5); }
.dash-pill-off { background: transparent; color: var(--bs-secondary-color); }

/* ---------- the list of servers ---------- */

.dash-filter {
  max-width: 24rem;
  margin-bottom: 1rem;
}

.dash-servers {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.dash-server {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

.dash-server[hidden] { display: none; }
.dash-server-absent { opacity: 0.85; }

.dash-server-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  overflow-wrap: anywhere;
}

.dash-server-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  margin: 0;
  font-size: 0.85rem;
}

.dash-server-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(var(--sigil-accent-1-rgb), 0.18);
  font-weight: 700;
  font-size: 1.2rem;
}

.dash-server-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-server-icon-lg {
  width: 4rem;
  height: 4rem;
}

.dash-foot { font-size: 0.9rem; }

@media (max-width: 575px) {
  .dash-server {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dash-server-action {
    grid-column: 1 / -1;
  }

  .dash-server-action .btn { width: 100%; }
}

/* ---------- one server ---------- */

.dash-head {
  margin-bottom: 1.25rem;
}

.dash-back {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.dash-head-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dash-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 0.3rem;
  overflow-wrap: anywhere;
}

.dash-alert { margin-bottom: 1rem; }

.dash-layout {
  margin-top: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 768px) {
  .dash-layout { grid-template-columns: 12rem minmax(0, 1fr); }
}

.dash-split > *,
.dash-layout > * { min-width: 0; }

/* On a phone the preview comes first, so a look you pick is seen at once. */
@media (max-width: 1099px) {
  .dash-split-side { order: -1; }
}

.dash-layout .edit-sidebar-link { cursor: pointer; }

.dash-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.dash-content [hidden] { display: none !important; }

.dash-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(var(--sigil-accent-1-rgb), 0.4);
  background: rgba(var(--sigil-accent-1-rgb), 0.1);
}

.dash-callout-warn {
  border-color: rgba(142, 160, 255, 0.55);
  background: rgba(142, 160, 255, 0.12);
}

.dash-note {
  padding: 0.75rem 1rem;
  border-radius: 0.7rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  font-size: 0.92rem;
}

.dash-problems {
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(142, 160, 255, 0.55);
  background: rgba(142, 160, 255, 0.12);
}

.dash-problems ul {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
}

.dash-allgood { margin-bottom: 1.25rem; }

.dash-features {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  margin-bottom: 1.5rem;
}

.dash-feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

.dash-feature header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.dash-feature h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.dash-feature p {
  flex: 1 1 auto;
  margin: 0;
  font-size: 0.92rem;
}

.dash-changes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
}

.dash-change-what { font-weight: 600; }

.dash-also {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.92rem;
}

/* ---------- forms ---------- */

.dash-subhead {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.4rem;
}

.dash-select-narrow { max-width: 18rem; }

.dash-switch { margin-bottom: 0.6rem; }

.dash-switch .form-text { margin-left: -2.5em; padding-left: 2.5em; }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

.dash-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-preset {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dash-preset:hover:not(:disabled),
.dash-preset:focus-visible {
  border-color: rgba(var(--sigil-accent-1-rgb), 0.6);
  background: rgba(var(--sigil-accent-1-rgb), 0.12);
}

.dash-preset:disabled { opacity: 0.55; cursor: not-allowed; }

.dash-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.6rem 0 0.4rem;
}

.dash-chip {
  padding: 0.15rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  font-family: var(--bs-font-monospace);
  font-size: 0.8rem;
}

.dash-chip:hover:not(:disabled) {
  border-color: rgba(var(--sigil-accent-1-rgb), 0.6);
  background: rgba(var(--sigil-accent-1-rgb), 0.12);
}

.dash-chip:disabled { opacity: 0.55; cursor: not-allowed; }

.dash-colour-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.dash-colour-text { max-width: 14rem; font-family: var(--bs-font-monospace); }

.dash-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.dash-swatch {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 2px solid var(--bs-body-bg);
  box-shadow: 0 0 0 1px var(--bs-border-color);
  padding: 0;
}

.dash-swatch:hover:not(:disabled),
.dash-swatch:focus-visible { box-shadow: 0 0 0 2px rgba(var(--sigil-accent-1-rgb), 0.9); }

.dash-swatch:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- lists of roles ---------- */

.dash-roles {
  display: grid;
  gap: 0.25rem;
  max-height: 20rem;
  overflow-y: auto;
  padding: 0.4rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.7rem;
  background: var(--bs-tertiary-bg);
}

.dash-role {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.dash-role:hover { background: rgba(var(--sigil-accent-1-rgb), 0.08); }

.dash-role-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-role-name { font-weight: 600; overflow-wrap: anywhere; }

.dash-role-why {
  flex-basis: 100%;
  margin-left: 2.35rem;
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}

.dash-role-blocked { opacity: 0.6; cursor: not-allowed; }
.dash-role-warn .dash-role-why { color: #d97706; }
.dash-role-count { margin-top: 0.4rem; }

/* ---------- colour palettes ---------- */

.dash-packs {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

.dash-pack {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.8rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  cursor: pointer;
}

.dash-pack:has(input:checked) {
  border-color: rgba(var(--sigil-accent-1-rgb), 0.6);
  background: rgba(var(--sigil-accent-1-rgb), 0.1);
}

.dash-pack-body { display: grid; gap: 0.25rem; min-width: 0; }
.dash-pack-name { font-weight: 700; }
.dash-pack-blurb { font-size: 0.82rem; }

.dash-pack-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 0.15rem;
}

.dash-pack-dots span {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
}

/* ---------- the live preview ---------- */

.dash-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 1100px) {
  .dash-split { grid-template-columns: minmax(0, 1fr) 24rem; }

  .dash-split-side {
    position: sticky;
    top: calc(var(--nav-offset, 0px) + 1rem);
  }
}

.dash-preview {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

.dash-preview-label {
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.dash-preview-label span {
  font-weight: 400;
  color: var(--bs-secondary-color);
  font-size: 0.85rem;
  margin-left: 0.4rem;
}

/* It looks like Discord's dark look on purpose: that is where most people will see it. */
.dp {
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem;
  border-radius: 0.6rem;
  background: #313338;
  color: #dbdee1;
  font-family: "gg sans", "Noto Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.dp-avatar {
  flex: 0 0 2.4rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d0b8ff, #5865f2);
  color: #1b1130;
  font-weight: 800;
}

.dp-body { min-width: 0; flex: 1 1 auto; }

.dp-head { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.15rem; }
.dp-name { font-weight: 600; color: #f2f3f5; }
.dp-app { font-size: 0.6rem; font-weight: 700; padding: 0 0.3rem; border-radius: 0.25rem; background: #5865f2; color: #fff; line-height: 1.3rem; }
.dp-time { font-size: 0.72rem; color: #949ba4; }

.dp-text { white-space: pre-wrap; }
.dp-text:empty { display: none; }

.dp-mention {
  padding: 0 0.15rem;
  border-radius: 0.2rem;
  background: rgba(88, 101, 242, 0.3);
  color: #c9cdfb;
  font-weight: 500;
}

.dp-channel {
  padding: 0 0.15rem;
  border-radius: 0.2rem;
  background: rgba(88, 101, 242, 0.3);
  color: #c9cdfb;
}

.dp-embed {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  margin-top: 0.4rem;
  max-width: 28rem;
  padding: 0.6rem 0.8rem 0.7rem 0.75rem;
  border-radius: 0.25rem;
  border-left: 4px solid var(--dp-colour, #7db9f5);
  background: #2b2d31;
}

.dp-embed[hidden] { display: none; }

.dp-embed-body { min-width: 0; display: grid; gap: 0.25rem; align-content: start; }
.dp-author { font-size: 0.82rem; font-weight: 600; color: #f2f3f5; }
.dp-title { font-weight: 700; color: #f2f3f5; }
.dp-desc { white-space: pre-wrap; font-size: 0.88rem; }
.dp-footer { font-size: 0.72rem; color: #b5bac1; }
.dp-author:empty, .dp-title:empty, .dp-desc:empty, .dp-footer:empty { display: none; }

.dp-image {
  display: grid;
  place-items: center;
  margin-top: 0.3rem;
  min-height: 5rem;
  border-radius: 0.3rem;
  border: 1px dashed #4e5058;
  color: #949ba4;
  font-size: 0.78rem;
}

.dp-image[hidden] { display: none; }

.dp-thumb {
  width: 4rem;
  height: 4rem;
  border-radius: 0.4rem;
  background: #4e5058;
  display: grid;
  place-items: center;
  color: #dbdee1;
  font-weight: 700;
  font-size: 1.4rem;
}

.dp-thumb[hidden] { display: none; }

/* A picture uploaded in the builder is shown for real in the preview. */
.dp-has-picture {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.dp-image.dp-has-picture { min-height: 9rem; border-style: solid; }

.dp-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.dp-buttons:empty { display: none; }

.dp-button {
  padding: 0.25rem 0.8rem;
  border-radius: 0.3rem;
  background: #4e5058;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
}

.dp-button-wave { background: #248046; }
.dp-button-link::after { content: " \2197"; }

.dash-test {
  padding: 0 0.25rem;
}

.dash-request-result { margin-left: 0.4rem; }

/* ---------- unsaved changes ---------- */

.dash-savebar {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 1040;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 1.25rem;
  width: min(44rem, calc(100vw - 2rem));
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--sigil-accent-1-rgb), 0.55);
  background: var(--bs-body-bg);
  box-shadow: 0 10px 30px rgba(0, 0, 10, 0.35);
  font-weight: 600;
}

.dash-savebar[hidden] { display: none; }

.dash-savebar-actions { display: inline-flex; gap: 0.5rem; }

@media (prefers-reduced-motion: no-preference) {
  .dash-savebar { animation: dash-rise 0.18s ease-out; }
}

@keyframes dash-rise {
  from { opacity: 0; transform: translate(-50%, 0.6rem); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- sidebar group labels ---------- */

.dash-nav-label {
  display: none;
  margin: 0.9rem 0 0.1rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

@media (min-width: 768px) {
  .dash-nav-label { display: block; }
}

/* ---------- empty states and confirm-style forms ---------- */

.dash-empty {
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  border-radius: 1rem;
  border: 1px dashed var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

.dash-empty h3 { margin-bottom: 0.4rem; }

/* ---------- analytics ---------- */

.dash-analytics-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dash-analytics-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.dash-ranges {
  display: inline-flex;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

.dash-range {
  padding: 0.3rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--bs-body-color);
  font-weight: 600;
  font-size: 0.88rem;
}

.dash-range[aria-pressed="true"] {
  background: rgba(var(--sigil-accent-1-rgb), 0.22);
  color: var(--bs-body-color);
}

/* the locked range is a link to Server Supporter */
a.dash-range {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
}

a.dash-range-locked:hover,
a.dash-range-locked:focus-visible {
  background: rgba(var(--sigil-accent-1-rgb), 0.14);
  color: var(--bs-body-color);
}

/* the analytics cards a server without Server Supporter sees blurred: sample content behind the blur (never real numbers), a padlock over it, and the whole card face is a link */
.dash-locked-stage { position: relative; }

.dash-locked-body {
  filter: blur(6px);
  opacity: 0.8;
  user-select: none;
  pointer-events: none;
}

.dash-locked-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
}

.dash-locked-bars i {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: rgba(var(--sigil-accent-1-rgb), 0.7);
}

.dash-locked-cta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--bs-body-color);
  border-radius: 12px;
  /* a soft dark centre so the words stay readable over the blurred colours */
  background: radial-gradient(ellipse at center, rgba(5, 6, 23, 0.6) 0%, rgba(5, 6, 23, 0) 72%);
}

.dash-locked-icon { color: rgb(var(--sigil-accent-1-rgb)); margin-bottom: 0.15rem; }
.dash-locked-cta strong { font-size: 1rem; }
.dash-locked-cta span { font-size: 0.85rem; color: rgb(var(--sigil-accent-1-rgb)); }
.dash-locked-cta:hover span { text-decoration: underline; }
.dash-locked-cta:focus-visible { outline: 2px solid rgb(var(--sigil-accent-1-rgb)); outline-offset: -2px; }

.dash-analytics-tz {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-analytics-tz select { width: auto; }

.dash-analytics-since { margin-bottom: 0.75rem; }

.dash-analytics-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.dash-kpis {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  margin-bottom: 1.5rem;
}

.dash-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  min-width: 0;
}

.dash-kpi-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
}

.dash-kpi-value {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.15;
}

.dash-kpi-change { font-size: 0.78rem; font-weight: 600; }
.dash-up { color: #16a34a; }
.dash-down { color: #dc2626; }
.dash-flat { color: var(--bs-secondary-color); }

.ch-spark {
  width: 100%;
  height: 1.7rem;
  margin-top: 0.25rem;
}

.dash-kpis-compact { margin-bottom: 0.5rem; }

.dash-insights ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.35rem;
}

.dash-chart-card .dash-chart + .dash-chart { margin-top: 1.25rem; }

.dash-chart { margin: 0; }

.dash-chart figcaption {
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
}

svg.ch {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.ch-grid { stroke: var(--bs-border-color); stroke-width: 1; stroke-dasharray: 3 4; }
.ch-zero { stroke: var(--bs-secondary-color); stroke-width: 1; }
.ch-label { fill: var(--bs-secondary-color); font-size: 11px; }
.ch-line { fill: none; stroke: #8ea0ff; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.ch-area { fill: rgba(142, 160, 255, 0.16); stroke: none; }
.ch-bar { fill: #8ea0ff; }
.ch-bar-alt { fill: #b9bdf0; }
.ch-bar-join { fill: #22c55e; }
.ch-bar-leave { fill: #ef4444; }
.ch-avg { fill: none; stroke: #f4f5ff; stroke-width: 2.2; stroke-linejoin: round; }
.ch-heat { fill: #8ea0ff; }
.ch-hit { fill: transparent; }
.ch-hit:hover { fill: rgba(var(--sigil-accent-1-rgb), 0.12); }

.dash-legend {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin: 0 0.15rem 0 0.1rem;
  border-radius: 2px;
  vertical-align: middle;
}

.dash-legend-join { background: #22c55e; }
.dash-legend-leave { background: #ef4444; }
.dash-legend-avg { background: #5865f2; }

.dash-two {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.dash-two > * { min-width: 0; }

.dash-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.dash-bars li {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.dash-bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

.dash-bar-track {
  height: 0.6rem;
  border-radius: 999px;
  background: rgba(var(--sigil-accent-1-rgb), 0.12);
  overflow: hidden;
}

.dash-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #8ea0ff;
}

.dash-bar-count { font-variant-numeric: tabular-nums; color: var(--bs-secondary-color); }

.dash-stack {
  display: flex;
  height: 1.1rem;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bs-border-color);
}

.dash-stack-part { display: block; min-width: 4px; }
.dash-stack-0 { background: #ef4444; }
.dash-stack-1 { background: #f59e0b; }
.dash-stack-2 { background: #14b8a6; }
.dash-stack-3 { background: #22c55e; }
.dash-stack-4 { background: #94a3b8; }

.dash-stack-legend {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  font-size: 0.9rem;
}

.dash-stack-dot {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.45rem;
  border-radius: 50%;
}

.dash-tiles {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
}

.dash-tile {
  display: flex;
  flex-direction: column;
  padding: 0.8rem 0.9rem;
  border-radius: 0.8rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

.dash-tile strong { font-size: 1.4rem; font-weight: 800; }
.dash-tile span { font-size: 0.8rem; color: var(--bs-secondary-color); }

/* ---------- the schedule tab ---------- */

.dash-sched-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.dash-sched-zone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.9rem;
}

.dash-sched-list {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.dash-sched {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr) auto;
  gap: 0.5rem 1.25rem;
  align-items: start;
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

.dash-sched-broken { border-color: rgba(142, 160, 255, 0.6); }

.dash-sched-when { display: flex; flex-direction: column; gap: 0.1rem; }

.dash-sched-text {
  margin: 0 0 0.45rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dash-sched-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
}

.dash-sched-actions { display: flex; gap: 0.5rem; align-items: center; }

.dash-sched-editor { margin-top: 0.5rem; }

@media (max-width: 767px) {
  .dash-sched { grid-template-columns: minmax(0, 1fr); }
  .dash-bars li { grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr) auto; }
}

/* ---------- role menus ---------- */

.dash-rm-back { margin-bottom: 0.9rem; font-size: 0.92rem; }

.dash-rm-list { display: grid; gap: 0.75rem; margin-bottom: 1.5rem; }

.dash-rm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 1.25rem;
  align-items: start;
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

.dash-rm-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.4rem; overflow-wrap: anywhere; }

.dash-rm-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0 0;
}

.dash-rm-chip {
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: rgba(var(--sigil-accent-1-rgb), 0.12);
  font-size: 0.8rem;
  font-weight: 600;
}

.dash-rm-add {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.dash-rm-add select { max-width: 24rem; }

.dash-rm-rows { display: grid; gap: 0.6rem; margin-top: 0.6rem; }

.dash-rm-row {
  padding: 0.7rem 0.85rem;
  border-radius: 0.8rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

.dash-rm-row-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}

.dash-rm-role-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-rm-row-tools { display: inline-flex; gap: 0.3rem; flex-shrink: 0; }

.dash-rm-row-grid {
  display: grid;
  gap: 0.5rem 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.dash-rm-row-grid label { display: grid; gap: 0.15rem; font-size: 0.78rem; font-weight: 600; color: var(--bs-secondary-color); }
.dash-rm-row-grid label[hidden] { display: none; }
.dash-rm-row-problem { margin: 0.5rem 0 0; font-size: 0.85rem; color: #d97706; }

.dash-rm-layouts {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.dash-rm-layout {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.75rem 0.9rem;
  border-radius: 0.8rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  cursor: pointer;
}

.dash-rm-layout:has(input:checked) {
  border-color: rgba(var(--sigil-accent-1-rgb), 0.65);
  background: rgba(var(--sigil-accent-1-rgb), 0.1);
}

.dash-rm-layout input { margin-top: 0.25rem; }
.dash-rm-layout-body { display: grid; gap: 0.15rem; font-size: 0.85rem; }

.dash-rm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }

[data-rm-when-style][hidden],
[data-dash-when-eq][hidden] { display: none !important; }

/* the parts of the preview only role menus use */

.dp-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.4rem 0.75rem;
  margin-top: 0.25rem;
}

.dp-fields:empty { display: none; }
.dp-field { grid-column: 1 / -1; min-width: 0; font-size: 0.85rem; }
.dp-field-inline { grid-column: span 1; }
.dp-field-name { font-weight: 700; color: #f2f3f5; font-size: 0.85rem; }

.dp-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
  max-width: 24rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.3rem;
  background: #1e1f22;
  color: #b5bac1;
  font-size: 0.88rem;
}

.dp-select[hidden] { display: none; }
.dp-button-primary { background: #5865f2; }

@media (max-width: 767px) {
  .dash-rm { grid-template-columns: minmax(0, 1fr); }
  .dash-rm-row-head { flex-wrap: wrap; }
}

/* ---------- the palettes a server makes itself ---------- */

.dash-pals { display: grid; gap: 0.75rem; }

.dash-pal {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.8rem;
  background: var(--bs-tertiary-bg);
  padding: 0.2rem 0.9rem 0.9rem;
}

.dash-pal > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  padding: 0.7rem 0;
  list-style: none;
}

.dash-pal > summary::-webkit-details-marker { display: none; }
.dash-pal-title { font-weight: 700; }

.dash-pal-top {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.dash-pal-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 0.9rem 0 0.4rem;
}

.dash-pal-strip span { width: 1.6rem; height: 1.6rem; border-radius: 0.4rem; }

.dash-pal-rows { display: grid; gap: 0.45rem; margin-top: 0.4rem; }

.dash-pal-row {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
}

.dash-pal-row input[type="color"] {
  width: 3rem;
  height: 2.3rem;
  padding: 0.1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: transparent;
}

.dash-pal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; margin-top: 0.8rem; }
.dash-pal-fromrole { width: auto; max-width: 16rem; }

/* ---------- the Bulletin tab: frames, fonts and the preview ---------- */

.dash-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.dash-tag-free { background: rgba(34, 197, 94, 0.16); color: #16a34a; }
.dash-tag-plan { background: rgba(var(--sigil-accent-1-rgb), 0.18); color: var(--sigil-accent-1, #38bdf8); }

.dash-bl-preview {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.9rem;
  background: var(--bs-tertiary-bg);
}

@media (min-width: 601px) and (min-height: 760px) {
  .dash-bl-preview { position: sticky; top: calc(var(--nav-offset, 0px) + 0.5rem); z-index: 2; }
}

.dash-bl-channels {
  list-style: none;
  margin: 0.6rem 0;
  padding: 0.6rem 0.8rem;
  display: grid;
  gap: 0.25rem;
  border-radius: 0.7rem;
  background: rgba(0, 0, 10, 0.18);
  font-size: 0.95rem;
}

.dash-bl-channels li { display: flex; gap: 0.5rem; align-items: baseline; overflow-wrap: anywhere; }
.dash-bl-channels li.is-cut { color: var(--bs-warning, #f59e0b); }
.dash-bl-hash { opacity: 0.6; font-size: 0.8rem; }

.dash-bl-tiles {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
}

.dash-bl-fonts { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }

.dash-bl-tile { position: relative; display: block; cursor: pointer; }
.dash-bl-tile input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }

.dash-bl-tile-face {
  display: block;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.7rem;
  background: var(--bs-tertiary-bg);
  text-align: center;
  overflow-wrap: anywhere;
}

.dash-bl-tile-name { display: block; margin-top: 0.2rem; font-size: 0.72rem; text-align: center; color: var(--bs-secondary-color); }
.dash-bl-tile input:checked + .dash-bl-tile-face { border-color: var(--sigil-accent-1, #38bdf8); box-shadow: 0 0 0 2px rgba(var(--sigil-accent-1-rgb), 0.35); }
.dash-bl-tile input:focus-visible + .dash-bl-tile-face { outline: 2px solid var(--sigil-accent-1, #38bdf8); outline-offset: 2px; }

.dash-bl-pitch { margin-bottom: 1rem; }
.dash-bl-hint { margin: -0.3rem 0 0.8rem; }

.dash-bl-specs { display: grid; gap: 0.8rem; }
.dash-bl-spec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; margin-bottom: 0.3rem; }
.dash-bl-show { margin: 0; }
.dash-bl-vars code { margin-left: 0.3rem; }


/* ---- phones and touch screens: the dashboard's small controls get room to be pressed ---- */
@media (max-width: 767.98px), (pointer: coarse) {
  .dash-chip { min-height: 38px; padding-inline: 0.85rem; }
  .dash-range { min-height: 40px; padding-inline: 1rem; }
  .dash-back { display: inline-block; padding-block: 0.65rem; }
}

/* ---------- invite rewards ---------- */

.dash-reward-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.dash-reward-count {
  flex: 0 0 7rem;
  max-width: 7rem;
}

.dash-reward-role {
  flex: 1 1 12rem;
  min-width: 0;
}

/* ---- the Bot look tab: how Sigil's own name, picture and banner look in a server (Pages/Dashboard/_DashBotLook.cshtml) ---- */
.bl-card { background: #2b2d31; border-radius: 0.75rem; overflow: hidden; color: #f2f3f5; max-width: 22rem; border: 1px solid rgba(255, 255, 255, 0.08); }
.bl-banner { height: 6.5rem; background-color: #121338; background-size: cover; background-position: center; }
.bl-body { position: relative; padding: 2.75rem 1rem 1rem; }
.bl-avatar {
  position: absolute; top: -2.25rem; left: 1rem;
  width: 4.5rem; height: 4.5rem; border-radius: 50%; border: 0.3rem solid #2b2d31;
  background: #5865f2 center / cover no-repeat; display: grid; place-items: center; font-weight: 800; font-size: 1.6rem; color: #121338;
}
.bl-avatar.bl-has-image span { display: none; }
.bl-name { font-size: 1.05rem; line-height: 1.5rem; }
.bl-bio { margin: 0.5rem 0 0; font-size: 0.85rem; color: #c7cad1; white-space: pre-wrap; overflow-wrap: anywhere; }
.botlook-state { margin: 0 0 1rem; padding: 0.5rem 0.75rem; border-radius: 0.5rem; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04); font-size: 0.9rem; }
.botlook-state-applied { border-color: rgba(34, 197, 94, 0.5); background: rgba(34, 197, 94, 0.1); }
.botlook-state-failed { border-color: rgba(239, 68, 68, 0.55); background: rgba(239, 68, 68, 0.1); }
.botlook-state-waiting, .botlook-state-normalbecauseplanended, .botlook-state-normalbecauseswitchedoff { border-color: rgba(142, 160, 255, 0.5); background: rgba(142, 160, 255, 0.1); }
@media (max-width: 575.98px) { .bl-card { max-width: none; } }

/* ---- the "Your plan" card on the Overview: plan, usage meters, extras ---- */
.dash-plan-card {
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(var(--sigil-accent-1-rgb), 0.4);
  background: rgba(var(--sigil-accent-1-rgb), 0.1);
}

.dash-plan-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.dash-plan-headline {
  margin: 0.85rem 0 0;
  font-weight: 600;
}

.dash-meters {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem 1.25rem;
}

.dash-meter-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.dash-meter-label { font-weight: 600; text-align: left; text-decoration: none; }
.dash-meter-count { color: var(--bs-secondary-color); white-space: nowrap; }

.dash-meter-bar {
  display: block;
  width: 100%;
  height: 0.5rem;
  margin-top: 0.3rem;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(127, 127, 127, 0.25);
}

.dash-meter-bar::-webkit-progress-bar { background: rgba(127, 127, 127, 0.25); border-radius: 999px; }
.dash-meter-bar::-webkit-progress-value { background: rgb(34, 197, 94); border-radius: 999px; }
.dash-meter-bar::-moz-progress-bar { background: rgb(34, 197, 94); border-radius: 999px; }
.dash-meter-near .dash-meter-bar::-webkit-progress-value { background: rgb(142, 160, 255); }
.dash-meter-near .dash-meter-bar::-moz-progress-bar { background: rgb(142, 160, 255); }
.dash-meter-full .dash-meter-bar::-webkit-progress-value { background: rgb(239, 68, 68); }
.dash-meter-full .dash-meter-bar::-moz-progress-bar { background: rgb(239, 68, 68); }

.dash-plan-perks {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid rgba(127, 127, 127, 0.25);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.9rem;
}

.dash-plan-perks li { display: flex; align-items: center; gap: 0.5rem; }

/* ---- the "Get started" checklist on the Overview ---- */
.dash-checklist {
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  border-radius: 0.9rem;
  border: 1px solid var(--bs-border-color);
  background: rgba(127, 127, 127, 0.06);
}

.dash-checklist[hidden] { display: none; }

.dash-checklist-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.5rem; }

.dash-checklist-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }

.dash-checklist-items li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
}

.dash-checklist-text { display: grid; gap: 0.1rem; }

.dash-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 2px solid var(--bs-border-color);
  font-size: 0.85rem;
  line-height: 1;
}

.dash-checklist-items li.is-done .dash-check { background: rgb(34, 197, 94); border-color: rgb(34, 197, 94); color: #fff; }
.dash-checklist-items li.is-done .dash-checklist-text { opacity: 0.65; }
.dash-checklist-items li.is-next .dash-check { border-color: rgba(var(--sigil-accent-1-rgb), 0.9); }

/* ---- the grouped sidebar: a heading per group (they fold away), and a badge on a tool that has something to say ---- */
.dash-nav { gap: 0.2rem; }
.dash-nav-group { display: contents; }
.dash-nav-group > summary { list-style: none; cursor: pointer; display: block; }
.dash-nav-group > summary::-webkit-details-marker { display: none; }
.dash-nav-group > summary::after { content: "\25BE"; float: right; margin-right: 0.6rem; opacity: 0.6; }
.dash-nav-group:not([open]) > summary::after { content: "\25B8"; }
.dash-nav-group:not([open]) > button { display: none; }
.dash-nav .dash-nav-label { display: block; }
.dash-layout .edit-sidebar-link { display: flex; align-items: center; gap: 0.5rem; justify-content: space-between; }
.dash-nav-badge {
  margin-left: auto;
  padding: 0 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}
.dash-nav-badge-ok { border-color: rgba(34, 197, 94, 0.5); color: #6ee7a0; }
.dash-nav-badge-warn { border-color: rgba(142, 160, 255, 0.55); color: #fcd34d; }
.dash-nav-badge-bad { border-color: rgba(239, 68, 68, 0.55); color: #fca5a5; }
@media (max-width: 767.98px) {
  .dash-nav { gap: 0.25rem 0.5rem; }
  .dash-nav-group { display: block; flex: 1 1 100%; }
  .dash-nav-group > summary { padding: 0.35rem 0.5rem; }
  .dash-nav-group[open] > button { display: inline-flex; margin: 0.15rem 0.25rem 0.15rem 0; }
}

/* ---- the Overview as a home: the next step, what needs a look and the numbers, with the plan and recent changes beside them ---- */
.ov-home { display: grid; gap: 1.25rem; }
.ov-main, .ov-rail { display: grid; gap: 1.25rem; align-content: start; min-width: 0; }
.ov-home .dash-plan-card, .ov-home .edit-section-box, .ov-home .dash-kpis, .ov-home .dash-checklist { margin-bottom: 0; }
@media (min-width: 1100px) {
  .ov-home { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; }
}

.dash-next { border-color: rgba(var(--sigil-accent-1-rgb), 0.5); background: rgba(var(--sigil-accent-1-rgb), 0.08); }
.dash-next-eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sigil-accent-1, #5865f2); }
.dash-next-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; margin: 0.4rem 0 0.8rem; }
.dash-next-text { display: grid; gap: 0.1rem; min-width: 0; flex: 1 1 16rem; }
.dash-next-text strong { font-size: 1.15rem; }
.dash-next-bars { display: flex; gap: 0.3rem; }
.dash-next-bars span { flex: 1; max-width: 3rem; height: 0.3rem; border-radius: 999px; background: rgba(127, 127, 127, 0.3); }
.dash-next-bars span.is-done { background: rgb(34, 197, 94); }
.dash-next-bars span.is-next { background: var(--sigil-accent-1, #5865f2); }
.dash-next-all { margin-top: 0.75rem; }
.dash-next-all summary { cursor: pointer; color: var(--bs-secondary-color); font-size: 0.9rem; }
.dash-next-all .dash-checklist-items { margin-top: 0.75rem; }

.dash-attention { padding: 1rem 1.25rem; border-radius: 0.9rem; border: 1px solid var(--bs-border-color); background: rgba(127, 127, 127, 0.06); }
.dash-attention-title { margin: 0 0 0.5rem; font-size: 1rem; }
.dash-attention-list { list-style: none; margin: 0; padding: 0; }
.dash-attention-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.75rem; padding: 0.55rem 0; border-top: 1px solid var(--bs-border-color); }
.dash-attention-list li:first-child { border-top: 0; }
.dash-attention-text { display: grid; gap: 0.05rem; min-width: 0; }
.dash-attention-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--bs-secondary-color); }
.dash-attention-bad .dash-attention-dot { background: rgb(239, 68, 68); }
.dash-attention-warn .dash-attention-dot { background: rgb(142, 160, 255); }
.dash-attention-info .dash-attention-dot { background: var(--sigil-accent-1, #5865f2); }
.dash-running { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.9rem 0 0; padding-top: 0.8rem; border-top: 1px solid var(--bs-border-color); font-size: 0.9rem; }
.dash-run-chip { padding: 0.05rem 0.65rem; border-radius: 999px; border: 1px solid rgba(34, 197, 94, 0.45); }

/* ---------- the phone's bottom bar ---------- */

.dash-tabbar { display: none; }

@media (max-width: 767.98px) {
  .dash-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    background: rgba(12, 12, 39, 0.96);
    border-top: 1px solid var(--bs-border-color);
    backdrop-filter: blur(8px);
  }
  .dash-tabbar button {
    display: grid;
    justify-items: center;
    gap: 0.05rem;
    padding: 0.3rem 0;
    border: 0;
    background: none;
    color: var(--bs-secondary-color);
    font-size: 0.72rem;
  }
  .dash-tabbar button span { font-size: 1.15rem; line-height: 1.2; }
  .dash-tabbar button.active { color: var(--sigil-accent-1, #5865f2); }
  .dash-layout { padding-bottom: 4.5rem; }
  .dash-savebar { bottom: 4.6rem; }
}

/* The sidebar stays in view while the page scrolls, so when it is taller than the screen it scrolls by itself and every tool can be reached. */
@media (min-width: 768px) {
  .dash-nav {
    flex-wrap: nowrap;
    max-height: calc(100vh - 2rem);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding-right: 0.25rem;
  }
}

/* Skipping a Get started step (the server uses another bot for it). */
.dash-next-actions { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.dash-skip-form { margin: 0; }
.dash-skip-form .btn-link { color: var(--bs-secondary-color); }
.dash-skip-form .btn-link:hover { color: var(--bs-body-color); }
.dash-next-bars span.is-skipped { background: rgba(127, 127, 127, 0.55); }
.dash-checklist-items li.is-skipped { opacity: 0.7; }

/* ---------- the dashboard's top tabs and tool cards ---------- */

.dash-topnav {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  margin: 0 0 1.25rem;
  max-width: 100%;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: rgba(127, 127, 127, 0.08);
}
.dash-topnav-link { border: 0; background: transparent; color: var(--bs-secondary-color); padding: 0.35rem 1.05rem; border-radius: 9px; font-weight: 500; }
.dash-topnav-link:hover { color: var(--bs-body-color); }
.dash-topnav-link.active { background: rgba(127, 127, 127, 0.22); color: var(--bs-body-color); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }

.dash-toolbar { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 1rem; }
.dash-toolbar[hidden] { display: none; }
.dash-toolbar-name { font-weight: 600; }

.dash-layout { display: block; }
.dash-i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.dash-tools-group { margin: 1.5rem 0 0; }
.dash-tools-heading { margin: 0 0 0.6rem; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bs-secondary-color); font-weight: 600; }
.dash-tools-grid { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); }
.dash-tool {
  display: grid;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  background: rgba(127, 127, 127, 0.06);
  transition: border-color 0.15s, background 0.15s;
}
.dash-tool:hover { border-color: rgba(var(--sigil-accent-1-rgb), 0.5); background: rgba(127, 127, 127, 0.1); }
.dash-tool-top { display: flex; justify-content: space-between; align-items: center; min-height: 2rem; }
.dash-tool-ic { width: 2rem; height: 2rem; border-radius: 10px; display: grid; place-items: center; background: rgba(var(--sigil-accent-1-rgb), 0.14); color: var(--sigil-accent-1, #5865f2); }
.dash-tool-open { all: unset; cursor: pointer; display: grid; gap: 0.1rem; }
.dash-tool-open:focus-visible { outline: 2px solid var(--sigil-accent-1, #5865f2); outline-offset: 3px; border-radius: 6px; }
.dash-tool-open .dash-nav-text { font-weight: 600; }
.dash-tool-open small { color: var(--bs-secondary-color); }

.dash-sw-form { margin: 0; }
.dash-sw { position: relative; width: 36px; height: 21px; padding: 0; border-radius: 99px; border: 1px solid var(--bs-border-color); background: rgba(127, 127, 127, 0.25); cursor: pointer; }
.dash-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #959bd0; transition: left 0.15s; }
.dash-sw.is-on { background: var(--sigil-accent-1, #5865f2); border-color: var(--sigil-accent-1, #5865f2); }
.dash-sw.is-on::after { left: 17px; background: #fff; }
.dash-sw:focus-visible { outline: 2px solid var(--sigil-accent-1, #5865f2); outline-offset: 2px; }

@media (max-width: 767.98px) {
  .dash-topnav { display: none; }
}

/* ---------- the Overview in one screen ---------- */

/* The header is one row: the server on the left, the four tabs on the right. */
@media (min-width: 768px) {
  .dash-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 1rem; margin-bottom: 0.9rem; }
  .dash-back { grid-column: 1 / -1; margin-bottom: 0.35rem; }
  .dash-head .dash-topnav { margin: 0; }
  .dash-head .dash-server-icon-lg { width: 2.8rem; height: 2.8rem; }
  .dash-head .dash-server-icon-lg img { width: 100%; height: 100%; }
  .dash-head .dash-title { font-size: 1.3rem; margin: 0 0 0.1rem; }
}
@media (max-width: 767.98px) {
  .dash-head .dash-topnav { display: none; }
}

.ov-fit { display: grid; gap: 0.9rem; }
.ov-hello { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.4rem 1rem; }
.ov-hello-title { margin: 0; font-size: 1.45rem; letter-spacing: -0.02em; }
.ov-top, .ov-mid { display: grid; gap: 0.9rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .ov-top { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
  .ov-mid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ov-mid.ov-mid-single { grid-template-columns: minmax(0, 1fr); }
}

.ov-chart { padding: 0.75rem 1rem 0.6rem; border: 1px solid var(--bs-border-color); border-radius: 16px; background: rgba(127, 127, 127, 0.06); min-width: 0; }
.ov-chart-head { display: flex; justify-content: space-between; align-items: center; }
.ov-chart-label { color: var(--bs-secondary-color); font-weight: 600; font-size: 0.85rem; }
.ov-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: rgba(127, 127, 127, 0.16); }
.ov-seg button, .ov-seg a { border: 0; background: transparent; color: var(--bs-secondary-color); padding: 0.05rem 0.6rem; border-radius: 7px; font-size: 0.8rem; text-decoration: none; }
.ov-seg .is-on { background: rgba(127, 127, 127, 0.32); color: var(--bs-body-color); }
.ov-seg .is-locked { opacity: 0.55; }
.ov-pane[hidden] { display: none; }
.ov-chart-number { display: flex; align-items: baseline; gap: 0.6rem; margin-top: 0.1rem; }
.ov-chart-number strong { font-size: 1.8rem; letter-spacing: -0.03em; line-height: 1.15; }
.ov-chart-number span { font-size: 0.85rem; font-weight: 600; }
.ov-chart-svg { display: block; width: 100%; height: auto; max-height: 6rem; }
.ov-chart-area { fill: rgba(var(--sigil-accent-1-rgb), 0.2); }
.ov-chart-line { fill: none; stroke: var(--sigil-accent-1, #5865f2); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.ov-chart-dot { fill: #fff; stroke: var(--sigil-accent-1, #5865f2); stroke-width: 2; }

.ov-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; align-content: stretch; }
.ov-kpis .dash-kpi { padding: 0.55rem 0.85rem; justify-content: center; }
.ov-kpis .dash-kpi-value { font-size: 1.45rem; }

.ov-fit .dash-next, .ov-fit .dash-attention { margin: 0; padding: 0.75rem 1rem; }
.ov-fit .dash-next-body { margin: 0.3rem 0 0.55rem; }
.ov-fit .dash-next-text strong { font-size: 1.05rem; }
.ov-fit .dash-attention-title { margin-bottom: 0.25rem; }
.ov-fit .dash-attention-list li { padding: 0.35rem 0; }

.ov-tools-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
.ov-tools-head h3 { margin: 0; font-size: 0.95rem; }
.ov-tools-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .ov-tools-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* On the Overview a tool is one row: icon, name, switch or status. */
.ov-tools .dash-tool { display: flex; align-items: center; gap: 0.65rem; padding: 0.5rem 0.75rem; border-radius: 14px; }
.ov-tools .dash-tool-top { display: contents; }
.ov-tools .dash-tool-ic { order: 1; width: 1.8rem; height: 1.8rem; }
.ov-tools .dash-tool-open { order: 2; flex: 1; min-width: 0; }
.ov-tools .dash-tool-open .dash-nav-text { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-tools .dash-tool-open small { display: none; }
.ov-tools .dash-sw-form, .ov-tools .dash-nav-badge { order: 3; }

/* The floating Save bar needs room under the pages that have forms; the Overview, Tools and Plan have none, so they stay one screen tall. */
.dash-content [data-dash-panel] { padding-bottom: 4.5rem; }
.dash-content [data-dash-panel="overview"], .dash-content [data-dash-panel="tools"], .dash-content [data-dash-panel="plan"] { padding-bottom: 0; }

/* On a short screen the Overview tightens up so it still fits. */
@media (min-width: 900px) and (max-height: 820px) {
  .ov-fit, .ov-top, .ov-mid { gap: 0.6rem; }
  .ov-hello-title { font-size: 1.25rem; }
  .ov-chart-svg { max-height: 4.2rem; }
  .ov-chart-number strong { font-size: 1.5rem; }
}

/* A little tighter so the Overview fits a laptop screen: the greeting and its line share a row, and the chart is a bit lower. */
.ov-hello > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.8rem; }
.ov-fit, .ov-top, .ov-mid { gap: 0.75rem; }
.ov-chart-svg { max-height: 4.8rem; }
.ov-chart-number strong { font-size: 1.6rem; }
.ov-fit .dash-attention-list li { padding: 0.28rem 0; }

/* The chart fills its box; the end dot is a normal element so it stays round however the line is stretched. */
.ov-chart-plot { position: relative; height: 4.8rem; }
.ov-chart-plot .ov-chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; }
.ov-chart-line { vector-effect: non-scaling-stroke; }
span.ov-chart-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #fff; border: 2px solid var(--sigil-accent-1, #5865f2); box-sizing: border-box; }

/* The Tools tab: the four groups side by side, each tool one compact row, so the whole list is on one screen. */
.dash-tools-board { display: grid; gap: 0.5rem 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .dash-tools-board { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; } }
.dash-tools-group { margin: 1rem 0 0; }
@media (min-width: 992px) { .dash-tools-group { margin-top: 0.75rem; } }
.dash-tools-grid { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
.dash-tool { display: flex; align-items: center; gap: 0.65rem; padding: 0.5rem 0.75rem; border-radius: 14px; }
.dash-tool-top { display: contents; }
.dash-tool-ic { order: 1; width: 1.9rem; height: 1.9rem; }
.dash-tool-open { order: 2; flex: 1; min-width: 0; }
.dash-tool-open .dash-nav-text, .dash-tool-open small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-tool-open small { font-size: 0.8rem; }
.dash-sw-form, .dash-tool > .dash-tool-top > .dash-nav-badge { order: 3; }
.dash-tool-top .dash-nav-badge { order: 3; }

.dash-page-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.8rem; margin-bottom: 0.25rem; }
.dash-page-title h2 { margin: 0; }
.dash-also-strip { margin-top: 0.9rem; padding: 0.55rem 0.9rem; border: 1px solid var(--bs-border-color); border-radius: 14px; background: rgba(127, 127, 127, 0.05); font-size: 0.88rem; }
.dash-also-strip .dash-also { display: flex; flex-wrap: wrap; gap: 0.1rem 1.5rem; list-style: none; padding: 0; margin: 0.25rem 0 0; }

.dash-tools-heading { margin-bottom: 0.4rem; }
.dash-tools-grid { gap: 0.4rem; }
.dash-tool { padding: 0.42rem 0.7rem; }
.dash-also-strip { margin-top: 0.7rem; }

.ov-whatsnew { margin-left: 0.4rem; white-space: nowrap; }

/* ---------- motion: the page eases in once when it opens, and a tab fades in when you switch to it. Skipped for anyone who asks their device for less motion. ---------- */
@keyframes dash-ease-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dash-tab-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  .dash-shell.dash-enter .dash-head { animation: dash-ease-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .dash-shell.dash-enter .dash-content > [data-dash-panel]:not([hidden]) { animation: dash-ease-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.08s both; }
  .dash-content > [data-dash-panel].dash-fade { animation: dash-tab-in 0.26s ease both; }
}

/* ---------- Spotlight: the banner, and flat quiet cards under it ---------- */

/* The header is a banner: graphite and an orange glow, with the server's own icon (enlarged, blurred) tinting the right and the crisp icon at the edge. */
.dash-shell .dash-head.dash-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "back nav" "main main";
  align-content: space-between;
  align-items: start;
  row-gap: 1.6rem;
  column-gap: 1rem;
  min-height: 11.5rem;
  padding: 1rem 1.5rem 1.4rem;
  margin-bottom: 1rem;
  border-radius: 22px;
  background: #08081e;
  color: #fff;
}

/* Quiet glow: mostly graphite, an orange glow in the middle, and only a tint of the icon's colours on the right. */
.dash-banner::before {
  content: "";
  position: absolute;
  inset: -40px -40px -40px 45%;
  background: var(--icon, none) center / cover;
  filter: blur(30px) saturate(1.2);
  opacity: 0.7;
  z-index: -2;
}

.dash-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 120% at 38% 100%, rgba(88, 101, 242, 0.75), rgba(88, 101, 242, 0) 70%),
    linear-gradient(90deg, #08091f 0%, rgba(8, 9, 31, 0.55) 55%, rgba(8, 9, 31, 0) 100%);
}

/* A server with no icon: the same graphite and glow, no icon tint. */
.dash-banner-noicon::before { display: none; }
.dash-banner-noicon::after { background: radial-gradient(ellipse 60% 120% at 38% 100%, rgba(88, 101, 242, 0.75), rgba(88, 101, 242, 0) 70%); }

.dash-banner .dash-back { grid-area: back; margin: 0; align-self: center; color: rgba(255, 255, 255, 0.88); text-shadow: 0 1px 8px rgba(0, 0, 10, 0.5); }
.dash-banner .dash-back:hover { color: #fff; }

.dash-banner .dash-topnav { grid-area: nav; margin: 0; padding: 0.2rem; border: 0; border-radius: 999px; background: rgba(0, 0, 10, 0.32); backdrop-filter: blur(6px); }
.dash-banner .dash-topnav-link { border-radius: 999px; color: rgba(255, 255, 255, 0.85); }
.dash-banner .dash-topnav-link:hover { color: #fff; }
.dash-banner .dash-topnav-link.active { background: #07071a; color: #fff; box-shadow: none; }

.dash-banner .dash-head-main { grid-area: main; align-self: end; display: block; padding-right: 8.5rem; min-width: 0; }
.dash-banner .dash-title { margin: 0 0 0.4rem; font-size: 2.2rem; font-weight: 800; letter-spacing: -0.04em; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 10, 0.35); }
.dash-banner .dash-server-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; color: rgba(255, 255, 255, 0.9); }
.dash-banner .dash-server-meta .text-secondary { color: rgba(255, 255, 255, 0.9) !important; }
.dash-banner .dash-pill { background: rgba(0, 0, 10, 0.38); border-color: rgba(255, 255, 255, 0.28); color: #fff; }

.dash-banner .dash-server-icon-lg {
  position: absolute;
  right: 1.5rem;
  bottom: 1.3rem;
  z-index: 2;
  width: 104px;
  height: 104px;
  border-radius: 26px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2), 0 20px 44px -10px rgba(0, 0, 10, 0.65);
}
.dash-banner .dash-server-icon-lg img { width: 100%; height: 100%; object-fit: cover; }
.dash-banner-noicon .dash-server-icon-lg { background: linear-gradient(135deg, #a3b1ff, #3f49b8); color: #0b0c24; font-size: 2.6rem; font-weight: 800; }

@media (max-width: 767.98px) {
  .dash-shell .dash-head.dash-banner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "back" "main"; min-height: 9.5rem; padding: 0.9rem 1rem 1.1rem; border-radius: 18px; row-gap: 1.2rem; }
  .dash-banner::before { inset: -30px -30px -30px 15%; }
  .dash-banner .dash-head-main { padding-right: 5.4rem; }
  .dash-banner .dash-title { font-size: 1.55rem; }
  .dash-banner .dash-server-icon-lg { top: 0.9rem; bottom: auto; right: 1rem; width: 64px; height: 64px; border-radius: 16px; font-size: 1.6rem; }
}

/* Under the banner the cards are flat: a soft fill, no borders, and an orange edge across the top of each tool. */
.dash-content .ov-chart, .dash-content .dash-kpi, .dash-content .dash-attention { border: 0; border-radius: 16px; background: rgba(255, 255, 255, 0.04); }
.dash-content .dash-next { border: 0; border-radius: 16px; box-shadow: inset 4px 0 0 var(--sigil-accent-1, #5865f2); }
.dash-content .dash-tool { border: 0; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 3px 0 var(--sigil-accent-1, #5865f2); }
.dash-content .dash-tool:hover { background: rgba(255, 255, 255, 0.07); }
.dash-content .dash-tool-ic { border-radius: 50%; }
.dash-content .dash-kpi-value, .dash-content .ov-chart-number { font-weight: 800; letter-spacing: -0.03em; }
.ov-hello-title { font-weight: 800; letter-spacing: -0.03em; }

/* Starboard tab: the big emoji on a star type's card, and the forms that open under it. */
.star-emoji { font-size: 1.6rem; line-height: 1.1; }
.star-edit { margin: 0.5rem 0 1rem; }
.star-edit > summary { display: inline-block; cursor: pointer; list-style: none; }
.star-edit > summary::-webkit-details-marker { display: none; }
.star-edit[open] > summary { margin-bottom: 0.75rem; }

/* Starboard: the menu with every standard emoji. */
.star-picker { margin-top: 0.6rem; border: 1px solid var(--bs-border-color, rgba(255, 255, 255, 0.14)); border-radius: 0.6rem; background: rgba(255, 255, 255, 0.03); padding: 0.6rem; }
.star-picker[hidden] { display: none; }
.star-picker-bar { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.5rem; }
.star-picker-bar .form-control { flex: 1 1 auto; min-width: 0; }
.star-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.4rem, 1fr)); gap: 0.15rem; max-height: 15rem; overflow-y: auto; overscroll-behavior: contain; }
.star-picker-emoji { border: 0; border-radius: 0.4rem; background: transparent; font-size: 1.5rem; line-height: 1; padding: 0.35rem 0; cursor: pointer; }
.star-picker-emoji:hover, .star-picker-emoji:focus-visible { background: rgba(255, 255, 255, 0.12); outline: none; }
.star-picker-status { margin-top: 0.4rem; }
