/* Server overview layout. Shared material and color tokens live in cards.css. */
.dashboard-sidebar { background-position: left center; }
.fork-dashboard-overview { font-family: var(--font-sans); color: var(--card-text); }
.fork-dashboard-overview .dashboard-hero-card { border-color: var(--card-line); border-radius: var(--card-radius); box-shadow: none; }

/* Keep the operational dashboard on matte surfaces; the blue artwork stays on
   the landing and server selection views. */
#view-manage-guild, #view-manage-guild .dashboard-shell {
  background-color: #090b0e;
  background-image: none;
}
#view-manage-guild .dashboard-body { background: #0b0d10; }
.fork-dashboard-overview :is(.dashboard-stat-grid, .dashboard-panel) {
  background: var(--card-surface);
  border-color: var(--card-line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.fork-dashboard-overview .dashboard-insight-grid {
  background: var(--card-surface);
  border-color: var(--card-line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* One statistics rail; cells have no independent surface or decorative trend. */
.fork-dashboard-overview .dashboard-stat-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  margin: var(--card-space-4) 0; padding-block: var(--card-space-5);
}
.fork-dashboard-overview .dashboard-stat-grid article {
  display: flex; flex-direction: column; align-items: stretch; gap: var(--card-space-3);
  min-width: 0; min-height: 0; padding: 0 var(--card-space-5);
  border: 0; border-right: 1px solid var(--card-line); border-radius: 0; background: none; box-shadow: none;
}
.fork-dashboard-overview .dashboard-stat-grid article:last-child { border-right: 0; }
.fork-dashboard-overview .dashboard-stat-grid header { display: flex; align-items: center; gap: var(--card-space-2); color: var(--card-muted); }
.fork-dashboard-overview .dashboard-stat-grid small { color: var(--card-secondary); font-size: 13px; font-weight: 400; line-height: 20px; }
.fork-dashboard-overview .metric-period { margin-left: 5px; color: var(--card-muted); font-size: 10px; letter-spacing: .02em; white-space: nowrap; }
.fork-dashboard-overview .dashboard-stat-grid b { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -.6px; font-variant-numeric: tabular-nums; text-shadow: none; }
.fork-dashboard-overview .dashboard-stat-grid .card-icon { width: 18px; height: 18px; flex-basis: 18px; color: var(--card-muted); }

/* Analytics share one plane. Size, not glow, makes command usage primary. */
.fork-dashboard-overview .dashboard-insight-grid {
  grid-template-columns: minmax(0, 5.2fr) minmax(0, 3.7fr) minmax(0, 2.8fr); gap: 0;
  border: 1px solid var(--card-line); border-radius: var(--card-radius);
  background: var(--card-surface); overflow: hidden;
}
.fork-dashboard-overview .dashboard-insight-grid > .dashboard-panel {
  border: 0; border-radius: 0; background: none; box-shadow: none;
}
.fork-dashboard-overview .dashboard-insight-grid > .dashboard-panel + .dashboard-panel { border-left: 1px solid var(--card-line); }
.fork-dashboard-overview .dashboard-bottom-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, .9fr); gap: 0; margin-top: var(--card-space-3); }
.fork-dashboard-overview .dashboard-panel { display: flex; flex-direction: column; min-width: 0; padding: var(--card-space-5); }
.fork-dashboard-overview .dashboard-panel header { display: flex; align-items: start; min-height: 0; gap: var(--card-space-2); }
.fork-dashboard-overview .dashboard-panel header > div { min-width: 0; }
.fork-dashboard-overview .dashboard-panel h2 { font-size: 15px; font-weight: 600; letter-spacing: -.2px; line-height: 1.35; }
.fork-dashboard-overview .dashboard-panel header p { margin-top: var(--card-space-1); font-size: 12px; color: var(--card-secondary); line-height: 1.5; }
.fork-dashboard-overview .dashboard-panel header .card-icon { color: var(--card-muted); }
.fork-dashboard-overview .dashboard-panel header button { padding: 4px 0; margin: -4px 0 0 auto; border: 0; border-radius: 2px; background: none; box-shadow: none; color: var(--card-muted); font: 12px/1.5 var(--font-sans); white-space: nowrap; cursor: pointer; transition: color var(--card-transition); }
.fork-dashboard-overview .dashboard-panel header button:hover { background: none; color: var(--card-text); }
.fork-dashboard-overview .usage-panel h2 { font-size: 18px; letter-spacing: -.35px; }
.fork-dashboard-overview .chart-source { display: block; color: var(--card-muted); font-size: 12px; line-height: 1.5; font-weight: 400; }
.fork-dashboard-overview header > .chart-source { margin-left: auto; text-align: right; }
.fork-dashboard-overview .usage-chart { height: 172px; grid-template-columns: 34px minmax(0, 1fr); margin-top: var(--card-space-5); background: none; }
.fork-dashboard-overview .axis { color: var(--card-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.fork-dashboard-overview .chart-bars {
  gap: clamp(4px, .7vw, 10px); padding-inline: var(--card-space-2); border: 0;
  background: repeating-linear-gradient(to top, var(--card-line) 0 1px, transparent 1px 25%);
}
.fork-dashboard-overview .chart-bars i { min-width: 0; border-radius: 2px 2px 0 0; background: var(--card-accent); box-shadow: none; filter: none; }
.fork-dashboard-overview .chart-bars i.is-no-data { height: 0; background: transparent; }
.fork-dashboard-overview :is(.usage-panel, .growth-panel) footer { padding: var(--card-space-2) 0 0 34px; color: var(--card-muted); font-size: 12px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.fork-dashboard-overview .growth-summary { display: flex; align-items: baseline; gap: var(--card-space-3); margin-top: var(--card-space-5); font-variant-numeric: tabular-nums; }
.fork-dashboard-overview .growth-summary b { color: var(--card-text); font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -.5px; }
.fork-dashboard-overview .growth-summary em { color: var(--card-positive); font-size: 12px; font-style: normal; }
.fork-dashboard-overview .growth-graph { height: 112px; margin-top: var(--card-space-4); border-color: var(--card-line); }
.fork-dashboard-overview .growth-graph svg { display: block; overflow: visible; filter: none; }
.fork-dashboard-overview .growth-graph path { fill: none; stroke: var(--card-accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.fork-dashboard-overview .growth-panel footer { padding-left: 0; }
.fork-dashboard-overview .growth-panel > .chart-source { margin-top: var(--card-space-2); }
.fork-dashboard-overview #dash-growth-point { fill: var(--card-accent); }

/* Lists are rows on the panel, with values aligned to a common edge. */
.fork-dashboard-overview .commands-panel ol { gap: 0; margin-top: var(--card-space-4); }
.fork-dashboard-overview .commands-panel li { min-height: 38px; grid-template-columns: 20px minmax(0, 1fr) auto minmax(24px, .65fr); gap: var(--card-space-2); border: 0; border-bottom: 1px solid var(--card-line); border-radius: 0; background: none; }
.fork-dashboard-overview .commands-panel li:last-child { border-bottom: 0; }
.fork-dashboard-overview .commands-panel li > b { display: block; width: auto; height: auto; border-radius: 0; background: none; box-shadow: none; color: var(--card-muted); font-size: 12px; font-weight: 400; }
.fork-dashboard-overview .commands-panel li span { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.fork-dashboard-overview .commands-panel li small { color: var(--card-secondary); font-size: 12px; font-variant-numeric: tabular-nums; }
.fork-dashboard-overview .commands-panel li i { height: 3px; border-radius: 0; background: var(--card-line); }
.fork-dashboard-overview .commands-panel li i::after { background: var(--card-accent); border-radius: 0; box-shadow: none; }
.fork-dashboard-overview .dashboard-bottom-grid > .recent-panel { border-right: 0; border-radius: var(--card-radius) 0 0 var(--card-radius); }
.fork-dashboard-overview .dashboard-bottom-grid > .server-panel { border-radius: 0 var(--card-radius) var(--card-radius) 0; }
.fork-dashboard-overview :is(.recent-panel ul, .server-panel ul) { gap: 0; margin-top: var(--card-space-4); }
.fork-dashboard-overview :is(.recent-panel li, .server-panel li) { min-height: 52px; padding: var(--card-space-2) 0; grid-template-columns: 20px minmax(0, 1fr) auto; gap: var(--card-space-3); border-bottom: 1px solid var(--card-line); border-radius: 0; background: none; }
.fork-dashboard-overview :is(.recent-panel li, .server-panel li):last-child { border-bottom: 0; }
.fork-dashboard-overview :is(.recent-panel li, .server-panel li):hover { background: var(--card-hover); }
.fork-dashboard-overview :is(.recent-panel li, .server-panel li) span { min-width: 0; gap: var(--card-space-1); line-height: 1.35; }
.fork-dashboard-overview :is(.recent-panel b, .server-panel b) { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.fork-dashboard-overview :is(.recent-panel small, .server-panel small) { color: var(--card-secondary); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.fork-dashboard-overview :is(.recent-panel em, .server-panel em) { color: var(--card-secondary); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fork-dashboard-overview .server-panel em::first-letter { color: inherit; }
.fork-dashboard-overview .server-panel em { color: var(--card-text); }
.fork-dashboard-overview .dashboard-bottom-grid .dashboard-closing-card { background: url("assets/fork-slogan-section-user-v1.png") center / cover no-repeat; min-height: 220px; margin-left: var(--card-space-3); }

/* Keep the existing server selector behavior and sizing. */
.fork-dashboard-overview .dashboard-toolbar { grid-template-columns: minmax(240px, 488px) 1fr 220px 32px 40px; }
.fork-dashboard-overview .server-select-wrap { grid-column: 3; width: 100%; min-width: 0; }
.fork-dashboard-overview :is(.dashboard-search, .server-switcher) { background: var(--card-surface); border: 1px solid var(--card-line-interactive); border-radius: 8px; box-shadow: none; }
.fork-dashboard-overview .server-switcher { width: 100%; min-width: 0; cursor: pointer; }
.fork-dashboard-overview .server-switcher b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fork-dashboard-overview .server-switcher:hover { background: var(--card-hover); }
.fork-dashboard-overview .dashboard-search:focus-within { outline: 2px solid var(--card-accent); outline-offset: 2px; }
.fork-dashboard-overview .dashboard-search input::placeholder { color: var(--card-muted); }
.fork-dashboard-overview .server-dropdown { background: var(--card-raised); border-color: var(--card-line-interactive); border-radius: 8px; backdrop-filter: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.fork-dashboard-overview .server-dropdown button:hover { background: var(--card-hover); }

/* Also used by the moderation ledger; preserve its supplied action icons. */
#tab-moderation .moderation-action-label { display: inline-flex; align-items: center; gap: 8px; }
#tab-moderation .moderation-action-icon { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }

/* Keep the original Fork emblem in the brand header; the new pack is for nav icons. */
.fork-mark-sidebar { background-image: url("assets/fork-emblem-user-v1.png"); }
.menu-item { padding-left: 62px; }
.menu-item img { left: 5px; top: -1px; width: 48px; height: 48px; filter: none; }
.menu-item:hover img, .menu-item.active img { transform: scale(1.04); filter: none; }

@media (max-width: 1180px) {
  .fork-dashboard-overview .dashboard-stat-grid article { padding-inline: var(--card-space-4); }
  .fork-dashboard-overview .dashboard-stat-grid header { align-items: start; min-height: 40px; }
  .fork-dashboard-overview .dashboard-insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fork-dashboard-overview .usage-panel { grid-column: 1 / -1; }
  .fork-dashboard-overview .growth-panel { grid-column: auto; }
  .fork-dashboard-overview .dashboard-insight-grid > .commands-panel { border-left: 0; border-top: 1px solid var(--card-line); }
  .fork-dashboard-overview .dashboard-insight-grid > .growth-panel { border-top: 1px solid var(--card-line); }
  .fork-dashboard-overview .dashboard-bottom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fork-dashboard-overview .dashboard-bottom-grid .dashboard-closing-card { grid-column: 1 / -1; background-size: contain; margin: var(--card-space-3) 0 0; }
}
@media (max-width: 1000px) {
  .fork-dashboard-overview .dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--card-space-5); }
  .fork-dashboard-overview .dashboard-stat-grid article:nth-child(even) { border-right: 0; }
  .fork-dashboard-overview .dashboard-stat-grid article:nth-child(n + 3) { padding-top: var(--card-space-5); border-top: 1px solid var(--card-line); }
  .fork-dashboard-overview .dashboard-stat-grid header { min-height: 0; }
  .fork-dashboard-overview .dashboard-toolbar { grid-template-columns: minmax(0, 1fr) 180px 32px; gap: 8px; }
  .fork-dashboard-overview .server-select-wrap { grid-column: 2; }
  .fork-dashboard-overview .toolbar-avatar { display: none; }
}
@media (max-width: 820px) { .fork-dashboard-overview .dashboard-panel { padding: var(--card-space-4); } }
@media (max-width: 640px) {
  .fork-dashboard-overview :is(.dashboard-insight-grid, .dashboard-bottom-grid) { grid-template-columns: minmax(0, 1fr); }
  .fork-dashboard-overview .dashboard-insight-grid > .dashboard-panel { grid-column: auto; border-left: 0; }
  .fork-dashboard-overview .dashboard-bottom-grid > .recent-panel { border-right: 1px solid var(--card-line); border-bottom: 0; border-radius: var(--card-radius) var(--card-radius) 0 0; }
  .fork-dashboard-overview .dashboard-bottom-grid > .server-panel { border-radius: 0 0 var(--card-radius) var(--card-radius); }
  .fork-dashboard-overview .dashboard-toolbar { grid-template-columns: minmax(0, 1fr) 140px; }
  .fork-dashboard-overview :is(.toolbar-bell, .dashboard-search kbd) { display: none; }
  .fork-dashboard-overview .dashboard-bottom-grid .dashboard-closing-card { grid-column: auto; aspect-ratio: 1721 / 914; min-height: 0; padding: 0; }
  .fork-dashboard-overview .usage-panel footer span:nth-child(even) { display: none; }
}
@media (max-width: 420px) {
  .fork-dashboard-overview .dashboard-stat-grid { grid-template-columns: minmax(0, 1fr); gap: var(--card-space-4); padding: var(--card-space-4); }
  .fork-dashboard-overview .dashboard-stat-grid article:nth-child(n) { padding: 0 0 var(--card-space-4); border: 0; border-bottom: 1px solid var(--card-line); }
  .fork-dashboard-overview .dashboard-stat-grid article:last-child { padding-bottom: 0; border-bottom: 0; }
  .fork-dashboard-overview :is(.recent-panel li, .server-panel li) { column-gap: var(--card-space-2); }
}

/* Matte Fluent-inspired dashboard frame. Keep the decorative artwork on the
   landing and server picker, and give the app its own quiet workspace. */
#view-manage-guild .dashboard-shell {
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  background: #090b0e;
  background-image: none;
}
#view-manage-guild .dashboard-sidebar {
  width: auto;
  margin: 0;
  padding: 24px 14px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 18px;
  background: #101216;
  background-image: none;
  box-shadow: none;
}
#view-manage-guild .dashboard-body {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 18px;
  background: #0b0d10;
}
#view-manage-guild .guild-avatar {
  border: 2px solid rgba(255, 255, 255, .16);
  background: #0b0d10;
  box-shadow: none;
}
#view-manage-guild .fork-mark-sidebar,
#view-manage-guild .sidebar-wordmark { filter: none; }
#view-manage-guild .menu-item img,
#view-manage-guild .menu-item:hover img,
#view-manage-guild .menu-item.active img {
  filter: brightness(0) invert(1);
  opacity: .94;
}
#view-manage-guild .menu-item:hover img,
#view-manage-guild .menu-item.active img {
  opacity: 1;
  filter: brightness(0) invert(1) drop-shadow(0 0 4px rgba(255, 255, 255, .18));
}
#view-manage-guild .sidebar-menu::before {
  border-color: rgba(255, 255, 255, .075);
  border-radius: 10px;
  background: linear-gradient(100deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055);
}
#view-manage-guild .menu-item.active::after { display: none; }
#view-manage-guild .menu-item:hover { background: rgba(255, 255, 255, .035); transform: none; }
#view-manage-guild .sidebar-bottom .btn {
  border-color: rgba(255, 255, 255, .09);
  background: #171a1f;
  color: #d9dde3;
}
#view-manage-guild .sidebar-bottom .btn:hover { background: #20242a; }

#view-manage-guild .dashboard-hero-card {
  display: flex;
  align-items: center;
  min-height: 126px;
  border: 1px solid var(--card-line);
  border-radius: var(--card-radius);
  background: #0f141b;
  background-image: none;
  box-shadow: none;
}
#view-manage-guild .dashboard-hero-copy { padding: 0 28px; }
#view-manage-guild .dashboard-hero-copy h1 { font-size: 32px; letter-spacing: -.9px; }
#view-manage-guild .dashboard-hero-copy > span { margin: 6px 0 0; color: var(--card-secondary); }
#view-manage-guild .dashboard-insight-grid {
  border-color: var(--card-line);
  background: var(--card-surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#view-manage-guild .dashboard-stat-grid,
#view-manage-guild .dashboard-panel,
#view-manage-guild .dashboard-closing-card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#view-manage-guild .dashboard-bottom-grid .dashboard-closing-card {
  display: flex;
  align-items: center;
  min-height: 172px;
  margin-left: var(--card-space-3);
  padding: 24px;
  border: 1px solid var(--card-line);
  border-radius: var(--card-radius);
  background: var(--card-surface);
  background-image: none;
  box-shadow: none;
}
#view-manage-guild .dashboard-closing-card > div { display: block; }
#view-manage-guild .dashboard-closing-card p { max-width: 15ch; color: var(--card-text); font-size: 20px; line-height: 1.3; }
#view-manage-guild .dashboard-closing-card p span { color: var(--card-secondary); }
#view-manage-guild .dashboard-closing-card small { display: block; margin-top: 14px; color: var(--card-muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }

/* The cool/navy cast on dashboard surfaces used to be neutralized here, with a
   private copy of the eight values. It now lives in cards.css on
   `#view-manage-guild`, because a fix only the overview received is not a fix —
   the other tabs were being given the un-neutralised base set. The landing page
   deliberately keeps those base values: it sits under blue artwork. */
#view-manage-guild .dashboard-hero-card { background-color: #141618; }

/* The icon artwork has different transparent margins in its PNG cells.
   Size by visible footprint and align each image to one shared centerline. */
#view-manage-guild .menu-item img {
  --sidebar-icon-size: 34px;
  left: calc(29px - var(--sidebar-icon-size) / 2);
  top: calc(50% - var(--sidebar-icon-size) / 2);
  width: var(--sidebar-icon-size);
  height: var(--sidebar-icon-size);
  object-fit: contain;
  transform-origin: center;
}
#view-manage-guild .menu-item:nth-child(1) img { --sidebar-icon-size: 29px; }
#view-manage-guild .menu-item:nth-child(2) img { --sidebar-icon-size: 38px; }
#view-manage-guild .menu-item:nth-child(3) img { --sidebar-icon-size: 32px; }
#view-manage-guild .menu-item:nth-child(4) img { --sidebar-icon-size: 38px; }
#view-manage-guild .menu-item:nth-child(5) img { --sidebar-icon-size: 36px; }
#view-manage-guild .menu-item:nth-child(6) img { --sidebar-icon-size: 32px; }
#view-manage-guild .menu-item:nth-child(7) img { --sidebar-icon-size: 36px; }
#view-manage-guild .menu-item:nth-child(8) img { --sidebar-icon-size: 34px; }
#view-manage-guild .menu-item:nth-child(9) img { --sidebar-icon-size: 34px; }
#view-manage-guild .menu-item:hover img,
#view-manage-guild .menu-item.active img { transform: scale(1.04); }

