/* ============================================================
   components.css — shared design system for server-generated pages
   ============================================================ */

/* ── Stat grid ────────────────────────────────────────────── */
.c-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.c-stat-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 10px 0;
  display: grid;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: color 180ms ease, opacity 180ms ease;
}

.c-stat-card:hover {
  opacity: 0.92;
}

.c-stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.c-stat-value {
  margin: 0;
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.1;
  word-break: break-word;
}

.c-stat-value.accent { color: var(--accent-light); }
.c-stat-value.cyan   { color: var(--accent-2); }
.c-stat-value.muted  { color: var(--muted); font-size: 1.1rem; }

/* ── Detail cards (KV pairs) ──────────────────────────────── */
.c-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.c-detail-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.c-detail-card-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.c-kv {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
}

.c-kv:last-child { border-bottom: none; }

.c-kv-key {
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}

.c-kv-val {
  color: var(--text);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

/* ── Section header ───────────────────────────────────────── */
.c-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.c-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.c-kicker {
  margin: 0;
  color: var(--accent-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

/* ── Divider ──────────────────────────────────────────────── */
.c-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 18px 0;
}

/* ── Badge ────────────────────────────────────────────────── */
.c-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.c-badge.accent {
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(124, 58, 237, 0.35);
  color: var(--accent-light);
}

.c-badge.cyan {
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--accent-2);
}

.c-badge.success {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.c-badge.warn {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

/* ── Pricing cards ────────────────────────────────────────── */
.c-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.c-pricing-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 20px;
  display: grid;
  gap: 14px;
  position: relative;
  transition: border-color 200ms ease, transform 200ms ease;
}

.c-pricing-card:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 58, 237, 0.25);
}

.c-pricing-card.featured {
  border-color: rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.06);
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.1);
}

.c-pricing-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.c-pricing-price {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  line-height: 1;
}

.c-pricing-price span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}

.c-pricing-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.c-pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.c-pricing-features li::before {
  content: "✓";
  color: var(--accent-light);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Upload / progress card ───────────────────────────────── */
.c-upload-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  padding: 24px;
  display: grid;
  gap: 16px;
}

.c-upload-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.c-upload-option {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.c-upload-option:hover {
  border-color: rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.05);
}

.c-upload-option-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.c-upload-option input[type="checkbox"],
.c-upload-option select {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.88rem;
  padding: 8px 10px;
  box-shadow: none;
  appearance: none;
}

.c-upload-option select {
  width: 100%;
}

.c-upload-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.c-upload-file-input {
  display: grid;
  gap: 6px;
}

.c-upload-file-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.c-upload-file-input input[type="file"] {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(124, 58, 237, 0.3);
  border-radius: 12px;
  padding: 14px;
  color: var(--text);
  font-size: 0.9rem;
  width: 100%;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.c-upload-file-input input[type="file"]:hover {
  border-color: rgba(124, 58, 237, 0.55);
  background: rgba(124, 58, 237, 0.05);
}

.c-progress-card {
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.05);
  padding: 14px 16px;
  display: grid;
  gap: 12px;
}

.c-progress-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.c-progress-phase {
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0;
}

.c-progress-pct {
  color: var(--accent-light);
  font-weight: 800;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.c-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.c-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  box-shadow: 0 0 18px var(--accent-glow);
  transition: width 140ms linear;
  border-radius: 999px;
}

.c-progress-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  font-size: 0.85rem;
}

.c-progress-stat-label {
  color: var(--muted);
  font-size: 0.75rem;
}

.c-progress-stat-val {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── Server grid cards ────────────────────────────────────── */
.c-server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.c-server-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: color 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.c-server-card:hover {
  opacity: 0.94;
  transform: translateY(-2px);
}

.c-server-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.c-server-icon img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.c-server-name {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.3;
  word-break: break-word;
}

.c-server-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

/* ── Command / download rows ──────────────────────────────── */
.c-cmd-list {
  display: grid;
  gap: 4px;
}

.c-cmd-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  transition: background 150ms ease, border-color 150ms ease;
}

