/* Payonline dashboards — the captain_builders design system (lifted from
   captain.works): near-black ground with magenta/violet radial glows,
   Manrope, pill nav chips (#1F1F1F, radius 999px), CTA gradient
   #E60165 -> #8000DB (radius 10px), solid-white secondary button.
   Deliberately single-theme (dark); every color is painted explicitly.
   Pay pages (public/pay) intentionally do NOT use this file — the checkout
   is minimal black-on-white and lives in its own stylesheet. */

:root {
  --background: #0a0a0b;
  --foreground: #ffffff;
  --card: #151517;
  --muted: #1f1f1f;
  --muted-foreground: #9a9aa3;
  --border: #2a2a2e;
  --primary: #ffffff;          /* site's secondary = solid white on black */
  --primary-foreground: #0a0a0b;
  --accent: #e60165;           /* magenta end of the CTA gradient */
  --accent-2: #8000db;         /* violet end of the CTA gradient */
  --duck: #ffc800;             /* logo yellow — brand mark accents only */
  --ring: #e60165;
  --danger: #ff4d6d;
  --success: #35d073;
  --radius: 0.625rem;          /* 10px, as on captain.works buttons */
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* our display:flex rules must not defeat the hidden attribute */
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Manrope, -apple-system, "Segoe UI", system-ui, sans-serif;
  color: var(--foreground);
  /* The captain.works hero glow, toned down for an app that is read daily. */
  background:
    radial-gradient(55% 38% at 75% -5%, rgba(128, 0, 219, 0.20), transparent 65%),
    radial-gradient(45% 30% at 15% 105%, rgba(230, 1, 101, 0.10), transparent 60%),
    var(--background);
  background-attachment: fixed;
}
button { font: inherit; }
a { color: var(--accent); }
.muted { color: var(--muted-foreground); }
/* Person links in admin tables: open the unified profile in a new tab. */
.user-link { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--muted-foreground); }
.user-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- app shell: sidebar + content ---------- */

#app { display: flex; height: 100dvh; }

.sidebar {
  width: 15.5rem; flex: none;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  background: rgba(10, 10, 11, 0.6);
  padding: 1.1rem 0.8rem;
  gap: 0.15rem;
}
.brand { display: flex; align-items: center; padding: 0.2rem 0.5rem 1.1rem; }
.brand img.brand-logo { height: 2.1rem; width: auto; display: block; }
.brand .brand-word { font-weight: 800; letter-spacing: -0.02em; margin-left: 0.5rem; }

.nav-items { display: flex; flex-direction: column; gap: 0.3rem; }

/* Nav = the site's pill chips: #1F1F1F, fully rounded. Nav items and cards
   are real <a> links (2026-08-20) — keep them looking like app controls. */
a.nav-item, a.card { text-decoration: none; }
/* Nav pill chips */
.nav-item {
  display: flex; align-items: center; gap: 0.6rem;
  border: 1px solid transparent; background: transparent;
  color: var(--muted-foreground);
  padding: 0.5rem 0.9rem; min-height: 2.5rem; border-radius: 999px;
  cursor: pointer; text-align: left; font-size: 0.92rem; width: 100%;
  font-weight: 600;
}
.nav-item:hover { background: var(--muted); color: var(--foreground); }
.nav-item.active { background: var(--muted); color: var(--foreground); border-color: var(--border); }
.nav-item:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.sidebar .spacer { flex: 1; }

