:root {
    --bt-radius: 1.25rem;
    --bt-border: 1px solid rgba(148, 163, 184, 0.35);
    --bt-bg: #f8fafc;
    --bt-text-muted: #64748b;
    --bt-chip-bg: #eef2ff;
    --bt-chip-color: #3730a3;
}

.bt-library-page {
    font-family: 'Inter', 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0f172a;
}

.bt-hero {
    background: linear-gradient(135deg, #fdf2ff 0%, #eff6ff 50%, #e0f2fe 100%);
    border-radius: var(--bt-radius);
    padding: 2.5rem;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border: var(--bt-border);
}

.bt-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at top right, rgba(13, 110, 253, 0.12), transparent 55%);
    pointer-events: none;
}

.bt-hero__content {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.bt-hero__trail {
    display: flex;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--bt-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.bt-hero__trail span::after {
    content: '›';
    margin: 0 0.35rem;
    color: rgba(15, 23, 42, 0.35);
}

.bt-hero__trail span:last-child::after {
    display: none;
}

.bt-hero__lead {
    font-size: 1.05rem;
    color: #0f172a;
    max-width: 640px;
}

.bt-hero__cta {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.bt-hero__badge {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    min-width: 180px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.1);
    align-self: flex-start;
}

.bt-hero__badge-label {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--bt-text-muted);
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

.bt-hero__badge strong {
    display: block;
    font-size: 2.25rem;
    color: #0d6efd;
    line-height: 1.1;
}

.bt-stats .bt-stat-card {
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    border: var(--bt-border);
    background-color: #fff;
    height: 100%;
}

.bt-stat-card__label {
    font-size: 0.9rem;
    color: var(--bt-text-muted);
    margin-bottom: 0.25rem;
}

.bt-stat-card__value {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.bt-stat-card__hint {
    font-size: 0.9rem;
    color: var(--bt-text-muted);
}

.bt-stat-card--primary {
    border-color: rgba(37, 99, 235, 0.25);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), #fff);
}

.bt-stat-card--info {
    border-color: rgba(14, 165, 233, 0.25);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), #fff);
}

.bt-stat-card--secondary {
    border-color: rgba(100, 116, 139, 0.25);
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.15), #fff);
}

.bt-toolbar .bt-search {
    position: relative;
}

.bt-search__icon {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    transform: translateY(-50%);
    color: var(--bt-text-muted);
    font-size: 1.2rem;
    z-index: 1;
}

.bt-search input {
    padding-left: 2.5rem;
}

.bt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.bt-chip {
    border: 0;
    background: var(--bt-chip-bg);
    color: var(--bt-chip-color);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.bt-chip:hover,
.bt-chip.is-active {
    background: #3730a3;
    color: #fff;
}

.bt-section {
    margin-bottom: 2.5rem;
}

.bt-section__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.bt-section__eyebrow {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--bt-text-muted);
    margin-bottom: 0.25rem;
}

.bt-section__count {
    font-weight: 600;
    color: #0d6efd;
}

.bt-grade-card {
    border-radius: 1.25rem;
    border: var(--bt-border);
    padding: 1.5rem;
    background-color: #fff;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.bt-grade-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    cursor: pointer;
}

.bt-grade-card__eyebrow {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--bt-text-muted);
    margin-bottom: 0.25rem;
}

.bt-grade-card__hint {
    color: var(--bt-text-muted);
    margin-bottom: 0;
}

.bt-grade-card__meta {
    text-align: right;
}

.bt-grade-card__count {
    font-weight: 600;
    color: #0d9488;
    display: block;
}

.bt-grade-card__anchor {
    font-size: 0.85rem;
}

.bt-grade-card[data-bt-collapsed="true"] .table-responsive {
    display: none;
}

.bt-grade-card[data-bt-collapsed="true"] {
    background-color: #f8fafc;
}

.bt-table thead th {
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--bt-text-muted);
    border-bottom-width: 1px;
}

.bt-col-num {
    width: 50px;
}

.bt-book-title {
    font-weight: 600;
}

.bt-btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.bt-btn-icon__svg {
    display: inline-flex;
}

.bt-empty-state {
    border-radius: 1rem;
}

@media only screen and (max-width: 991px) {
    .bt-hero {
        flex-direction: column;
        padding: 2rem;
    }

    .bt-grade-card__header {
        flex-direction: column;
    }

    .bt-grade-card__meta {
        text-align: left;
    }
}

@media only screen and (max-width: 768px) {
    .bt-hero {
        padding: 1.75rem;
    }

    .bt-hero__lead {
        font-size: 0.95rem;
    }

    .bt-toolbar .row > div {
        width: 100%;
    }

    .bt-chip {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }

    .bt-grade-card {
        padding: 1.1rem;
    }

    .bt-table {
        font-size: 0.9rem;
    }
}

@media only screen and (max-width: 480px) {
    .bt-hero {
        padding: 1.25rem;
    }

    .bt-hero__cta {
        flex-direction: column;
    }

    .bt-chip {
        width: 100%;
        text-align: center;
    }
}

/* Back Button Navbar */
.btn-back-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: #667eea;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.btn-back-nav:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #5568d3;
}

.btn-back-nav:active {
    transform: scale(0.95);
}

.btn-back-nav svg {
    width: 24px;
    height: 24px;
}

.navbar-nav-left {
    padding-left: 1rem;
}

@media only screen and (max-width: 768px) {
    .btn-back-nav {
        width: 44px;
        height: 44px;
    }
    
    .btn-back-nav svg {
        width: 22px;
        height: 22px;
    }
    
    .navbar-nav-left {
        padding-left: 0.75rem;
    }
}

@media only screen and (max-width: 480px) {
    .btn-back-nav {
        width: 40px;
        height: 40px;
    }
    
    .btn-back-nav svg {
        width: 20px;
        height: 20px;
    }
}