.c-cmd-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.c-cmd-name {
  font-weight: 700;
  color: var(--accent-light);
  font-family: "Fira Code", "Cascadia Code", monospace;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.c-cmd-desc {
  color: var(--muted);
  font-size: 0.82rem;
  flex: 1;
}

.c-cmd-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ── Download row ─────────────────────────────────────────── */
.c-dl-list {
  display: grid;
  gap: 6px;
}

.c-dl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: var(--text);
  font-size: 0.88rem;
  transition: background 150ms ease, border-color 150ms ease;
}

.c-dl-row:hover {
  background: rgba(124, 58, 237, 0.07);
  border-color: rgba(124, 58, 237, 0.2);
}

.c-dl-name {
  flex: 1;
  font-weight: 600;
  word-break: break-all;
}

.c-dl-meta {
  color: var(--muted);
  font-size: 0.78rem;
  flex-shrink: 0;
}

/* ── Inventory / item grid ────────────────────────────────── */
.c-inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.c-inv-item {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 12px 0;
  display: grid;
  gap: 8px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: opacity 160ms ease;
}

.c-inv-item:hover {
  opacity: 0.94;
}

.c-inv-emoji {
  font-size: 1.8rem;
  line-height: 1.2;
}

.c-inv-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.c-inv-qty {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Tabs ─────────────────────────────────────────────────── */
.c-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 4px;
  flex-wrap: wrap;
}

.c-tab {
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  white-space: nowrap;
}

.c-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.c-tab.active {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.3);
  color: var(--accent-light);
}

/* ── Empty state ──────────────────────────────────────────── */
.c-empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  justify-items: center;
}

.c-empty-icon {
  font-size: 2rem;
  opacity: 0.5;
}

.c-empty-msg {
  font-size: 0.92rem;
}

/* ── Buttons ──────────────────────────────────────────────── */
.c-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 11px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
  white-space: nowrap;
}

.c-btn:hover { transform: translateY(-1px); }

.c-btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow: 0 0 20px var(--accent-glow);
}

.c-btn.primary:hover {
  background: var(--accent-light);
  box-shadow: 0 0 30px var(--accent-glow);
}

.c-btn.ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
}

.c-btn.ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
}

.c-btn.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}

.c-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

/* ── Actions bar ──────────────────────────────────────────── */
.c-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ── Status message ───────────────────────────────────────── */
.c-status {
  font-size: 0.88rem;
  color: var(--muted);
  min-height: 1.2em;
}

.c-status.ok    { color: #34d399; }
.c-status.error { color: #f87171; }

.c-status.compact {
  margin-top: 10px;
}

/* ── Info bar ─────────────────────────────────────────────── */
.c-info-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--accent-2);
  font-size: 0.88rem;
}

.c-warn-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-size: 0.88rem;
}

/* ── Page layout helpers ──────────────────────────────────── */
.c-page {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

.c-shell-main {
  position: relative;
  margin: 0 auto;
}

.c-shell-narrow {
  --site-shell-inline-pad: 16px;
  max-width: 700px;
  padding: 0 16px 40px;
}

.c-shell-medium {
  --site-shell-inline-pad: 16px;
  max-width: 760px;
  padding: 0 16px 34px;
}

.c-shell-wide {
  --site-shell-inline-pad: 24px;
  max-width: 1440px;
  padding: 0 28px 40px;
}

.c-shell-app {
  --site-shell-inline-pad: 24px;
  max-width: 1680px;
  padding: 0 28px 44px;
}

.c-shell-dashboard {
  --site-shell-inline-pad: 24px;
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 28px 44px;
}

.c-fit-width {
  width: fit-content;
}

.c-inline-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.c-inline-head .c-kicker {
  margin: 0;
}

.c-accent-text {
  color: var(--accent-light);
}

.c-card-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.c-readable {
  line-height: 1.7;
}

.c-inline-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text);
}

.c-inline-note strong {
  color: var(--text);
}

.c-code-block {
  width: 100%;
  min-height: 160px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-family: "Fira Code", "Cascadia Code", monospace;
  font-size: 0.9rem;
  resize: vertical;
}