/* A quietly visible square lattice drifts one cell down-right per cycle, so
   the repeating tile returns to the same phase without a visible jump. */
#view-manage-guild .dashboard-sidebar {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
#view-manage-guild .dashboard-sidebar::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -32px;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(244, 247, 250, .075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 247, 250, .075) 1px, transparent 1px);
  background-size: 28px 28px;
  will-change: transform;
  animation: fork-sidebar-grid-drift 5s linear infinite;
}
#view-manage-guild .dashboard-sidebar > * { position: relative; z-index: 1; }
@keyframes fork-sidebar-grid-drift {
  to { transform: translate3d(28px, 28px, 0); }
}
@media (prefers-reduced-motion: reduce) {
  #view-manage-guild .dashboard-sidebar::before { animation: none; }
}

@media (max-width: 820px) {
  #view-manage-guild .dashboard-shell {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    min-height: 100vh;
    padding: 0;
    overflow: visible;
  }
  #view-manage-guild .dashboard-sidebar { display: none; }
  #view-manage-guild .dashboard-body { margin: 0; padding: 12px; border: 0; border-radius: 0; }
  #view-manage-guild .dashboard-hero-card { min-height: 112px; }
  #view-manage-guild .dashboard-hero-copy { padding: 0 20px; }
  #view-manage-guild .dashboard-bottom-grid .dashboard-closing-card { grid-column: auto; margin: 0; padding: 22px; }
}

