/**
 * gitwriter Main Stylesheet
 *
 * Base styles, CSS variables, and utility classes.
 * Extends Bootstrap 5 with custom components.
 */

/* =============================================================================
   CSS Custom Properties (Variables)
   ============================================================================= */

:root {
    /* Brand Colors */
    --bf-primary: #2563eb;
    --bf-primary-dark: #1d4ed8;
    --bf-secondary: #0ea5e9;
    --bf-accent: #e8590c;
    --bf-gradient: linear-gradient(135deg, var(--bf-primary) 0%, var(--bf-secondary) 100%);

    /* Status Colors */
    --bf-success: #28a745;
    --bf-warning: #ffc107;
    --bf-danger: #dc3545;
    --bf-info: #17a2b8;

    /* Neutral Colors */
    --bf-gray-50: #fafafa;
    --bf-gray-100: #f8f9fa;
    --bf-gray-200: #e9ecef;
    --bf-gray-300: #dee2e6;
    --bf-gray-400: #ced4da;
    --bf-gray-500: #adb5bd;
    --bf-gray-600: #6c757d;
    --bf-gray-700: #495057;
    --bf-gray-800: #343a40;
    --bf-gray-900: #212529;

    /* Layout */
    --bf-sidebar-width: 260px;
    --bf-sidebar-collapsed-width: 60px;
    --bf-navbar-height: 52px;
    --bf-subnav-height: 42px;
    --bf-header-height: calc(var(--bf-navbar-height) + var(--bf-subnav-height));
    --bf-footer-height: 48px;

    /* Typography */
    --bf-font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bf-font-mono: "JetBrains Mono", "Fira Code", Monaco, Menlo, Consolas, monospace;

    /* Shadows */
    --bf-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --bf-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --bf-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --bf-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Border Radius */
    --bf-radius-sm: 2px;
    --bf-radius: 2px;
    --bf-radius-lg: 2px;
    --bf-radius-xl: 2px;
    --radius-sm: 2px;
    --radius-md: 2px;
    --radius-lg: 2px;

    /* Transitions */
    --bf-transition-fast: 150ms ease;
    --bf-transition: 200ms ease;
    --bf-transition-slow: 300ms ease;

    /* Z-Index Scale */
    --bf-z-dropdown: 1000;
    --bf-z-sticky: 1020;
    --bf-z-fixed: 1030;
    --bf-z-modal-backdrop: 1040;
    --bf-z-modal: 1050;
    --bf-z-popover: 1060;
    --bf-z-tooltip: 1070;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bf-gray-50: #111111;
    --bf-gray-100: #1a1a2e;
    --bf-gray-200: #16213e;
    --bf-gray-300: #0f3460;
    --bf-gray-400: #495057;
    --bf-gray-500: #6c757d;
    --bf-gray-600: #adb5bd;
    --bf-gray-700: #dee2e6;
    --bf-gray-800: #e9ecef;
    --bf-gray-900: #f8f9fa;
}

/* =============================================================================
   Base Styles
   ============================================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--bf-font-sans);
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--bf-gray-900);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main content area with fixed header */
.main-content {
    padding-top: var(--bf-header-height);
    min-height: 100vh;
}

/* =============================================================================
   New Navbar (Acme/Mintlify Style)
   ============================================================================= */

.bf-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--bf-z-fixed);
    background: #ffffff;
    border-bottom: 1px solid var(--bf-gray-200);
}

.bf-navbar-inner {
    display: flex;
    align-items: center;
    height: var(--bf-navbar-height);
    padding: 0 1.25rem;
    gap: 1rem;
}

/* Brand */
.bf-navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--bf-gray-900);
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.bf-navbar-brand:hover {
    color: var(--bf-gray-900);
    text-decoration: none;
}

.bf-navbar-brand svg {
    color: var(--bf-gray-900);
}

/* Center Search */
.bf-navbar-search {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 420px;
    margin: 0 auto;
    background: var(--bf-gray-100);
    border: 1px solid var(--bf-gray-200);
    border-radius: 2px;
    padding: 0 0.75rem;
    height: 34px;
    cursor: text;
    transition: border-color var(--bf-transition-fast), box-shadow var(--bf-transition-fast);
}

.bf-navbar-search:focus-within {
    border-color: var(--bf-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
    background: #ffffff;
}

.bf-search-icon {
    color: var(--bf-gray-500);
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.bf-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.8125rem;
    color: var(--bf-gray-700);
    padding: 0;
    min-width: 0;
}

.bf-search-input::placeholder {
    color: var(--bf-gray-500);
}

.bf-search-shortcut {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.bf-search-shortcut kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    font-size: 0.6875rem;
    font-family: var(--bf-font-sans);
    color: var(--bf-gray-500);
    background: #ffffff;
    border: 1px solid var(--bf-gray-300);
    border-radius: 2px;
    box-shadow: 0 1px 0 var(--bf-gray-200);
}

/* Navbar Actions */
.bf-navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.bf-navbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--bf-gray-600);
    padding: 0.375rem;
    border-radius: 2px;
    cursor: pointer;
    transition: color var(--bf-transition-fast), background var(--bf-transition-fast);
    gap: 0.375rem;
    font-size: 0.8125rem;
}