.c-code-block:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.c-end-badge {
  align-self: flex-end;
}

.c-app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(124, 58, 237, 0.06), transparent),
    rgba(255, 255, 255, 0.025);
}

.c-app-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.c-app-nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.c-app-nav-link.is-active,
.c-app-nav-link[aria-current="page"] {
  color: var(--text);
  background: rgba(124, 58, 237, 0.14);
  border-color: rgba(124, 58, 237, 0.28);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.08);
}

.c-app-hero {
  display: grid;
  gap: 8px;
  padding-top: 24px;
}

.c-app-hero-copy {
  display: grid;
  gap: 6px;
}

.c-app-hero-title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.c-app-hero-subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
  font-size: 0.94rem;
  line-height: 1.6;
}

.c-app-body {
  display: grid;
  gap: 26px;
  padding: 18px 0 18px;
}

.c-card {
  background: transparent;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
  padding: 0;
  display: grid;
  gap: 14px;
}

.c-stack {
  display: grid;
  gap: 18px;
}

.c-section-grid {
  display: grid;
  gap: 24px;
}

.c-section-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.c-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 360px);
  gap: 24px;
  align-items: start;
}

.c-main-col,
.c-side-col {
  display: grid;
  gap: 24px;
}

.c-section-card {
  display: grid;
  gap: 16px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.c-section-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 0;
}

.c-section-card-copy {
  display: grid;
  gap: 5px;
}

.c-section-card-title {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.c-section-card-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  max-width: 58ch;
}

.c-compact-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 2px 0;
}

.c-mini-panel {
  display: grid;
  gap: 10px;
  padding: 14px 0 0;
}

