:root {
    --bc-primary: #3f35ff;
    --bc-primary-2: #4b57ff;
    --bc-bg: #f7f8fc;
    --bc-panel: #ffffff;
    --bc-panel-soft: #f1f2ff;
    --bc-border: #e6e8f2;
    --bc-text: #070b34;
    --bc-muted: #6e7190;
    --bc-good: #34c759;
    --bc-warn: #ff9f2f;
    --bc-bad: #ff4d4f;
    --bc-sidebar: #ffffff;
    --bc-shadow: 0 14px 34px rgba(20, 23, 55, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--bc-text); background: var(--bc-bg); font-size: 14px; }
a { color: var(--bc-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.bc-layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.bc-sidebar { background: var(--bc-sidebar); border-right: 1px solid var(--bc-border); padding: 18px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; }
.bc-brand { display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -.03em; color:#070b34; }
.bc-brand img.bc-brand-icon, .bc-brand-icon { flex: 0 0 34px !important; width: 34px !important; height: 34px !important; max-width: 34px !important; max-height: 34px !important; min-width: 34px !important; min-height: 34px !important; border-radius: 10px; object-fit: contain; display: block; background:#fff; box-shadow: 0 6px 18px rgba(7,11,52,.08); }
.bc-brand-full img.bc-brand-icon, .bc-brand-full .bc-brand-icon { flex-basis: 44px !important; width: 44px !important; height: 44px !important; max-width: 44px !important; max-height: 44px !important; min-width: 44px !important; min-height: 44px !important; border-radius: 12px; }
.bc-brand-wordmark { height: 28px; width: auto; max-width: 180px; object-fit: contain; }
.bc-logo { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, #070b34, #3f35ff); color: white; font-weight: 900; font-size: 12px; }
.bc-nav { display: flex; flex-direction: column; gap: 4px; }
.bc-nav a { color: var(--bc-text); padding: 10px 11px; border-radius: 10px; display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; }
.bc-nav a.active, .bc-nav a:hover { background: var(--bc-panel-soft); color: var(--bc-primary); }
.bc-sidebar-footer { margin-top: auto; color: var(--bc-muted); font-size: 12px; display: grid; gap: 10px; }

.bc-main { min-width: 0; }
.bc-topbar { height: 60px; background: rgba(255,255,255,.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--bc-border); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; position: sticky; top: 0; z-index: 5; }
.bc-content { padding: 26px 32px 70px; max-width: 1500px; }
.bc-title-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 20px; }
h1 { font-size: 26px; margin: 0; letter-spacing: -.035em; }
h2 { font-size: 19px; margin: 0 0 16px; letter-spacing: -.02em; }
h3 { margin: 0 0 10px; font-size: 16px; }
p { line-height: 1.55; }

.bc-grid { display: grid; gap: 16px; }
.bc-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bc-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bc-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bc-card { background: var(--bc-panel); border: 1px solid var(--bc-border); border-radius: 16px; box-shadow: 0 1px 1px rgba(0,0,0,.015); padding: 18px; }
.bc-card.soft { background: var(--bc-panel-soft); }
.bc-stat { display: flex; align-items: center; gap: 12px; }
.bc-stat-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--bc-panel-soft); color: var(--bc-primary); }
.bc-stat-value { font-size: 24px; font-weight: 800; letter-spacing: -.04em; }
.bc-muted { color: var(--bc-muted); }
.bc-small { font-size: 12px; }

.bc-table { width: 100%; border-collapse: collapse; background: var(--bc-panel); border: 1px solid var(--bc-border); border-radius: 16px; overflow: hidden; }
.bc-table th, .bc-table td { padding: 14px 16px; border-bottom: 1px solid var(--bc-border); text-align: left; vertical-align: middle; }
.bc-table th { color: var(--bc-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: #fafbff; }
.bc-table tr:last-child td { border-bottom: 0; }
.bc-site-name { display: flex; align-items: center; gap: 12px; }
.bc-favicon { width: 34px; height: 34px; border-radius: 10px; background: var(--bc-panel-soft); display: grid; place-items: center; overflow: hidden; font-weight: 700; color: var(--bc-primary); }
.bc-favicon img { width: 100%; height: 100%; object-fit: cover; }

.bc-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--bc-panel-soft); color: var(--bc-primary); font-weight: 700; font-size: 12px; white-space: nowrap; }
.bc-pill.good { background: rgba(52,199,89,.13); color: #128035; }
.bc-pill.warn { background: rgba(255,159,47,.14); color: #9d5b00; }
.bc-pill.bad { background: rgba(255,77,79,.12); color: #c12f31; }
.bc-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--bc-muted); }
.bc-dot.good { background: var(--bc-good); }
.bc-dot.warn { background: var(--bc-warn); }
.bc-dot.bad { background: var(--bc-bad); }

.bc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--bc-border); border-radius: 10px; padding: 10px 14px; background: white; color: var(--bc-text); font-weight: 800; cursor: pointer; text-decoration: none; }
.bc-btn:hover { text-decoration: none; border-color: var(--bc-primary); color: var(--bc-primary); }
.bc-btn.primary { background: var(--bc-primary); color: white; border-color: var(--bc-primary); box-shadow: 0 9px 20px rgba(99,91,255,.22); }
.bc-btn.primary:hover { color: white; background: #5048e5; }
.bc-btn.danger { color: var(--bc-bad); }
.bc-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.bc-form { display: grid; gap: 14px; }
.bc-field { display: grid; gap: 7px; }
.bc-field label { font-weight: 700; }
.bc-input, .bc-textarea, .bc-select { width: 100%; border: 1px solid var(--bc-border); border-radius: 10px; padding: 11px 12px; background: white; color: var(--bc-text); font: inherit; }
.bc-textarea { min-height: 110px; resize: vertical; }
.bc-input:focus, .bc-textarea:focus, .bc-select:focus { outline: 2px solid rgba(99,91,255,.16); border-color: var(--bc-primary); }
.bc-help { color: var(--bc-muted); font-size: 12px; }

.bc-login { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: radial-gradient(circle at top left, rgba(99,91,255,.18), transparent 35%), var(--bc-bg); }
.bc-login-card { width: min(460px, 100%); background: white; border: 1px solid var(--bc-border); border-radius: 22px; box-shadow: var(--bc-shadow); padding: 28px; }

.bc-alert { border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; border: 1px solid var(--bc-border); background: #fff; }
.bc-alert.success { background: rgba(52,199,89,.13); border-color: rgba(52,199,89,.25); color: #0b6f2a; }
.bc-alert.error { background: rgba(255,77,79,.1); border-color: rgba(255,77,79,.25); color: #a7282a; }
.bc-alert.info { background: var(--bc-panel-soft); color: var(--bc-primary); }

.bc-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--bc-border); margin-bottom: 18px; }
.bc-tabs a { padding: 12px 14px; color: var(--bc-muted); font-weight: 800; text-decoration: none; border-bottom: 2px solid transparent; }
.bc-tabs a.active { color: var(--bc-primary); border-bottom-color: var(--bc-primary); }

.bc-meter { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--bc-good) calc(var(--score) * 1%), #edf0f8 0); position: relative; font-weight: 900; }
.bc-meter:before { content: ''; position: absolute; inset: 7px; background: white; border-radius: 50%; }
.bc-meter span { position: relative; z-index: 1; }
.bc-timeline { display: grid; gap: 0; }
.bc-timeline-item { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 0 0 18px; }
.bc-timeline-line { width: 2px; background: var(--bc-border); margin: 9px auto 0; min-height: 34px; }
.bc-timeline-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--bc-muted); }
.bc-code { background: #101225; color: #f6f7ff; border-radius: 12px; padding: 14px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.bc-kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bc-panel-soft); padding: 2px 6px; border-radius: 6px; }

@media (max-width: 960px) {
    .bc-layout { grid-template-columns: 1fr; }
    .bc-sidebar { position: relative; height: auto; }
    .bc-grid.cols-2, .bc-grid.cols-3, .bc-grid.cols-4 { grid-template-columns: 1fr; }
    .bc-topbar { position: relative; padding: 0 16px; }
    .bc-content { padding: 20px 16px 50px; }
    .bc-table { display: block; overflow-x: auto; }
}

@media print {
    .bc-sidebar, .bc-topbar, .bc-actions, .bc-tabs, .bc-btn { display: none !important; }
    .bc-layout { display: block; }
    .bc-content { padding: 0; max-width: none; }
    .bc-card, .bc-table { box-shadow: none; }
}


/* v0.1.10 logo guard: prevents natural-size PNG rendering when older CSS is cached or selector order changes. */
.bc-sidebar > .bc-brand > img,
.bc-login-card .bc-brand > img {
    width: 34px !important;
    height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
}
.bc-login-card .bc-brand.bc-brand-full > img {
    width: 44px !important;
    height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
}