.bf-navbar-btn:hover {
    color: var(--bf-gray-900);
    background: var(--bf-gray-100);
}

/* Context switch dropdown menu (superadmin) */
.context-switch-menu {
    min-width: 260px;
}

.bf-user-btn {
    padding: 0.25rem 0.5rem;
}

.bf-avatar {
    width: 28px;
    height: 28px;
    border-radius: 2px;
    background: var(--bf-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 600;
}

.bf-user-name {
    font-size: 0.8125rem;
    color: var(--bf-gray-700);
    font-weight: 500;
}

/* =============================================================================
   Sub Navigation Tabs
   ============================================================================= */

.bf-subnav {
    background: #ffffff;
    border-bottom: 1px solid var(--bf-gray-200);
    height: var(--bf-subnav-height);
}

.bf-subnav-inner {
    display: flex;
    align-items: stretch;
    height: 100%;
    padding: 0 1.25rem;
    gap: 0.25rem;
}

.bf-subnav-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--bf-gray-600);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color var(--bf-transition-fast), border-color var(--bf-transition-fast);
    white-space: nowrap;
}

.bf-subnav-tab:hover {
    color: var(--bf-gray-900);
    text-decoration: none;
}

.bf-subnav-tab.active {
    color: var(--bf-accent);
    border-bottom-color: var(--bf-accent);
}

/* Sub Nav Icon Badges */
.bf-subnav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 2px;
}

.bf-subnav-icon-books {
    background: #fee2e2;
    color: #dc2626;
}

.bf-subnav-icon-admin {
    background: #dbeafe;
    color: #2563eb;
}

.bf-subnav-icon svg {
    width: 12px;
    height: 12px;
}

/* =============================================================================
   Doc-Style Sidebar
   ============================================================================= */

.bf-doc-layout {
    display: flex;
    min-height: calc(100vh - var(--bf-header-height));
}

.bf-doc-sidebar {
    position: fixed;
    top: var(--bf-header-height);
    left: 0;
    bottom: 0;
    width: var(--bf-sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--bf-gray-200);
    overflow-y: auto;
    z-index: var(--bf-z-sticky);
    padding: 1.25rem 0;
}

.bf-doc-sidebar::-webkit-scrollbar {
    width: 4px;
}

.bf-doc-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.bf-doc-sidebar::-webkit-scrollbar-thumb {
    background: var(--bf-gray-300);
    border-radius: 2px;
}

/* Sidebar Section */
.bf-sidebar-section {
    margin-bottom: 1.25rem;
}

.bf-sidebar-heading {
    display: block;
    padding: 0.25rem 1.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bf-gray-500);
    margin-bottom: 0.25rem;
}

/* Sidebar Nav Items */
.bf-sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bf-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.4375rem 1.25rem;
    font-size: 0.8125rem;
    color: var(--bf-gray-700);
    text-decoration: none;
    transition: color var(--bf-transition-fast), background var(--bf-transition-fast);
    line-height: 1.4;
}

.bf-sidebar-link:hover {
    color: var(--bf-gray-900);
    background: var(--bf-gray-50);
    text-decoration: none;
}

.bf-sidebar-link.active {
    color: var(--bf-accent);
    font-weight: 600;
}

.bf-sidebar-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--bf-gray-500);
}

.bf-sidebar-link.active .bf-sidebar-link-icon {
    color: var(--bf-accent);
}

.bf-sidebar-link-icon svg {
    width: 16px;
    height: 16px;
}

/* Sidebar expandable groups */
.bf-sidebar-group-toggle {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.4375rem 1.25rem;
    font-size: 0.8125rem;
    color: var(--bf-gray-700);
    background: transparent;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--bf-transition-fast), background var(--bf-transition-fast);
    text-align: left;
    line-height: 1.4;
}

.bf-sidebar-group-toggle:hover {
    color: var(--bf-gray-900);
    background: var(--bf-gray-50);
}

.bf-sidebar-group-toggle .bf-chevron {
    margin-left: auto;
    color: var(--bf-gray-400);
    transition: transform var(--bf-transition-fast);
}

.bf-sidebar-group-toggle[aria-expanded="true"] .bf-chevron {
    transform: rotate(90deg);
}