/* ============================================================ */
/* Operations panels and the shared empty state                  */
/* ============================================================ */

/*
 * These two panels replace content that used to be invented. The bottom row
 * previously carried a "Recent Activity" feed and an "Active Users" leaderboard
 * with fabricated members, guilds and timestamps, neither of which had a render
 * function anywhere in app.js — so the numbers never changed and never could.
 *
 * What is here instead is what the dashboard can actually answer: per-server
 * configuration counts, and the operations that act on them. The activity feed
 * is not rebuilt here because collecting it is a separate decision about
 * retention and what may be stored; an honest omission beats a plausible list.
 */

.fork-dashboard-overview .dash-ops-list {
  display: grid;
  gap: 0;
  margin-top: var(--card-space-4);
}

.fork-dashboard-overview .dash-ops-list > li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: var(--card-space-3);
  min-height: 40px;
  border-bottom: 1px solid var(--card-line);
}

.fork-dashboard-overview .dash-ops-list > li:last-child {
  border-bottom: 0;
}

.fork-dashboard-overview .dash-ops-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--card-line-interactive);
  border-radius: var(--card-radius);
  color: var(--card-secondary);
  font-size: 13px;
  line-height: 1;
}

.fork-dashboard-overview .dash-ops-list b {
  display: block;
  color: var(--card-text);
  font-size: 13px;
  font-weight: 500;
}