.c-mini-panel-title {
  margin: 0;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.c-overview-panel {
  display: grid;
  gap: 20px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.c-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.c-overview-copy {
  display: grid;
  gap: 7px;
}

.c-overview-title {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.c-overview-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
  max-width: 70ch;
}

.c-metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.c-metric-chip {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.c-metric-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.c-metric-value {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.c-note-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.c-note-list li {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.c-note-list strong {
  color: var(--text);
}

.c-scroll-panel {
  max-height: 60vh;
  overflow: auto;
  padding-right: 4px;
}

.c-library-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  width: 100%;
}

.c-library-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  margin-left: calc(-1 * min(24px, var(--site-shell-inline-pad, 24px)));
  padding-left: min(24px, var(--site-shell-inline-pad, 24px));
}

.c-library-filter-sidebar {
  display: grid;
  gap: 22px;
  padding: 2px 0 0;
  width: 100%;
}

.c-library-filter-sidebar-head {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.c-library-filter-title {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.c-library-filter-groups {
  display: grid;
  gap: 18px;
}

.c-library-filter-group {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Page header ──────────────────────────────────────────── */
.c-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 30px;
  padding-bottom: 10px;
}

.c-page-head-copy {
  display: grid;
  gap: 5px;
}

.c-page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.c-page-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
  max-width: 68ch;
}

/* ── Content section wrapper ──────────────────────────────── */
.c-content {
  display: grid;
  gap: 24px;
  padding: 10px 0 18px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .c-shell-app,
  .c-shell-dashboard,
  .c-shell-wide,
  .c-shell-medium,
  .c-shell-narrow {
    padding-left: 16px;
    padding-right: 16px;
  }

  .c-stat-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .c-app-nav {
    gap: 6px;
    padding: 6px;
  }

  .c-app-nav-link {
    flex: 1 1 calc(50% - 6px);
    min-width: 132px;
  }

  .c-app-hero {
    grid-template-columns: 1fr;
  }

  .c-detail-grid {
    grid-template-columns: 1fr;
  }

  .c-section-grid.two,
  .c-columns,
  .c-library-layout {
    grid-template-columns: 1fr;
  }

  .c-library-sidebar {
    position: static;
  }

  .c-pricing-grid {
    grid-template-columns: 1fr;
  }

  .c-server-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }

  .c-card {
    padding: 14px;
  }
}

/* ── Downloads library ────────────────────────────────────── */
.c-downloads-controls {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(130px, 0.8fr));
  gap: 12px;
  margin: 0;
}

.c-downloads-controls-inline {
  margin-bottom: 0;
}

.c-library-browser {
  display: grid;
  gap: 24px;
  min-width: 0;
  align-content: start;
}

.c-library-toolbar {
  display: grid;
  gap: 18px;
  align-items: start;
  padding-top: 4px;
}

.c-library-toolbar-main,
.c-library-toolbar-meta {
  min-width: 0;
}

.c-library-filters-head {
  display: grid;
  gap: 4px;
  margin-bottom: 0;
}

.c-library-filters-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.c-library-toolbar-meta {
  align-self: end;
}

.c-library-toolbar-quiet {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.c-downloads-control {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.c-downloads-control label {
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(212, 238, 229, 0.58);
  font-weight: 800;
}

.c-downloads-control input,
.c-downloads-control select {
  width: 100%;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  padding: 10px 0 11px;
  font: inherit;
  font-size: 0.88rem;
  box-shadow: none;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
  appearance: none;
}

.c-downloads-control input:focus,
.c-downloads-control select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.2);
  background: transparent;
  box-shadow: none;
}

.c-downloads-summary {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  border-bottom: 0;
}

.c-downloads-summary-main {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.c-downloads-summary-label {
  color: rgba(212, 238, 229, 0.68);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.c-downloads-summary-main strong {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.c-downloads-summary-breakdown {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.84rem;
}

.c-downloads-summary-breakdown span {
  position: relative;
}

.c-downloads-summary-breakdown span + span::before {
  content: "•";
  margin-right: 12px;
  color: rgba(255,255,255,0.24);
}

.c-downloads-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px 18px;
  align-items: start;
  min-width: 0;
}

.c-download-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0 0 14px;
  min-width: 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: opacity 180ms ease;
}

.c-download-card:hover {
  opacity: 0.95;
}

.c-download-preview {
  position: relative;
  height: 156px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
}

.c-download-preview img,
.c-download-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.c-download-preview video {
  background: rgba(0,0,0,0.4);
}

.c-download-placeholder {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--accent-light);
  border: 1px solid rgba(124,58,237,0.3);
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(124,58,237,0.1);
}

.c-download-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(7,7,15,0.85);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--muted);
  text-transform: uppercase;
}

.c-download-title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

.c-download-meta {
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.c-download-meta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c-download-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 2px;
}

.c-download-btn {
  border: 1px solid rgba(124,58,237,0.4);
  border-radius: 9px;
  padding: 8px 10px;
  background: rgba(124,58,237,0.14);
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  transition: background 150ms ease, border-color 150ms ease;
}

.c-download-btn:hover {
  background: rgba(124,58,237,0.22);
  border-color: rgba(124,58,237,0.6);
}

.c-download-btn.ghost {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
  color: var(--muted);
}

.c-download-btn.ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
}

@media (min-width: 1100px) {
  .c-library-toolbar-meta {
    justify-self: end;
  }
}