.bf-sidebar-sublist {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1rem;
}

.bf-sidebar-sublist .bf-sidebar-link {
    padding-left: 2.25rem;
    font-size: 0.8125rem;
}

/* Doc main content */
.bf-doc-main {
    flex: 1;
    margin-left: var(--bf-sidebar-width);
    min-width: 0;
}

.bf-doc-content {
    padding: 2rem 2.5rem;
}

/* =============================================================================
   Typography
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

.text-gradient {
    background: var(--bf-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.font-mono {
    font-family: var(--bf-font-mono);
}

/* =============================================================================
   Links
   ============================================================================= */

a {
    color: var(--bf-primary);
    text-decoration: none;
    transition: color var(--bf-transition-fast);
}

a:hover {
    color: var(--bf-primary-dark);
    text-decoration: underline;
}

/* =============================================================================
   Buttons (extend Bootstrap)
   ============================================================================= */

.btn-gradient {
    background: var(--bf-gradient);
    border: none;
    color: white;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, var(--bf-primary-dark) 0%, #6a4190 100%);
    color: white;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--bf-radius);
}

.btn-icon-sm {
    width: 28px;
    height: 28px;
}

.btn-icon-lg {
    width: 44px;
    height: 44px;
}

/* =============================================================================
   Cards (extend Bootstrap)
   ============================================================================= */

.card {
    border: 1px solid var(--bf-gray-200);
    border-radius: var(--bf-radius-lg);
    box-shadow: none;
    transition: box-shadow var(--bf-transition);
}

.card:hover {
    box-shadow: var(--bf-shadow-sm);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--bf-gray-200);
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* Book Cards */
.book-card {
    position: relative;
    overflow: hidden;
}

.book-card .book-cover {
    height: 160px;
    background: var(--bf-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.book-card .book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-card .book-info {
    padding: 1rem;
}

.book-card .book-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-card .book-description {
    font-size: 0.875rem;
    color: var(--bf-gray-600);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-card .book-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--bf-gray-500);
    margin-top: 0.75rem;
}

/* =============================================================================
   Badges (extend Bootstrap)
   ============================================================================= */

.badge-status {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25em 0.6em;
    border-radius: 2px;
}

.badge-draft {
    background-color: var(--bf-gray-500);
    color: white;
}

.badge-published {
    background-color: var(--bf-success);
    color: white;
}

.badge-archived {
    background-color: var(--bf-gray-400);
    color: var(--bf-gray-700);
}

/* =============================================================================
   Forms (extend Bootstrap)
   ============================================================================= */

.form-control,
.form-select {
    border-radius: var(--bf-radius);
    border-color: var(--bf-gray-300);
    transition: border-color var(--bf-transition-fast), box-shadow var(--bf-transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bf-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
}

/* =============================================================================
   Tables (extend Bootstrap)
   ============================================================================= */

.table {
    --bs-table-bg: transparent;
}

.table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bf-gray-600);
    border-bottom-width: 1px;
}

.table tbody td {
    vertical-align: middle;
    padding: 0.75rem;
}

/* =============================================================================
   Avatars
   ============================================================================= */

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    background-color: var(--bf-primary);
    color: white;
    font-weight: 600;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.avatar-md {
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
}

.avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

.avatar-xl {
    width: 64px;
    height: 64px;
    font-size: 1.25rem;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 2px;
    object-fit: cover;
}

/* =============================================================================
   Empty States
   ============================================================================= */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--bf-gray-400);
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bf-gray-700);
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: var(--bf-gray-500);
    margin-bottom: 1.5rem;
}

/* =============================================================================
   Loading States
   ============================================================================= */

