/* Dark public theme (landing aesthetic) — shared by public/base.html and
   public/docs/base.html's navbar/subnav (docs.css layers its own light
   theme on top for the docs body). */
body.public-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #070a16 !important;
    color: #fff !important;
    --bs-body-bg: #070a16;
    --bs-body-color: #fff;
}
body.public-body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 560px at 82% -6%, rgba(139,92,246,.22), transparent 60%),
        radial-gradient(820px 520px at 10% 112%, rgba(99,102,241,.16), transparent 60%);
}
.public-navbar { position: relative; z-index: 1020; }
.docs-subnav { position: relative; z-index: 1019; }
.public-main { position: relative; z-index: 1; }
.app-footer { position: relative; z-index: 1; }
.public-main { flex: 1; }

/* ── Glass cards ───────────────────────────────────────────────────── */
body.public-body .card {
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.09);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
body.public-body .card:hover {
    border-color: rgba(129,140,248,.30);
}
body.public-body .card-header {
    background: rgba(255,255,255,0.025);
    border-bottom-color: rgba(255,255,255,0.06);
}
body.public-body .card .bg-white,
body.public-body .bg-white { background: transparent !important; }

/* ── Text & code ───────────────────────────────────────────────────── */
body.public-body .text-muted { color: rgba(255,255,255,0.50) !important; }
body.public-body .text-white-50 { color: rgba(255,255,255,0.55) !important; }
body.public-body .text-dark { color: #fff !important; }
body.public-body .text-secondary { color: rgba(255,255,255,0.55) !important; }
body.public-body code { color: #c4b5fd; }
body.public-body .lead { color: rgba(255,255,255,0.65); }
.grad-text {
    background: linear-gradient(120deg, #a5b4fc, #c4b5fd 50%, #f0abfc);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Tables on dark ────────────────────────────────────────────────── */
body.public-body .table { color: rgba(255,255,255,0.80); }
body.public-body .table > :not(caption) > * > * { border-color: rgba(255,255,255,0.05); }
body.public-body .table thead th,
body.public-body .table .table-light th {
    background: rgba(255,255,255,0.03) !important;
    color: rgba(255,255,255,0.50) !important;
    border-bottom-color: rgba(255,255,255,0.08) !important;
}
body.public-body .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: rgba(255,255,255,0.02); }
body.public-body .table-hover > tbody > tr:hover > * { --bs-table-accent-bg: rgba(99,102,241,.10); }

/* ── Badge pill (shared component) ─────────────────────────────────── */
.badge-pill {
    background: rgba(99,102,241,.18); color: #c7d2fe;
    border: 1px solid rgba(129,140,248,.32); border-radius: 100px;
    font-size: .75rem; padding: .35rem .85rem; font-weight: 600;
    letter-spacing: .02em; display: inline-block; text-decoration: none;
}

/* ── Public navbar ─────────────────────────────────────────────────── */
.public-navbar {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(7, 10, 22, 0.55);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.public-navbar .navbar-brand {
    font-weight: 800; letter-spacing: -.02em;
    display: flex; align-items: center; gap: .55rem; color: #fff;
}
.public-navbar .navbar-brand img { filter: drop-shadow(0 2px 6px rgba(99,102,241,.6)); }
.public-navbar .navbar-brand span {
    background: linear-gradient(120deg, #fff 30%, #c7d2fe);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.public-navbar .nav-link {
    font-weight: 600; font-size: .9rem;
    color: rgba(255,255,255,0.65);
    transition: color .2s var(--ease);
}
.public-navbar .nav-link:hover,
.public-navbar .nav-link.active { color: #fff; }
.public-navbar .navbar-toggler { border-color: rgba(255,255,255,0.15); }
.public-navbar .navbar-toggler i { color: #fff; }

/* Transparent variant (landing hero) */
.public-navbar.navbar-transparent {
    background: transparent;
    border-bottom: none;
    position: absolute;
    width: 100%;
}

/* ── Docs sub-navigation ───────────────────────────────────────────── */
.docs-subnav {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(7, 10, 22, 0.40);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-pill {
    display: inline-block;
    padding: .4rem 1rem;
    border-radius: 100px;
    font-size: .85rem; font-weight: 600;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.nav-pill:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-pill.active {
    color: #fff;
    background: rgba(99,102,241,0.20);
    border-color: rgba(129,140,248,0.32);
}
.docs-subnav-secondary {
    background: rgba(7, 10, 22, 0.22);
    border-bottom-color: rgba(255,255,255,0.03);
}
.nav-pill-sm { padding: .3rem .85rem; font-size: .78rem; color: rgba(255,255,255,0.45); }
.nav-pill-sm.active { background: rgba(99,102,241,0.14); border-color: rgba(129,140,248,0.22); }

/* ── Footer ────────────────────────────────────────────────────────── */
body.public-body .app-footer {
    border-top-color: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.40);
}
body.public-body .app-footer .text-muted { color: rgba(255,255,255,0.40) !important; }