@media (max-width: 960px) {
  .c-section-grid.two,
  .c-columns,
  .c-library-layout {
    grid-template-columns: 1fr;
  }

  .c-shell-app,
  .c-shell-dashboard,
  .c-shell-wide {
    padding-left: 22px;
    padding-right: 22px;
  }

  .c-library-sidebar {
    position: static;
    margin-left: 0;
    padding-left: 0;
  }

  .c-library-toolbar-quiet {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .c-library-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .c-downloads-summary {
    gap: 10px;
  }

  .c-downloads-summary-main {
    width: 100%;
  }

  .c-downloads-summary-breakdown {
    gap: 8px;
  }

  .c-downloads-summary-breakdown span + span::before {
    margin-right: 8px;
  }
}

/* ── Simplified visual system overrides ─────────────────────
   Keep the server-rendered feature surface intact, but remove
   decorative chrome so pages read as calm product UI. */

.c-shell-app,
.c-shell-dashboard,
.c-shell-wide {
  max-width: 1500px;
}

.c-app-body,
.c-content {
  gap: 22px;
}

.c-app-nav {
  margin-top: 12px;
  padding: 0;
  gap: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
}

.c-app-nav-link {
  min-height: 42px;
  border-radius: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 12px;
  color: var(--muted);
}

.c-app-nav-link:hover {
  background: transparent;
  color: var(--text);
}

.c-app-nav-link.is-active,
.c-app-nav-link[aria-current="page"] {
  background: transparent;
  border-color: var(--accent);
  color: var(--text);
  box-shadow: none;
}

.c-app-hero {
  padding-top: 22px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.c-app-hero-title,
.c-page-title,
.c-overview-title,
.c-library-filters-title {
  font-weight: 760;
  letter-spacing: -0.035em;
}

.c-kicker,
.c-detail-card-title,
.c-upload-option-label,
.c-downloads-control label,
.c-downloads-summary-label,
.c-library-filter-title {
  color: var(--muted);
}

.c-stat-card,
.c-detail-card,
.c-section-card,
.c-card,
.c-overview-panel,
.c-server-card,
.c-inv-item,
.c-download-card {
  box-shadow: none;
}

.c-stat-card {
  padding: 12px 0;
  border-bottom-color: var(--line);
}

.c-stat-value.accent,
.c-stat-value.cyan,
.c-accent-text,
.c-cmd-name {
  color: var(--accent-light);
}

.c-section-card {
  gap: 14px;
}

.c-section-card-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.c-section-card-subtitle {
  display: none;
}

.c-metric-chip,
.c-upload-option,
.c-progress-card,
.c-dl-row,
.c-tabs,
.c-info-bar,
.c-warn-bar,
.c-note-list li {
  border-color: var(--line);
  background: transparent;
  box-shadow: none;
}

.c-upload-option:hover,
.c-dl-row:hover,
.c-tab:hover,
.c-cmd-row:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.14);
}

.c-upload-option input[type="checkbox"],
.c-upload-option select,
.c-upload-file-input input[type="file"],
.c-code-block {
  background: #0f1219;
  border-color: var(--line);
  border-radius: 10px;
}

.c-upload-file-input input[type="file"]:hover {
  background: #121722;
  border-color: rgba(255, 255, 255, 0.16);
}

.c-progress-fill {
  background: var(--accent);
  box-shadow: none;
}

.c-btn,
.c-download-btn {
  border-radius: 10px;
  box-shadow: none;
  transform: none;
}

.c-btn:hover,
.c-download-btn:hover,
.c-server-card:hover {
  transform: none;
}

.c-btn.primary,
.c-download-btn {
  background: var(--accent);
  border-color: transparent;
  color: #07110d;
  box-shadow: none;
}

.c-btn.primary:hover,
.c-download-btn:hover {
  background: var(--accent-light);
  border-color: transparent;
  box-shadow: none;
}

.c-btn.ghost,
.c-download-btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.c-btn.ghost:hover,
.c-download-btn.ghost:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.16);
}

.c-badge.accent,
.c-badge.cyan,
.c-badge.success,
.c-badge.warn {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.c-library-layout {
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 30px;
}

.c-library-filter-sidebar-head,
.c-library-filter-group,
.c-library-toolbar-quiet {
  border-color: var(--line);
}

.c-downloads-control input,
.c-downloads-control select {
  color: var(--text);
  border-bottom-color: var(--line);
}

.c-downloads-control select,
.c-upload-option select {
  color-scheme: dark;
}

.c-downloads-summary {
  color: var(--muted);
}

.c-downloads-summary-breakdown span + span::before {
  color: rgba(255, 255, 255, 0.22);
}

.c-downloads-library {
  gap: 24px 20px;
}

.c-download-preview {
  border-radius: 12px;
  border-color: var(--line);
  background: #11141b;
}

.c-download-placeholder {
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
}

.c-download-badge {
  background: rgba(11, 13, 18, 0.88);
  border-color: var(--line);
}