.sidebar-user {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.6rem 0.6rem 0.1rem; border-top: 1px solid var(--border); margin-top: 0.5rem;
  cursor: pointer; /* clicking the avatar/name opens the profile */
}
.sidebar-user:hover .u-name { color: var(--accent); }
.sidebar-user .u-name {
  font-size: 0.85rem; font-weight: 700; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.avatar {
  width: 2rem; height: 2rem; border-radius: 50%; flex: none;
  background: var(--muted); display: inline-flex; align-items: center;
  justify-content: center; font-size: 0.8rem; font-weight: 800;
  color: var(--muted-foreground); overflow: hidden;
  border: 1px solid var(--border);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.content { flex: 1; overflow-y: auto; min-width: 0; }
.content-inner { max-width: 64rem; margin: 0 auto; padding: 2rem 1.5rem 3.5rem; }

.page-title {
  margin: 0 0 0.4rem; font-size: 1.7rem; letter-spacing: -0.03em;
  font-weight: 800; text-wrap: balance;
}
.page-desc { margin: 0 0 1.6rem; color: var(--muted-foreground); max-width: 44rem; }

/* ---------- sections and card grid ---------- */

.section { margin-bottom: 2.4rem; }
.section-title { margin: 0 0 0.3rem; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.section-desc { margin: 0 0 1rem; font-size: 0.88rem; color: var(--muted-foreground); max-width: 44rem; }

.card-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 1rem; overflow: hidden;
  display: flex; flex-direction: column; text-align: left;
  padding: 0; cursor: default; color: var(--foreground);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.card.clickable { cursor: pointer; }
.card.clickable:hover {
  border-color: rgba(230, 1, 101, 0.55);
  box-shadow: 0 8px 32px rgba(230, 1, 101, 0.12);
  transform: translateY(-2px);
}
.card:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.card-img {
  aspect-ratio: 16 / 9; width: 100%; object-fit: cover; display: block;
  background: var(--muted); border-bottom: 1px solid var(--border);
}
.card-img-placeholder {
  aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(70% 100% at 50% 0%, rgba(128, 0, 219, 0.22), transparent 70%),
    #101012;
  border-bottom: 1px solid var(--border);
}
.card-img-placeholder img { width: 3.2rem; opacity: 0.8; }
/* Batch label (B1/B2…) pinned over the card image, top-right. */
.card { position: relative; }
.card-batch {
  position: absolute; top: 0.55rem; right: 0.55rem; z-index: 1;
  padding: 0.15rem 0.55rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em;
  color: #fff; background: rgba(10, 10, 11, 0.72);
  border: 1px solid rgba(230, 1, 101, 0.55);
  backdrop-filter: blur(4px);
}
.card-body { padding: 0.85rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.card-title { font-weight: 800; font-size: 0.97rem; letter-spacing: -0.01em; }
.card-desc { font-size: 0.84rem; color: var(--muted-foreground); line-height: 1.5; }

/* ---------- buttons / inputs ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius); border: 1px solid transparent;
  padding: 0.45rem 1rem; min-height: 2.6rem; min-width: 2.6rem;
  background: transparent; color: var(--foreground); cursor: pointer;
  gap: 0.45rem; font-weight: 700;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s, filter 0.12s;
}
.btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
/* The captain.works CTA: bottom-to-top magenta -> violet gradient. */
.btn-primary {
  background: linear-gradient(0deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
}
.btn-primary:hover { filter: brightness(1.12); }
/* The site's secondary: solid white on black. */
.btn-white { background: #fff; color: #0a0a0b; }
.btn-white:hover { opacity: 0.9; }
.btn-outline { border-color: var(--border); }
.btn-outline:hover { background: var(--muted); }
.btn-ghost:hover { background: var(--muted); }
.btn-sm { min-height: 2.1rem; padding: 0.25rem 0.7rem; font-size: 0.85rem; }
/* Small buttons drop the two-color CTA gradient for a solid fill (user
   request 2026-08-17; kept in the gradient syntax they specified). */
.btn-sm.btn-primary { background: linear-gradient(0turn, rgba(201, 0, 135, 1) 0%, rgba(201, 0, 135, 1) 100%); }
.btn-icon { padding: 0.2rem 0.55rem; }
.btn-danger { color: var(--danger); }
.btn:disabled { opacity: 0.4; cursor: default; }

.input, .select {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); color: var(--foreground);
  padding: 0.4rem 0.7rem; min-height: 2.6rem; font: inherit;
}
.input::placeholder { color: var(--muted-foreground); }
.input:focus-visible, .select:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.input-sm { min-height: 2.1rem; padding: 0.2rem 0.55rem; font-size: 0.85rem; }

.badge {
  font-size: 0.7rem; font-weight: 700; padding: 0.14rem 0.55rem; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted-foreground); white-space: nowrap;
  background: var(--muted);
}
.badge.ok { color: var(--success); border-color: rgba(53, 208, 115, 0.35); }
.badge.accent { color: #ff5fa2; border-color: rgba(230, 1, 101, 0.4); background: rgba(230, 1, 101, 0.12); }
.badge.warn { color: #ffb020; border-color: rgba(255, 176, 32, 0.35); }
.badge.danger { color: var(--danger); border-color: rgba(255, 77, 109, 0.45); }

/* ---------- login screen ---------- */

.center-screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 1rem; z-index: 40;
  background:
    radial-gradient(60% 45% at 70% 0%, rgba(128, 0, 219, 0.28), transparent 65%),
    radial-gradient(50% 35% at 20% 100%, rgba(230, 1, 101, 0.14), transparent 60%),
    var(--background);
}
.login-card {
  background: rgba(21, 21, 23, 0.85); border: 1px solid var(--border); border-radius: 1.1rem;
  padding: 2.3rem 1.9rem; max-width: 25rem; width: 100%; text-align: center;
  display: flex; flex-direction: column; gap: 1rem; align-items: center;
  backdrop-filter: blur(6px);
}
.login-card h1 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; font-weight: 800; }
.login-card p { margin: 0; font-size: 0.9rem; color: var(--muted-foreground); }
.login-mark img { height: 3.4rem; width: auto; }
.login-mark { font-size: 2.6rem; line-height: 1; }
.login-wait { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: var(--muted-foreground); }
.spinner {
  width: 1rem; height: 1rem; border-radius: 50%; flex: none;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
  .card, .card.clickable:hover { transform: none; transition: none; }
}

/* ---------- internal page view ---------- */

.inner-page { max-width: 44rem; }
.inner-page .back-row { margin-bottom: 1rem; }
.inner-page h1 { font-size: 1.5rem; margin: 0 0 0.9rem; letter-spacing: -0.02em; font-weight: 800; }
/* Long-form reading: body copy at 16px with softened near-white — pure
   #fff on near-black is max contrast and tires the eye; headings stay
   full-white for hierarchy (2026-08-21). */
.inner-page { font-size: 1rem; color: rgba(255, 255, 255, 0.85); }
.inner-page h1, .inner-page h2, .inner-page h3 { color: var(--foreground); }
.inner-page h2 {
  font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em;
  margin: 2rem 0 0.6rem;
}
.inner-page h2:first-child { margin-top: 0; }
.inner-page ul { padding-left: 1.2rem; line-height: 1.7; }
.inner-page li { margin: 0.35rem 0; }
.inner-page p { line-height: 1.7; }

/* ---------- tables (admin, rating ledger) ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.table th {
  text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted-foreground); font-weight: 700;
  padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border);
  background: var(--muted); white-space: nowrap;
}
.table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }

/* ---------- admin: rule editor ---------- */

.entity-card {
  border: 1px solid var(--border); border-radius: 0.85rem;
  background: var(--card); padding: 0.9rem 1.05rem; margin-bottom: 0.8rem;
}
.entity-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; cursor: pointer; }
/* Short admin-facing note under an entity head in the permissions editor. */
.entity-note { margin: 0.45rem 0 0; font-size: 0.82rem; line-height: 1.45; color: var(--muted-foreground); max-width: 46rem; }
/* Divider between the visibility blocks and the click-routing/access block. */
.rule-divider { border-top: 1px solid var(--border); margin: 1.1rem 0; }
/* Admin "view as participant" mode: fixed pill so it is visible on every page. */
.viewas-banner {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%);
  z-index: 2000; display: flex; align-items: center; gap: 0.8rem;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 0.88rem;
  padding: 0.5rem 0.7rem 0.5rem 1.1rem; border-radius: 999px;
  box-shadow: 0 8px 32px rgba(230, 1, 101, 0.35);
  max-width: min(92vw, 40rem);
}
.viewas-banner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Structure tab: sections -> cards -> pages tree + tg-link rows. */
.structure-card { border-left: 2px solid var(--border); margin: 0.8rem 0 0 0.3rem; padding: 0.1rem 0 0.1rem 0.9rem; }
.structure-card-title { font-weight: 700; font-size: 0.92rem; margin-bottom: 0.25rem; }
.structure-page { border-left: 2px solid var(--border); margin: 0.6rem 0 0.2rem 0.6rem; padding: 0.1rem 0 0.1rem 0.9rem; }
.structure-line { font-size: 0.85rem; margin: 0.2rem 0; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.structure-line a { word-break: break-all; }
.tg-link-row { font-size: 0.85rem; margin: 0.25rem 0; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.tg-link-row a { word-break: break-all; }
/* Points policy lists (admin) and the rating narrative (user). */
.points-rules { margin: 0.5rem 0 0; padding-left: 1.2rem; line-height: 1.65; font-size: 0.9rem; }
.points-rules li { margin: 0.15rem 0; }
/* Drag & drop ordering (admin: perms editor blocks + pages table). */
.drag-handle { display: inline-flex; align-items: center; color: var(--muted-foreground); cursor: grab; }
.drag-handle:active { cursor: grabbing; }
.drag-handle .icon { width: 1rem; height: 1rem; }
.entity-card.dragging, tr.dragging { opacity: 0.45; }
.head-open { display: inline-flex; align-items: center; margin-left: auto; }
.head-open .icon { width: 1rem; height: 1rem; }
.entity-key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; color: var(--muted-foreground); }
.rule-block { margin-top: 0.85rem; }
.rule-block-title { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-foreground); margin-bottom: 0.45rem; }
.rule-row { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.rule-row .select, .rule-row .input { min-height: 2.1rem; padding: 0.2rem 0.5rem; font-size: 0.84rem; }
.rule-row .grow { flex: 1; min-width: 8rem; }
.rule-actions { display: flex; gap: 0.45rem; margin-top: 0.55rem; flex-wrap: wrap; }

.stat-row { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.stat {
  border: 1px solid var(--border); border-radius: 0.85rem; background: var(--card);
  padding: 0.8rem 1.1rem; min-width: 8.5rem;
}
.stat .stat-value {
  font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(0deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .stat-label { font-size: 0.75rem; color: var(--muted-foreground); }

.toast {
  position: fixed; top: 1.2rem; left: 50%; transform: translateX(-50%);
  background: #fff; color: #0a0a0b;
  padding: 0.6rem 1.1rem; border-radius: var(--radius); font-size: 0.9rem; font-weight: 700;
  z-index: 100; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); max-width: 90vw;
}

/* ---------- profile ---------- */

.profile-card {
  display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 1rem; background: var(--card);
  padding: 1.3rem 1.4rem; max-width: 32rem;
}
.profile-card .avatar { width: 4rem; height: 4rem; font-size: 1.4rem; }
.profile-info { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.profile-name { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; }
.profile-meta { font-size: 0.85rem; color: var(--muted-foreground); word-break: break-all; }
.profile-badges { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.3rem; }

/* ---------- mobile ---------- */
/* Sidebar becomes a top bar with horizontally scrollable pill nav; everything
   must fit 320px with zero horizontal page scroll. */

@media (max-width: 760px) {
  #app { flex-direction: column; }
  .sidebar {
    width: 100%; flex-direction: row; align-items: center;
    border-right: 0; border-bottom: 1px solid var(--border);
    padding: 0.45rem 0.55rem; gap: 0.3rem;
    overflow-x: auto; scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .brand { padding: 0.2rem 0.35rem; flex: none; }
  .brand img.brand-logo { height: 1.6rem; }
  .nav-items { flex-direction: row; gap: 0.25rem; }
  .nav-item { width: auto; flex: none; padding: 0.4rem 0.7rem; min-height: 2.25rem; font-size: 0.85rem; white-space: nowrap; }
  .nav-item .icon { display: none; }
  .sidebar .spacer { display: none; }
  .sidebar-user { border-top: 0; margin: 0 0 0 auto; padding: 0.2rem 0.3rem; flex: none; }
  .sidebar-user .u-name { display: none; }
  .avatar { width: 1.75rem; height: 1.75rem; }
  .content-inner { padding: 1.1rem 0.85rem 2.5rem; }
  .card-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 1.35rem; }
}

/* ---------- icon sizing (inline SVG, Lucide) ---------- */

.icon { width: 1em; height: 1em; flex: none; vertical-align: -0.125em; }
.btn .icon { width: 1.1em; height: 1.1em; }
.nav-item .icon { width: 1.15em; height: 1.15em; }

/* ---------- payonline: brand mark ---------- */
/* Text logo: "payonline" + gradient dot. The emoji app mark lives only in
   the favicon / tab title (repo rule: emoji allowed as the app sign). */
.brand-word { font-weight: 800; letter-spacing: -0.03em; font-size: 1.15rem; }
.brand-dot {
  display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%;
  margin-left: 0.25rem;
  background: linear-gradient(0deg, var(--accent), var(--accent-2));
}

/* ---------- payonline: forms ---------- */
.form-card {
  border: 1px solid var(--border); border-radius: 1rem; background: var(--card);
  padding: 1.2rem 1.3rem; margin-bottom: 1rem;
}
.form-card h2 { margin: 0 0 0.9rem; font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.9rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.field > label {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted-foreground);
}
.field .hint { font-size: 0.78rem; color: var(--muted-foreground); line-height: 1.45; }
.field textarea.input { min-height: 4.6rem; resize: vertical; line-height: 1.5; padding-top: 0.55rem; }
.field-wide { grid-column: 1 / -1; }
.check-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; cursor: pointer; }
.check-row input[type="checkbox"] { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }

/* Acquiring rows in the product form: checkbox + button-label input + PP. */
.acq-row {
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.55rem 0.8rem; margin-bottom: 0.5rem; background: rgba(31, 31, 31, 0.35);
}
.acq-row.disabled { opacity: 0.45; }
.acq-row .acq-name { font-weight: 700; min-width: 8.5rem; }
.acq-row .grow { flex: 1; min-width: 10rem; }

/* Currency price rows. */
.price-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.price-row .cur { font-weight: 800; text-transform: uppercase; min-width: 3rem; }

/* Status badges reuse .badge; revenue emphasized in tables. */
.revenue { font-weight: 800; white-space: nowrap; }

/* Copyable monospace values (API key, webhook source, A record). */
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem;
  background: var(--muted); border: 1px solid var(--border); border-radius: 0.45rem;
  padding: 0.2rem 0.5rem; word-break: break-all;
}

/* Login screen: applogin iframe opens above; dev login inline. */
.form-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }

/* ---------- analytics ---------- */
.tabs { display: flex; gap: 0.4rem; margin: 0 0 1.1rem; flex-wrap: wrap; }
.tab-btn {
  border: 1px solid transparent; background: transparent; color: var(--muted-foreground);
  padding: 0.35rem 0.9rem; border-radius: 999px; cursor: pointer; font: inherit;
  font-size: 0.88rem; font-weight: 700;
}
.tab-btn:hover { background: var(--muted); color: var(--foreground); }
.tab-btn.active { background: var(--muted); color: var(--foreground); border-color: var(--border); }
.tab-btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.chart-card {
  border: 1px solid var(--border); border-radius: 1rem; background: var(--card);
  padding: 1rem 1.2rem 0.8rem; margin-bottom: 1rem;
}
.chart-card h2 { margin: 0 0 0.7rem; font-size: 0.95rem; font-weight: 800; }
.chart-wrap { position: relative; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.chart-tooltip {
  position: absolute; pointer-events: none; z-index: 10;
  background: #fff; color: #0a0a0b; font-size: 0.78rem; font-weight: 700;
  padding: 0.25rem 0.55rem; border-radius: 0.45rem; white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); transform: translate(-50%, -130%);
}
.chart-empty { color: var(--muted-foreground); font-size: 0.88rem; padding: 1.4rem 0; }

.bk-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.bk-card { border: 1px solid var(--border); border-radius: 1rem; background: var(--card); padding: 1rem 1.2rem; }
.bk-card h3 { margin: 0 0 0.7rem; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-foreground); }
.bk-row { margin-bottom: 0.55rem; font-size: 0.85rem; }
.bk-line { display: flex; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.2rem; }
.bk-line .k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-line .v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-bar-track { height: 0.25rem; background: var(--muted); border-radius: 999px; overflow: hidden; }
.bk-bar { height: 100%; background: #9f6ce0; border-radius: 999px; }
