:root {
    color-scheme: dark;
    --bg: #0d1622;
    --bg-deep: #09111b;
    --sidebar: #101d2b;
    --surface: #142235;
    --surface-soft: #18283b;
    --surface-raised: #1c2e43;
    --surface-inset: #0c1723;
    --border: #2a3d52;
    --border-soft: rgba(126, 155, 184, .16);
    --text: #ecf2f7;
    --text-soft: #c3d0dc;
    --muted: #8fa1b4;
    --muted-2: #64788e;
    --blue: #82aef2;
    --blue-deep: #436b9f;
    --teal: #75cfbf;
    --teal-deep: #2d756e;
    --sage: #a1d3aa;
    --lavender: #b4a4dc;
    --amber: #dfb66f;
    --amber-deep: #8a6229;
    --coral: #df8c94;
    --red: #d5777f;
    --shadow: 0 18px 45px rgba(0, 0, 0, .24);
    --radius: 13px;
    --radius-sm: 9px;
    --topbar-height: 58px;
    --sidebar-width: 240px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg-deep); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 45% -10%, rgba(81, 123, 158, .12), transparent 38%), linear-gradient(180deg, #0d1723, var(--bg-deep)); color: var(--text); font-size: 14px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; left: 14px; top: -60px; z-index: 9999; padding: .75rem 1rem; background: var(--surface-raised); border: 1px solid var(--teal); border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 14px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.bcc-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); grid-template-rows: var(--topbar-height) minmax(0, 1fr); }
.bcc-topbar { grid-column: 1 / -1; grid-row: 1; position: sticky; top: 0; z-index: 50; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--topbar-height); padding: 0 18px; border-bottom: 1px solid var(--border-soft); background: rgba(8, 15, 24, .94); backdrop-filter: blur(18px); }
.brand-cluster, .topbar-actions, .brand-link, .monitoring-state, .refresh-state, .profile-button { display: flex; align-items: center; }
.brand-cluster { min-width: 0; gap: 12px; }
.brand-link { gap: 10px; min-width: 0; }
.brand-mark { width: 35px; height: 35px; color: var(--teal); flex: 0 0 auto; }
.brand-mark svg { width: 100%; height: 100%; fill: rgba(117, 207, 191, .04); stroke: currentColor; stroke-width: 1.3; }
.brand-name { font-size: 1.18rem; font-weight: 680; letter-spacing: -.015em; white-space: nowrap; }
.version-pill, .preview-pill, .freshness-pill, .impact-badge, .setting-category, .identity-badge, .server-badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; white-space: nowrap; }
.version-pill { padding: .22rem .5rem; color: var(--blue); background: rgba(130, 174, 242, .08); border: 1px solid rgba(130, 174, 242, .4); font-size: .75rem; }
.preview-pill { padding: .2rem .45rem; color: var(--lavender); background: rgba(180, 164, 220, .1); border: 1px solid rgba(180, 164, 220, .28); font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }
.topbar-divider { width: 1px; height: 22px; background: var(--border); }
.topbar-divider.compact { height: 18px; }
.page-name { color: var(--text-soft); font-size: .97rem; }
.topbar-actions { gap: 12px; color: var(--muted); font-size: .78rem; }
.monitoring-state { gap: 7px; color: var(--sage); white-space: nowrap; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #78ce8c; box-shadow: 0 0 0 4px rgba(120, 206, 140, .08); }
.refresh-state { gap: 6px; white-space: nowrap; }
.global-search { width: 170px; height: 35px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: rgba(20, 34, 53, .64); color: var(--muted); }
.global-search:focus-within { border-color: rgba(130, 174, 242, .7); box-shadow: 0 0 0 3px rgba(130, 174, 242, .08); }
.global-search input { min-width: 0; width: 100%; background: transparent; border: 0; outline: 0; color: var(--text); }
.global-search input::placeholder { color: var(--muted-2); }
.profile-button { gap: 8px; border: 0; background: transparent; cursor: pointer; padding: 4px; border-radius: 8px; }
.pixel-avatar { position: relative; width: 31px; height: 31px; border-radius: 50%; background: linear-gradient(180deg, #b78b4f 0 33%, #d1a56f 33% 68%, #54714f 68%); box-shadow: inset 0 0 0 2px rgba(255,255,255,.09); overflow: hidden; }
.pixel-avatar::before, .pixel-avatar::after { content: ""; position: absolute; top: 12px; width: 4px; height: 4px; background: #17202b; }
.pixel-avatar::before { left: 8px; }
.pixel-avatar::after { right: 8px; }
.pixel-avatar span { position: absolute; left: 10px; bottom: 5px; width: 11px; height: 3px; background: #694a3f; }
.profile-chevron { color: var(--muted-2); font-size: 1rem; }

.bcc-sidebar { grid-column: 1; grid-row: 2; position: sticky; top: var(--topbar-height); height: calc(100vh - var(--topbar-height)); display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--border-soft); background: linear-gradient(180deg, rgba(16, 29, 43, .98), rgba(13, 24, 37, .98)); }
.sidebar-scroll { padding: 18px 14px; overflow-y: auto; }
.sidebar-kicker { margin: 0 0 8px 8px; color: var(--muted-2); font-size: .67rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-nav { display: grid; gap: 5px; }
.sidebar-link { min-height: 42px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 1px solid transparent; border-radius: 9px; color: var(--text-soft); transition: background .18s, color .18s, border-color .18s, transform .18s; }
a.sidebar-link:hover { color: var(--text); background: rgba(130, 174, 242, .07); transform: translateX(2px); }
.sidebar-link.active { color: #a8e7df; border-color: rgba(117, 207, 191, .26); background: linear-gradient(90deg, rgba(55, 129, 137, .28), rgba(52, 91, 121, .18)); box-shadow: inset 3px 0 0 #6bc9c0; }
.sidebar-icon { width: 23px; display: grid; place-items: center; flex: 0 0 auto; }
.sidebar-divider { height: 1px; margin: 18px 8px; background: var(--border-soft); }
.foundation-nav .disabled { color: #697b8e; cursor: not-allowed; }
.foundation-lock { margin-left: auto; }
.sidebar-version { padding: 18px 22px; color: var(--muted-2); font-size: .74rem; }

.bcc-main { grid-column: 2; grid-row: 2; min-width: 0; padding: 12px 14px 24px; }
.section-block { margin-top: 10px; }
.section-title { margin: 0 0 6px 8px; color: var(--text-soft); font-size: .92rem; font-weight: 580; }
