:root {
    --bc-bg: #f4f5fa;
    --bc-surface: #ffffff;
    --bc-border: #e4e6f0;
    --bc-text: #1d1e2c;
    --bc-text-muted: #6b7089;
    --bc-brand: #4f46e5;
    --bc-brand-dark: #4338ca;
    --bc-brand-soft: #eef0fe;
    --bc-success: #16a34a;
    --bc-success-soft: #e8f8ef;
    --bc-warning: #b45309;
    --bc-warning-soft: #fef3e0;
    --bc-neutral-soft: #eef0f5;
    --bc-danger: #dc2626;
    --bc-radius: 10px;
    --bc-shadow: 0 1px 2px rgba(20, 21, 40, .04), 0 4px 16px rgba(20, 21, 40, .06);
}

body {
    background: var(--bc-bg);
    color: var(--bc-text);
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Shell: sidebar + content ---- */

.bc-shell {
    display: flex;
    min-height: 100vh;
}

.bc-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #16172b;
    color: #cfd1e6;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.bc-sidebar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    padding: .25rem .5rem 1.25rem;
}

.bc-sidebar-brand .bc-logo-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--bc-brand);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .25);
}

.bc-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.bc-nav a {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: #b7b9d6;
    text-decoration: none;
    padding: .55rem .7rem;
    border-radius: 8px;
    font-size: .92rem;
    font-weight: 500;
    transition: background .12s ease, color .12s ease;
}

.bc-nav a:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.bc-nav a.active {
    background: var(--bc-brand);
    color: #fff;
}

.bc-nav-heading {
    font-size: .68rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6a6d94;
    padding: .9rem .7rem .3rem;
}

.bc-sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.bc-sidebar-user {
    font-size: .82rem;
    color: #8d90b3;
    padding: 0 .5rem .6rem;
    word-break: break-all;
}

.bc-sidebar-footer form button {
    width: 100%;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    color: #cfd1e6;
    border-radius: 8px;
    padding: .5rem .7rem;
    font-size: .85rem;
    text-align: left;
}

.bc-sidebar-footer form button:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.bc-content {
    flex: 1;
    min-width: 0;
    padding: 1.75rem 2rem 3rem;
}

.bc-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.bc-page-head h1 {
    font-size: 1.4rem;
    font-weight: 650;
    margin: 0 0 .2rem;
}

.bc-page-head p {
    color: var(--bc-text-muted);
    margin: 0;
    font-size: .9rem;
}

/* ---- Buttons ---- */

.bc-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border-radius: 8px;
    font-weight: 550;
    font-size: .88rem;
    padding: .5rem 1rem;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
}

.bc-btn-primary {
    background: var(--bc-brand);
    color: #fff;
}

.bc-btn-primary:hover {
    background: var(--bc-brand-dark);
    color: #fff;
}

.bc-btn-ghost {
    background: transparent;
    border-color: var(--bc-border);
    color: var(--bc-text);
}

.bc-btn-ghost:hover {
    background: var(--bc-neutral-soft);
}

.bc-btn-sm {
    padding: .3rem .65rem;
    font-size: .78rem;
    border-radius: 6px;
}

.bc-btn-danger-outline {
    background: transparent;
    border-color: #f3c9c9;
    color: var(--bc-danger);
}

.bc-btn-danger-outline:hover {
    background: #fdeded;
}

.bc-btn-success-outline {
    background: transparent;
    border-color: #bfe6cd;
    color: var(--bc-success);
}

.bc-btn-success-outline:hover {
    background: var(--bc-success-soft);
}

/* ---- Cards ---- */

.bc-card {
    background: var(--bc-surface);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow);
}

.bc-card-body {
    padding: 1.15rem 1.25rem;
}

.bc-card-title {
    font-size: .82rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--bc-text-muted);
    margin-bottom: .85rem;
}

/* ---- Filters / toolbar ---- */

.bc-toolbar {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin-bottom: 1.1rem;
}