.fork-dashboard-overview .dash-ops-list small {
  display: block;
  color: var(--card-secondary);
  font-size: var(--card-space-0, 12px);
  font-variant-numeric: tabular-nums;
}

.fork-dashboard-overview .dash-ops-engine {
  margin-top: var(--card-space-3);
  padding-top: var(--card-space-3);
  border-top: 1px solid var(--card-line);
  color: var(--card-muted);
  font-size: 12px;
  font-family: var(--font-mono);
}

.fork-dashboard-overview .dash-ops-actions {
  display: grid;
  gap: var(--card-space-2);
  margin-top: var(--card-space-4);
}

.fork-dashboard-overview .dash-ops-actions .btn {
  justify-content: flex-start;
  width: 100%;
  min-height: 38px;
}

/*
 * One empty-state shape, used by every panel that runs out of data.
 *
 * Written once here on purpose: the dashboard had ten separate empty states in
 * six paddings and four greys, which is why a page with no data still looked
 * broken. The rule is that a panel says what is missing and when it will fill.
 */
.fork-dashboard-overview .dash-empty {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: var(--card-space-2);
  padding: var(--card-space-6) var(--card-space-4);
  text-align: center;
  border-bottom: 0;
}

.fork-dashboard-overview .dash-empty-mark {
  color: var(--card-muted);
  font-size: 20px;
  line-height: 1;
}

