:root {
    --tb-primary: #4f46e5;
    --tb-primary-dark: #3730a3;
    --tb-bg: #f8fafc;
}

body {
    background-color: var(--tb-bg);
}

.tb-navbar {
    background-color: #111827;
}

.tb-navbar .navbar-brand {
    color: #fff;
    font-weight: 700;
    letter-spacing: .02em;
}

.tb-navbar .nav-link {
    color: #d1d5db;
}

.tb-navbar .nav-link.active,
.tb-navbar .nav-link:hover {
    color: #fff;
}

/* v13.1：メニュー項目が増えたため、lg以上の画面幅では上部の横並びナビゲーションではなく左固定のサイドバーにする。
   lg未満（タブレット・スマホ）は従来通り上部バー＋ハンバーガーで展開する縦積みメニューのまま。 */
.tb-nav-section-label {
    color: #6b7280;
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 16px 12px 4px;
}

@media (min-width: 992px) {
    /* tb-navbar自体をflexコンテナ兼スクロールコンテナにする。position:fixedでtop/bottomを両方指定しているため
       高さは自明（ビューポート一杯）で、子孫のパーセンテージ計算に頼らずに済む。
       container-fluidと#tbNavbar（.collapse）はdisplay:contentsでレイアウトから外し、
       中身（ブランド行・メニュー・下部のユーザー行）を直接tb-navbarのflexアイテムにする。 */
    .tb-navbar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 224px;
        overflow-y: auto;
        z-index: 1030;
        display: flex;
        flex-direction: column;
        padding: 20px 14px;
        /* サイドバーの縦スクロールは必要に応じて効かせるが、スクロールバー自体は表示しない */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .tb-navbar::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    /* Bootstrapの .navbar-expand-lg .navbar-collapse{display:flex!important} が優先されてしまうため、
       !importantで確実にdisplay:contentsを効かせる（中の2つのulをtb-navbar直下のflexアイテムにする） */
    .tb-navbar .container-fluid,
    .tb-navbar .collapse {
        display: contents !important;
    }

    .tb-navbar-topline {
        margin-bottom: 20px;
        flex-shrink: 0;
    }

    .tb-navbar .navbar-toggler {
        display: none;
    }

    .tb-navbar .navbar-nav {
        flex-direction: column;
        flex-shrink: 0;
    }

    .tb-navbar .navbar-nav.me-auto {
        margin-right: 0 !important;
    }

    .tb-navbar .nav-link {
        padding: 8px 12px;
        border-radius: 8px;
    }

    .tb-navbar .nav-link:hover {
        background-color: rgba(255, 255, 255, .08);
    }

    .tb-navbar-bottom {
        margin-top: auto;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, .1);
        gap: 8px;
    }

    .tb-navbar-user {
        padding: 4px 12px;
    }

    .sk-content {
        margin-left: 224px;
    }
}

.sk-content {
    padding: 24px;
}

.sk-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}

.tb-badge {
    display: inline-block;
    padding: .25em .65em;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.tb-thread-item {
    border-left: 2px solid #e5e7eb;
    padding: 4px 0 16px 20px;
    position: relative;
}

.tb-thread-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tb-primary);
}

.tb-login-card {
    max-width: 400px;
    margin: 80px auto;
}

.tb-stat-tile {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

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

.tb-stat-tile .tb-stat-label {
    font-size: .8125rem;
    color: #6b7280;
}