.bc-toolbar select {
    border: 1px solid var(--bc-border);
    border-radius: 8px;
    padding: .45rem .7rem;
    font-size: .85rem;
    background: var(--bc-surface);
    min-width: 160px;
}

/* ---- Table ---- */

.bc-table-card {
    background: var(--bc-surface);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow);
    overflow: hidden;
}

table.bc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.bc-table thead th {
    background: #fafafd;
    text-align: left;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--bc-text-muted);
    font-weight: 650;
    padding: .75rem 1.1rem;
    border-bottom: 1px solid var(--bc-border);
}

.bc-table tbody td {
    padding: .8rem 1.1rem;
    border-bottom: 1px solid var(--bc-border);
    font-size: .9rem;
    vertical-align: middle;
}

.bc-table tbody tr:last-child td {
    border-bottom: none;
}

.bc-table tbody tr:hover {
    background: #fafafd;
}

.bc-title-link {
    color: var(--bc-text);
    font-weight: 550;
    text-decoration: none;
}

.bc-title-link:hover {
    color: var(--bc-brand);
}

.bc-muted {
    color: var(--bc-text-muted);
}

.bc-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--bc-text-muted);
}

/* ---- Badges ---- */

.bc-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .74rem;
    font-weight: 650;
    padding: .22rem .6rem;
    border-radius: 999px;
}

.bc-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.bc-badge-draft {
    background: var(--bc-neutral-soft);
    color: var(--bc-text-muted);
}

.bc-badge-published {
    background: var(--bc-success-soft);
    color: var(--bc-success);
}

.bc-badge-scheduled {
    background: var(--bc-warning-soft);
    color: var(--bc-warning);
}

/* ---- Forms (Edit page) ---- */

.bc-form-label {
    font-size: .84rem;
    font-weight: 600;
    margin-bottom: .3rem;
    display: block;
}

.bc-form-hint {
    font-size: .78rem;
    color: var(--bc-text-muted);
    font-weight: 400;
}

.form-control, .form-select {
    border-radius: 8px;
    border-color: var(--bc-border);
    font-size: .9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--bc-brand);
    box-shadow: 0 0 0 3px var(--bc-brand-soft);
}

#quill-editor {
    min-height: 320px;
    background: #fff;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.ql-toolbar.ql-snow {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    background: #fafafd;
}

.ql-container.ql-snow {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.bc-faq-row {
    background: #fafafd;
    border: 1px solid var(--bc-border);
    border-radius: 8px;
    padding: .75rem;
}

.bc-checkbox-list .form-check {
    padding: .35rem 0 .35rem 1.75rem;
}

.bc-save-bar {
    position: sticky;
    bottom: 0;
    background: var(--bc-surface);
    border-top: 1px solid var(--bc-border);
    padding: .85rem 1.25rem;
    margin: 1.5rem -1.25rem -1.25rem;
    border-bottom-left-radius: var(--bc-radius);
    border-bottom-right-radius: var(--bc-radius);
    display: flex;
    justify-content: flex-end;
    gap: .6rem;
}

/* ---- Login ---- */

.bc-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #1f2140 0%, #101124 60%);
    padding: 1.5rem;
}

.bc-auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--bc-surface);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    padding: 2rem 1.9rem;
}

.bc-auth-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-weight: 650;
    font-size: 1.1rem;
}

.bc-auth-brand .bc-logo-dot {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    background: var(--bc-brand);
    box-shadow: 0 0 0 4px var(--bc-brand-soft);
}

@media (max-width: 860px) {
    .bc-shell {
        flex-direction: column;
    }

    .bc-sidebar {
        position: static;
        height: auto;
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: .75rem 1rem;
    }

    .bc-sidebar-brand {
        padding: 0;
    }

    .bc-nav {
        flex-direction: row;
        margin-left: 1rem;
        overflow-x: auto;
    }

    .bc-nav-heading {
        display: none;
    }

    .bc-sidebar-footer {
        margin-left: auto;
        margin-top: 0;
        border-top: none;
        padding-top: 0;
    }

    .bc-sidebar-user {
        display: none;
    }
}