.fork-dashboard-overview .dash-empty-title {
  color: var(--card-text);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
}

.fork-dashboard-overview .dash-empty-hint {
  max-width: 34ch;
  color: var(--card-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.45;
}

/* ============================================================ */
/* Audit trail                                                   */
/* ============================================================ */

/*
 * This screen used to render an in-memory ring buffer into a <pre>. The buffer
 * held 200 lines of English sentences, died with the process, and carried no
 * actor, action, category, severity or target — so none of the questions an audit
 * log exists to answer could be asked of it.
 *
 * It is now a filterable, paginated table over three durable stores, in the same
 * visual language as the rest of the dashboard: one surface, hairline rules
 * between rows rather than boxes around them, and a 12px label floor.
 */

.fork-dashboard-overview .audit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--card-space-4);
  /* The other seven tab headers separate the title from the content with a rule.
     This one did not, so it read as a heading belonging to the panel below it. */
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--card-space-5) var(--card-space-5) 12px;
  margin-bottom: 18px;
}

/* KALDIRILDI (Audit Trail basligi 18px/600 idi ama .tab-heading ile ayni seye degil, ayri kuraldi) -- .tab-heading belirliyor: .fork-dashboard-overview .audit-head h2
   font-size: 18px;
   font-weight: 600;
   letter-spacing: -0.2px;
   }
   } */

/* KALDIRILDI (aciklama 12px idi) -- .tab-heading belirliyor: .fork-dashboard-overview .audit-head p
   margin-top: var(--card-space-1);
   color: var(--card-secondary);
   font-size: 12px;
   line-height: 1.5;
   }
   } */

.fork-dashboard-overview .audit-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) auto auto;
  align-items: center;
  gap: var(--card-space-2);
  margin: var(--card-space-4) 0 var(--card-space-3);
  padding: 0 var(--card-space-5);
}

