/* Top nav */
.topnav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 36px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 17px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 8px 20px rgba(107, 164, 248, 0.18);
}
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: 0.02em; }
.brand-name .dim { color: var(--text-muted); font-weight: 400; margin-left: 6px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.top-link {
  font-size: 12px;
  color: var(--text-dim);
  padding: 8px 12px;
  transition: color 0.2s;
}
.top-link:hover { color: var(--text); }

/* Buttons */
.btn {
  font-size: 13px;
  letter-spacing: 0.01em;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
}
.btn:hover {
  border-color: var(--text-dim);
  color: var(--text);
  background: var(--panel-hi);
}
.btn.primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(107, 164, 248, 0.22);
}
.btn.primary:hover {
  background: var(--accent-hi);
  border-color: var(--accent-hi);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(107, 164, 248, 0.3);
}

/* Panels */
.panel {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 24px 26px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
}

/* Eyebrow / status pill */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(14, 23, 35, 0.6);
  backdrop-filter: blur(8px);
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

/* Footer */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border-soft);
  padding: 18px 36px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.footer .status { display: inline-flex; align-items: center; gap: 8px; }
.footer .status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

/* Mobile */
@media (max-width: 900px) {
  .topnav { padding: 18px 22px; }
  .footer { padding: 14px 22px; flex-direction: column; gap: 8px; text-align: center; }
}

/* Tile grid for app launcher */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.tile {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 22px 24px;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tile:hover { border-color: var(--accent-line); background: var(--panel-hi); transform: translateY(-1px); }
.tile-name { font-size: 15px; font-weight: 500; color: var(--text); }
.tile-desc { font-size: 12px; color: var(--text-dim); line-height: 1.4; }
.tile-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }
.tile-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.tile-status.warn .dot { background: var(--amber); }
.tile-status.crit .dot { background: #ff5b5b; }

/* Status banner */
.status-banner.ok #agg-dot { background: var(--green); box-shadow: 0 0 10px var(--green); }
.status-banner.warn #agg-dot { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.status-banner.crit #agg-dot { background: #ff5b5b; box-shadow: 0 0 10px #ff5b5b; }

/* Request-row used in admin queue */
.request-row {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}
.request-row .meta { font-size: 13px; color: var(--text); }
.request-row .meta .sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.request-row .actions { display: flex; gap: 8px; }

/* Wiki layout */
.wiki-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 30px 36px;
  flex: 1;
  align-items: start;
}

.wiki-toc {
  position: sticky;
  top: 30px;
  font-size: 13px;
  color: var(--text-dim);
}

.wiki-toc h4 {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 16px 0 6px;
  font-weight: 600;
}

.wiki-toc ul { list-style: none; padding: 0; margin: 0; }
.wiki-toc li { margin: 4px 0; }
.wiki-toc a { color: var(--text-dim); text-decoration: none; padding: 4px 8px; border-radius: 6px; display: block; transition: all 0.15s; }
.wiki-toc a:hover { color: var(--text); background: var(--panel-hi); }
.wiki-toc a.active { color: var(--accent); background: var(--accent-dim); }

.wiki-body {
  padding: 32px 40px;
  max-width: 820px;
  line-height: 1.65;
}
.wiki-body article h1 { font-size: 30px; font-weight: 500; margin: 0 0 18px; color: var(--text); }
.wiki-body article h2 { font-size: 20px; font-weight: 500; margin: 28px 0 10px; color: var(--text); border-bottom: 1px solid var(--border-soft); padding-bottom: 6px; }
.wiki-body article h3 { font-size: 16px; font-weight: 500; margin: 20px 0 8px; color: var(--text); }
.wiki-body article p { margin: 12px 0; color: var(--text-dim); }
.wiki-body article a { color: var(--accent); text-decoration: none; }
.wiki-body article a:hover { text-decoration: underline; }
.wiki-body article code { background: var(--panel-hi); padding: 2px 6px; border-radius: 4px; font-size: 12px; color: var(--accent); }
.wiki-body article pre { background: var(--panel-hi); padding: 14px 16px; border-radius: 8px; overflow-x: auto; margin: 16px 0; }
.wiki-body article pre code { background: transparent; padding: 0; color: var(--text); font-size: 12px; }
.wiki-body article ul, .wiki-body article ol { padding-left: 22px; color: var(--text-dim); margin: 8px 0; }
.wiki-body article li { margin: 4px 0; }
.wiki-body article blockquote { border-left: 3px solid var(--accent); padding-left: 14px; margin: 12px 0; color: var(--text-muted); font-style: italic; }

@media (max-width: 900px) {
  .wiki-layout { grid-template-columns: 1fr; padding: 20px 22px; }
  .wiki-toc { position: static; }
}