.skeleton {
    background: linear-gradient(90deg, var(--bf-gray-200) 25%, var(--bf-gray-100) 50%, var(--bf-gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--bf-radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-title {
    height: 1.5em;
    width: 70%;
    margin-bottom: 0.75em;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 2px;
}

/* =============================================================================
   Legacy Sidebar (kept for backwards compat)
   ============================================================================= */

.sidebar {
    position: fixed;
    top: var(--bf-header-height);
    left: 0;
    bottom: 0;
    width: var(--bf-sidebar-width);
    background-color: white;
    border-right: 1px solid var(--bf-gray-200);
    overflow-y: auto;
    z-index: var(--bf-z-sticky);
    transition: width var(--bf-transition);
}

.sidebar-collapsed {
    width: var(--bf-sidebar-collapsed-width);
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    color: var(--bf-gray-700);
    border-left: 3px solid transparent;
    transition: all var(--bf-transition-fast);
}

.sidebar-nav-item:hover {
    background-color: var(--bf-gray-100);
    color: var(--bf-primary);
    text-decoration: none;
}

.sidebar-nav-item.active {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--bf-primary);
    border-left-color: var(--bf-primary);
}

.sidebar-nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.sidebar-nav-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Content with sidebar */
.content-with-sidebar {
    margin-left: var(--bf-sidebar-width);
    transition: margin-left var(--bf-transition);
}

.content-with-sidebar.sidebar-collapsed {
    margin-left: var(--bf-sidebar-collapsed-width);
}

/* =============================================================================
   Notification Dropdown
   ============================================================================= */

.notification-item.client-notification {
    border-left: 3px solid transparent;
}

.notification-item.notification-type-success {
    border-left-color: var(--bf-success);
}

.notification-item.notification-type-error {
    border-left-color: var(--bf-danger);
}

.notification-item.notification-type-warning {
    border-left-color: var(--bf-warning);
}

.notification-item.notification-type-info {
    border-left-color: var(--bf-info);
}

.notification-item .dropdown-item:hover {
    background-color: var(--bf-gray-50);
}

@keyframes notification-slide-in {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        max-height: 120px;
        transform: translateY(0);
    }
}

.notification-item.client-notification {
    animation: notification-slide-in 200ms ease forwards;
}

/* =============================================================================
   Utility Classes
   ============================================================================= */

/* Spacing */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 3rem; }

/* Text truncation */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-grab { cursor: grab; }
.cursor-grabbing { cursor: grabbing; }

/* Transitions */
.transition-none { transition: none !important; }
.transition-fast { transition: all var(--bf-transition-fast); }
.transition { transition: all var(--bf-transition); }
.transition-slow { transition: all var(--bf-transition-slow); }

/* Hover effects */
.hover-lift {
    transition: transform var(--bf-transition);
}

.hover-lift:hover {
    transform: translateY(-2px);
}

.hover-scale {
    transition: transform var(--bf-transition);
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* =============================================================================
   Responsive Utilities
   ============================================================================= */

@media (max-width: 991.98px) {
    .bf-doc-sidebar {
        transform: translateX(-100%);
        transition: transform var(--bf-transition);
    }

    .bf-doc-sidebar.show {
        transform: translateX(0);
        box-shadow: var(--bf-shadow-lg);
    }

    .bf-doc-main {
        margin-left: 0;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .content-with-sidebar {
        margin-left: 0;
    }

    .bf-navbar-search {
        max-width: 280px;
    }

    .bf-search-shortcut {
        display: none;
    }
}

@media (max-width: 767.98px) {
    :root {
        --bf-sidebar-width: 100%;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .bf-navbar-search {
        display: none;
    }

    .bf-doc-content {
        padding: 1.5rem 1rem;
    }
}

/* =============================================================================
   Print Styles
   ============================================================================= */

@media print {
    .bf-doc-sidebar,
    .bf-navbar,
    .sidebar,
    .navbar,
    .btn {
        display: none !important;
    }

    .bf-doc-main,
    .content-with-sidebar {
        margin-left: 0 !important;
    }

    .main-content {
        padding-top: 0 !important;
    }

    body {
        background: white !important;
    }
}

/* =============================================================================
   Inline Style Replacements
   ============================================================================= */

.notification-dropdown {
    width: 360px;
    max-height: 420px;
    overflow-y: auto;
    padding-bottom: 0;
}

.notification-dropdown::-webkit-scrollbar {
    width: 4px;
}

.notification-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.notification-dropdown::-webkit-scrollbar-thumb {
    background: var(--bf-gray-300);
    border-radius: 2px;
}

.notification-dropdown .dropdown-header {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 1;
}

.notification-dropdown .dropdown-divider {
    position: sticky;
    top: 37px;
    background: #ffffff;
    z-index: 1;
    margin: 0;
}

.spinner-lg {
    width: 3rem;
    height: 3rem;
}

.progress-thin {
    height: 8px;
}

/* ============================================================
   Inline-style migration: shared fragments (header, sidebar,
   modals, branding/auth cards). Elements toggled by JS now use
   the .d-none class (see auth.js/branding.js/context.js).
   ============================================================ */
.bf-brand-logo        { height: 24px; width: auto; }
.bf-brand-logo-lg     { height: 32px; width: auto; }
.bf-brand-logo-inline { height: 1.6em; width: auto; vertical-align: middle; }
.brand-preview-logo   { height: 32px; width: auto; }
.brand-preview-favicon { height: 24px; width: 24px; }

/* Sidebar footer section pinned to the bottom */
.bf-sidebar-section-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--bf-gray-200);
}

/* Context-switch modal live output */
.bf-restore-log {
    max-height: 180px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 0.78rem;
}

/* Dashed upload dropzones (restore / import) */
.bf-dropzone {
    cursor: pointer;
    border-color: #dee2e6 !important;
}