.fork-dashboard-overview .audit-search input,
.fork-dashboard-overview .audit-select select {
  width: 100%;
  min-height: 36px;
  padding: 0 var(--card-space-3);
  border: 1px solid var(--card-line-interactive);
  border-radius: var(--radius-sm, 6px);
  background: var(--card-raised, #191b1e);
  color: var(--card-text);
  font-family: var(--font-sans);
  font-size: 12px;
}

.fork-dashboard-overview .audit-search input::placeholder {
  color: var(--card-muted);
}

.fork-dashboard-overview .audit-search input:focus-visible,
.fork-dashboard-overview .audit-select select:focus-visible {
  outline: var(--focus-ring, 2px solid #3b82f6);
  outline-offset: 2px;
}

.fork-dashboard-overview .audit-count {
  color: var(--card-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fork-dashboard-overview .audit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: var(--card-space-3);
  margin: 0 var(--card-space-5);
}

.fork-dashboard-overview .audit-table-wrap {
  min-width: 0;
  border: 1px solid var(--card-line);
  border-radius: var(--card-radius);
  background: var(--card-surface);
  overflow: auto;
}

.fork-dashboard-overview .audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.fork-dashboard-overview .audit-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: var(--card-space-2) var(--card-space-3);
  background: var(--card-raised, #191b1e);
  border-bottom: 1px solid var(--card-line-interactive);
  color: var(--card-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.fork-dashboard-overview .audit-table td {
  padding: var(--card-space-2) var(--card-space-3);
  border-bottom: 1px solid var(--card-line);
  color: var(--card-secondary);
  vertical-align: top;
}

.fork-dashboard-overview .audit-table tbody tr {
  cursor: pointer;
}

.fork-dashboard-overview .audit-table tbody tr:hover td {
  background: var(--card-hover, #202327);
}

.fork-dashboard-overview .audit-table tbody tr.is-selected td {
  background: var(--card-hover, #202327);
  color: var(--card-text);
}

.fork-dashboard-overview .audit-table tbody tr:last-child td {
  border-bottom: 0;
}

.fork-dashboard-overview .audit-cell-when {
  color: var(--card-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fork-dashboard-overview .audit-cell-action {
  color: var(--card-text);
  font-weight: 500;
}

.fork-dashboard-overview .audit-badge {
  display: inline-block;
  padding: 2px var(--card-space-2);
  border: 1px solid var(--card-line-interactive);
  border-radius: var(--radius-pill, 999px);
  color: var(--card-secondary);
  font-size: 11px;
  white-space: nowrap;
}

/*
 * Severity is never colour alone: each state carries a word, because a
 * colour-only signal is invisible to anyone who cannot separate the hues and to
 * anyone reading the page in monochrome.
 */
.fork-dashboard-overview .audit-badge.is-info {
  border-color: var(--card-line-interactive);
  color: var(--card-secondary);
}

.fork-dashboard-overview .audit-badge.is-warning {
  border-color: rgba(217, 164, 65, .5);
  color: #e8b968;
}

.fork-dashboard-overview .audit-badge.is-notice {
  border-color: rgba(59, 130, 246, .45);
  color: #8fb6f5;
}

.fork-dashboard-overview .audit-placeholder td {
  padding: var(--card-space-6);
  color: var(--card-muted);
  text-align: center;
  cursor: default;
}

.fork-dashboard-overview .audit-detail {
  min-width: 0;
  padding: var(--card-space-4);
  border: 1px solid var(--card-line);
  border-radius: var(--card-radius);
  background: var(--card-surface);
}

.fork-dashboard-overview .audit-detail dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--card-space-2) var(--card-space-3);
  margin: 0;
}

.fork-dashboard-overview .audit-detail dt {
  color: var(--card-muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fork-dashboard-overview .audit-detail dd {
  margin: 0;
  color: var(--card-text);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.fork-dashboard-overview .audit-detail-empty {
  display: grid;
  justify-items: center;
  gap: var(--card-space-2);
  padding: var(--card-space-6) var(--card-space-3);
  text-align: center;
}

.fork-dashboard-overview .audit-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--card-space-3);
  padding: var(--card-space-4) var(--card-space-5) var(--card-space-5);
  color: var(--card-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.fork-dashboard-overview .audit-pager .btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

/* Visible to screen readers only. The filter labels are wrapped so that the
   native <select> and <input> keep their accessible name without printing a
   second visible caption above every control. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1180px) {
  .fork-dashboard-overview .audit-layout { grid-template-columns: minmax(0, 1fr); }
  .fork-dashboard-overview .audit-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fork-dashboard-overview .audit-search { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .fork-dashboard-overview .audit-filters { grid-template-columns: minmax(0, 1fr); }
  .fork-dashboard-overview .audit-head { padding: var(--card-space-4) var(--card-space-4) 0; }
  .fork-dashboard-overview .audit-filters,
  .fork-dashboard-overview .audit-layout { margin-inline: var(--card-space-4); padding-inline: 0; }
  .fork-dashboard-overview .audit-pager { padding-inline: var(--card-space-4); }
}

/* ============================================================ */
/* Phase 2 — tabs moved onto the Overview language              */
/* ============================================================ */

/*
 * Overview is the reference and stays the reference. Rather than rewrite the
 * other tabs' ~120 rules each, their local token sets are remapped here so they
 * resolve to the same palette Overview already uses. One place, reversible, and
 * it cannot drift: a tab that adds a new `--tools-*` token still has to go
 * through this mapping to get a colour.
 *
 * The four tab blocks each declared their own eight tokens. `--tools-*` and
 * `--permissions-*` were byte-identical copies of one decision, and
 * `--channels-line` had already drifted away from its three siblings
 * (rgba(126,166,219) against rgba(126,180,236)). Four copies of one decision is
 * how a single "make the dividers slightly softer" edit ends up applied to three
 * tabs and forgotten in the fourth.
 */

#tab-tools,
#tab-permissions {
  --tools-line: var(--hairline);
  --tools-line-soft: var(--hairline);
  --tools-surface: var(--surface-panel);
  --tools-surface-raised: var(--surface-raised);
  --tools-text: var(--ink-primary);
  --tools-secondary: var(--ink-secondary);
  --tools-muted: var(--ink-muted);
  --tools-blue: var(--accent);

  --permissions-line: var(--hairline);
  --permissions-line-soft: var(--hairline);
  --permissions-surface: var(--surface-panel);
  --permissions-surface-raised: var(--surface-raised);
  --permissions-text: var(--ink-primary);
  --permissions-secondary: var(--ink-secondary);
  --permissions-muted: var(--ink-muted);
  --permissions-blue: var(--accent);
}

#tab-moderation {
  --ledger-line: var(--hairline);
  --ledger-line-soft: var(--hairline);
  --ledger-surface: var(--surface-panel);
  --ledger-blue: var(--accent);
}

/*
 * The channels tab declares its tokens on `.channels-dashboard` (id + class)
 * while the other three declare on the tab root (id only). A declaration on the
 * element itself always beats one it would inherit, so remapping them on
 * `#tab-channels` resolved to the shared palette at the tab root and then lost
 * again on the actual dashboard element — channels kept its raw rgba while the
 * other three moved. The selector has to match the one the tab uses.
 */
#tab-channels .channels-dashboard {
  --channels-line: var(--hairline);
  --channels-line-soft: var(--hairline);
  --channels-surface: var(--surface-panel);
  --channels-surface-raised: var(--surface-raised);
}

/*
 * One surface, one radius, no shadow, no blur.
 *
 * The blur and the drop shadows were written for the marketing pages, where they
 * sit on a full-bleed artwork layer and have something to blur. The dashboard's
 * background is flat, so `blur(15px)` there has nothing to sample except the
 * panel's own neighbours: it costs a compositing layer per panel and softens the
 * text on top of it. Overview already established that the operational surface is
 * matte, and this makes the rest of the dashboard agree.
 */
#tab-tools .tools-workspace,
#tab-permissions .permissions-workspace,
#tab-channels .channels-workspace {
  background: var(--surface-shell);
  border-radius: var(--radius-card);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/*
 * Every panel, on every tab, in one list.
 *
 * This rule listed tools and permissions only, and the summary strip only those
 * two — so channels kept a 10px radius while the other three sat at 12px, with
 * the same surface and the same missing shadow. The inconsistency was invisible
 * in review because each tab looks fine alone; it only shows when two panels
 * are adjacent, which is what switching tabs does. Moderation was here already,
 * which is what made channels the odd one out rather than a general problem.
 */
#tab-tools .tools-summary-strip,
#tab-permissions .permissions-summary-strip,
#tab-channels .channels-summary-strip,
#tab-channels .channels-list-panel,
#tab-channels .channels-settings-panel,
#tab-moderation .moderation-ledger-panel,
#tab-moderation .moderation-detail-panel {
  background: var(--surface-panel);
  border-radius: var(--radius-card);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Rails and inner panels sit directly on that surface, with no second fill. */
#tab-tools .tools-category-rail,
#tab-tools .tools-detail-panel,
#tab-permissions .permissions-role-rail,
#tab-permissions .permissions-inspector {
  background: none;
}

/*
 * Cards stop floating.
 *
 * Inside a panel, an item is a row separated by a hairline, not a box with its
 * own border, radius and shadow. This is the single decision that made Overview
 * read as a product rather than a prototype, and it is what the tool grid and
 * the channel category list most needed.
 */
#tab-tools .tool-card {
  padding: var(--card-space-3, 12px);
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--hairline);
  background: none;
  box-shadow: none;
}

#tab-tools .tool-card:hover {
  background: var(--surface-hover);
  transform: none;
}

/*
 * The content-width cap is what makes a wide monitor look unfinished: switching
 * tabs moved the content between 1280px, 1420px and unbounded, so the same
 * dashboard appeared to resize itself. Fluid below the cap, and the flexible
 * column grows while the rail and inspector hold their range.
 */
/*
 * Scoped to a minimum width on purpose. The tabs already have max-width
 * breakpoints that collapse these workspaces to two columns and then stack the
 * detail panel, and an unscoped rule here has the same specificity as those
 * while appearing later in the cascade — so it silently won and forced three
 * columns onto a narrow viewport, squeezing the middle column until headings
 * wrapped one word per line. Only override the responsive rules where there is
 * actually room for the wide layout.
 */
@media (min-width: 1181px) {
  #tab-tools .tools-workspace {
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) minmax(320px, 400px);
  }

  #tab-permissions .permissions-workspace {
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr) minmax(340px, 420px);
  }
}
