:root {
    --bcms-bg: #f5f7fb;
    --bcms-sidebar-bg: #101828;
    --bcms-sidebar-fg: #cbd5e1;
    --bcms-sidebar-active: #2563eb;
    --bcms-border: #e5e7eb;
    --bcms-primary: #2563eb;
}

html, body {
    height: 100%;
    background-color: var(--bcms-bg);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Pretendard, "Noto Sans KR", Roboto, sans-serif;
}

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

.bcms-sidebar {
    width: 240px;
    flex-shrink: 0;
    background-color: var(--bcms-sidebar-bg);
    color: var(--bcms-sidebar-fg);
    min-height: 100vh;
    padding: 1rem 0;
}

.bcms-sidebar .brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 0.5rem 1.25rem 1.25rem;
    display: block;
    text-decoration: none;
}

.bcms-sidebar .nav-link {
    color: var(--bcms-sidebar-fg);
    padding: 0.6rem 1.25rem;
    border-left: 3px solid transparent;
    border-radius: 0;
}

.bcms-sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.06);
}

.bcms-sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(37, 99, 235, 0.25);
    border-left-color: var(--bcms-sidebar-active);
}

.bcms-sidebar .nav-section-label {
    color: #64748b;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem 0.25rem;
}

.bcms-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.bcms-topbar {
    background-color: #fff;
    border-bottom: 1px solid var(--bcms-border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.bcms-content {
    padding: 1.5rem;
    flex: 1;
}

/*
 * 카드는 기본적으로 자기 내용만큼만 높이를 차지한다(height: auto).
 * Dashboard 처럼 같은 .row 안에서 형제 카드와 높이를 맞춰야 할 때만
 * Bootstrap 유틸리티 class="h-100" 을 추가로 붙인다(예: class="bcms-card h-100").
 * 예전에는 이 class 자체에 height:100% 이 박혀 있었는데, .row/.col 그리드 밖에서
 * 단독으로 쓰인 카드(상세/수정 폼 등)까지 부모 높이(사실상 뷰포트 높이)를 꽉 채우도록
 * 강제되면서 카드 하단 요소들이 화면 아래로 크게 밀려나는 공통 레이아웃 버그의 원인이었다.
 */
.bcms-card {
    background: #fff;
    border: 1px solid var(--bcms-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.bcms-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.bcms-stat-label {
    color: #6b7280;
    font-size: 0.85rem;
}

.table-responsive {
    background: #fff;
    border: 1px solid var(--bcms-border);
    border-radius: 0.75rem;
}

.table > :not(caption) > * > * {
    vertical-align: middle;
}

.bcms-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.bcms-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #0f172a, #1e3a8a 60%, #2563eb);
}

.bcms-auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 1rem;
    padding: 2.25rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
}

@media (max-width: 768px) {
    .bcms-sidebar {
        position: fixed;
        z-index: 1040;
        transform: translateX(-100%);
        transition: transform 0.2s ease-in-out;
    }
    .bcms-sidebar.show {
        transform: translateX(0);
    }
    .bcms-content {
        padding: 1rem;
    }
}
