/* Sidebar Navigation Wrapper */
.sidebar-column {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 2px solid var(--border-color);
    background: var(--bg-secondary);
    height: 100%;
    overflow: visible !important;
    /* Indispensable pour laisser sortir le menu radial */
    position: relative;
    z-index: 100;
    /* Passe au-dessus de l'éditeur lors du déploiement */
    width: auto;
    /* Laisser le resize JS gérer la largeur */
    /* Largeur par défaut */
    min-width: 270px;
    /* Empêche de devenir trop petite */
    max-width: 800px;
    /* Sécurité pour ne pas tout envahir */
}

/* Sidebar Accordion (Activity Bar) */
.activity-bar {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-right: 1px solid var(--border-color);
    background: var(--bg-secondary);
    flex-shrink: 0;
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 101;
    overflow: visible;
}

.activity-bar.thin {
    width: 64px;
}

.activity-bar:not(.thin) {
    width: 250px;
}

.activity-bar-header {
    height: 48px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    background: var(--bg-secondary);
    user-select: none;
    flex-shrink: 0;
    transition: background 0.15s ease, padding 0.28s ease;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.activity-bar.thin .activity-bar-header {
    padding: 0 23px;
}

.activity-bar-header:hover {
    background: var(--bg-primary);
}

.activity-bar-icon {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: transform 0.28s ease;
}

.activity-bar-title {
    margin-left: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.activity-bar.thin .activity-bar-title {
    opacity: 0;
    pointer-events: none;
}

.activity-bar-content-wrapper {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Allow tooltips to escape logic moved to Javascript floating tooltips */

.activity-bar-content {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    gap: 2px;
}

.activity-bar-customization-slot {
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.activity-bar.thin .activity-bar-customization-slot {
    opacity: 0;
    pointer-events: none;
    height: 0;
    padding: 0;
    border-top: none;
}

.accordion-group {
    /*margin-bottom: 1rem;*/
}

.accordion-group-title {
    padding: 0.5rem 24px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.activity-bar.thin .accordion-group-title {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.accordion-nav-item,
.activity-bar-nav-item {
    display: flex;
    align-items: center;
    padding: 0.2rem 23px;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-left 0.2s ease;
    border-left: 2px solid transparent;
    font-size: 0.9rem;
    position: relative;
    white-space: nowrap;
}

.accordion-nav-item:hover,
.activity-bar-nav-item:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.accordion-nav-item.active,
.activity-bar-nav-item.active {
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    border-left: 2px solid var(--primary-color);
    font-weight: 500;
}

.accordion-nav-item i,
.activity-bar-nav-item i,
.accordion-nav-item svg,
.activity-bar-nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 0;
}

.nav-item-label {
    margin-left: 16px;
    transition: opacity 0.2s ease;
}

.activity-bar.thin .nav-item-label {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
}

/* Global Floating Tooltip for thin mode */
.global-floating-tooltip {
    position: fixed;
    transform: translateY(-50%) translateX(10px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    color: #f1f5f9;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: var(--font-ui, sans-serif);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 100000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.global-floating-tooltip.visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.global-floating-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: rgba(15, 23, 42, 0.95);
    pointer-events: none;
}

.activity-bar-footer {
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0;
    flex-shrink: 0;
}

/* R2 — Context menu (right-click) sur les nav items de l'accordéon */
.nav-context-menu {
    position: fixed;
    z-index: 99999;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 4px;
    min-width: 180px;
    animation: navCtxAppear 0.12s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(8px);
}

@keyframes navCtxAppear {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(-4px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.nav-ctx-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-family: var(--font-ui, sans-serif);
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease, color 0.12s ease;
}

.nav-ctx-item:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
}

.nav-ctx-item i {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.accordion-nav-item i {
    width: 18px;
    height: 18px;
}

/* Sidebar (Modified to fit in column) */
.sidebar {
    background: var(--bg-secondary);
    /* border-right moved to sidebar-column */
    border-right: none;
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    /* Force les enfants à prendre toute la largeur */
    justify-content: flex-start;
    position: relative;
    overflow: visible !important;
    /* Ne pas couper les éléments qui dépassent à droite */
    flex: 1;
    width: 100% !important;
    /* Force le contenu à suivre l'agrandissement */
    /* Take remaining space */
    min-height: 0;
    /* Important for flex scrolling */
}

/* Mobile adjustments - Sidebar as overlay, tools-sidebar hidden */
@media (max-width: 900px) {
    .sidebar-column {
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        margin-left: 0;
    }

    /* No margin needed - tools-sidebar is hidden on mobile */
    body.has-tools-sidebar .sidebar-column {
        margin-left: 0;
    }

    .sidebar {
        position: static !important;
        left: auto !important;
        width: 100% !important;
        min-width: unset !important;
        max-width: none !important;
        height: auto !important;
        z-index: auto !important;
        transition: none !important;
        display: flex !important;
        flex-shrink: 0;
    }
}

/* Vertical Tools Sidebar */
.tools-sidebar {
    background: var(--bg-secondary);
    border-right: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    width: 64px;
    flex-shrink: 0;
    overflow: hidden;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.tool-separator {
    width: 24px;
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
    opacity: 0.5;
}

.tool-btn {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tool-item:hover .tool-label {
    opacity: 1;
}

.tool-btn:hover {
    background: var(--bg-primary);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.08);
}

/* ─── Rich Tooltip for tool buttons ──────────────────────────────────────── */
/* Triggered by .tool-btn:hover, uses data-tooltip (label) + data-shortcut   */

.tool-btn::before,
.tool-btn::after {
    position: absolute;
    left: calc(100% + 14px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateX(-6px);
}

/* Arrow pointing left */
.tool-btn::before {
    content: '';
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    border: 6px solid transparent;
    border-right-color: rgba(15, 23, 42, 0.95);
    margin-left: -6px;
    z-index: 1001;
}

/* Tooltip body */
.tool-btn::after {
    content: attr(data-tooltip);
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    color: #f1f5f9;
    padding: 7px 11px;
    border-radius: 8px;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 1px 4px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-width: max-content;
}

/* When a shortcut is defined, make room for the kbd pill */
.tool-btn[data-shortcut]::after {
    padding-bottom: 22px;
}

.tool-btn:hover::before,
.tool-btn:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    transition-delay: 0.25s;
}

.tool-btn:hover::before {
    transform: translateY(-50%) translateX(0);
    transition-delay: 0.25s;
}

/* Shortcut kbd pill – injected as a pseudo on a ::after sibling via JS wrapper */
/* We use a data-shortcut attribute + a real <span class="tool-kbd"> injected by JS */
.tool-btn .tool-kbd {
    position: absolute;
    left: calc(100% + 14px);
    top: calc(50% + 10px);
    background: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-family: var(--font-ui, monospace);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.15s ease 0.25s, transform 0.15s ease 0.25s;
    z-index: 1002;
    letter-spacing: 0.03em;
}

.tool-btn:hover .tool-kbd {
    opacity: 1;
    transform: translateX(0);
}


.tool-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tool-btn i {
    width: 20px;
    height: 20px;
}

.tool-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-red);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.35rem;
    border-radius: 10px;
    line-height: 1;
    min-width: 18px;
    text-align: center;
}

/* Sidebar Utilities Visibility - Show only in Structure/Editor view */
#projectProgressBar,
#statusFilters,
#sceneTools {
    display: none;
}

body.view-editor #projectProgressBar {
    display: block;
}

body.view-editor #statusFilters {
    display: flex;
}

/* sceneTools is now redundant in sidebar as it has a dedicated tools-sidebar */
#sceneTools {
    display: none !important;
}

/* Tree Collapse Toolbar Utility buttons - Show only in Structure/Editor view */
#structureOrganizeBtn,
#structureCustomizeBtn {
    display: none;
}

body.view-editor #structureOrganizeBtn,
body.view-editor #structureCustomizeBtn {
    display: inline-flex;
}

/* Tree Collapse Toolbar Layout */
.tree-collapse-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.tree-collapse-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tree-collapse-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

/* Mobile: show tools-sidebar on small screens */
@media (max-width: 900px) {
    .tools-sidebar {
        position: fixed;
        left: 0;
        top: 56px;
        /* Header height */
        bottom: 0;
        z-index: 990;
        /* Below sidebar overlay */
        width: 50px;
        /* Slightly thinner on mobile */
        padding: 0.5rem 0;
        background: var(--bg-secondary);
        border-right: 1px solid var(--border-color);
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    }

    .tools-sidebar .tool-btn {
        width: 36px;
        height: 36px;
    }

    .tools-sidebar .tool-btn i {
        width: 16px;
        height: 16px;
    }

}

/* Sidebar Versions (pour les versions de scènes) */
.sidebar-versions {
    background: var(--bg-secondary);
    border-right: 2px solid var(--border-color);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 250px;
    width: 280px;
}

.sidebar-versions.hidden {
    display: none;
    min-width: 0;
    width: 0;
}

.sidebar-versions-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.sidebar-versions-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.sidebar-versions-title h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-versions-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    transition: color 0.2s;
}

.sidebar-versions-toggle:hover {
    color: var(--text-primary);
}

.sidebar-versions-scene {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-versions-actions {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    flex-shrink: 0;
}

.btn-new-version {
    width: 100%;
    padding: 0.6rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Crimson Pro', serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-new-version:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.sidebar-versions-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.version-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.version-card:hover {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.05);
}

.version-card.active {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.1);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.15);
}

.version-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.version-card-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.version-card-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 1;
}

.version-card:hover .version-card-actions {
    opacity: 1;
}

.version-card-btn {
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.35rem;
    font-size: 0.8rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.version-card-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.version-card-btn.delete:hover {
    background: rgba(var(--accent-red-rgb), 0.1);
    color: var(--accent-red);
}

.version-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.version-card-stats {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.version-card-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Version finale */
.version-card.final {
    border-color: var(--accent-gold);
    background: rgba(var(--accent-gold-rgb), 0.1);
}

.version-card.final .version-card-number::after {
    content: ' ⭐';
}

.version-card-final-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--accent-gold);
    color: var(--bg-accent);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
    text-transform: uppercase;
}

.version-card-btn.final {
    color: var(--text-muted);
}

.version-card-btn.final:hover {
    background: rgba(var(--accent-gold-rgb), 0.2);
    color: var(--accent-gold);
}

.version-card-btn.final.is-final {
    color: var(--accent-gold);
}

/* Sidebar Plot (Dabble Style) */
.sidebar-plot {
    background: var(--bg-secondary);
    border-left: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 250px;
    width: 280px;
    height: 100%;
    z-index: 10;
}

.sidebar-plot.hidden {
    display: none;
    min-width: 0;
    width: 0;
}

.sidebar-plot-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.sidebar-plot-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.sidebar-plot-title h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.sidebar-plot-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    transition: color 0.2s;
}

.sidebar-plot-toggle:hover {
    color: var(--text-primary);
}

.sidebar-plot-scene {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-plot-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-plot-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sidebar-plot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.sidebar-plot-card-line {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.sidebar-plot-card-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.sidebar-plot-card-content {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* Links Panel (Sidebar) */
.links-panel-sidebar {
    background: var(--bg-secondary);
    border-left: 2px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 250px;
    width: 280px;
    height: 100%;
    z-index: 10;
}

.links-panel-sidebar.hidden {
    display: none;
    min-width: 0;
    width: 0;
}

.links-panel-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.links-panel-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.links-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    transition: color 0.2s;
}

.links-panel-close:hover {
    color: var(--text-primary);
}

.links-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Base de données et Liminaires */
.database-list,
.front-matter-list {
    overflow-y: auto !important;
}

.front-matter-list {
    display: flex;
    flex-direction: column;
    padding-bottom: 2rem;
}

/* Sidebar Accordion Groups */
.accordion-group {
    padding-top: 0.5rem;
}

.accordion-group:first-child {
    padding-top: 0;
}

.accordion-group:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.accordion-group-title {
    padding: 0.5rem 1rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accordion-group-items {
    display: flex;
    flex-direction: column;
    gap: 1px;
}



/* ==========================================
   STATUS & PROGRESS BAR STYLES
   (Copied from characters.css for structure sidebar)
   ========================================== */

/* Project Progress Bar */
.project-progress-bar {
    padding: 0.15rem 0.75rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.15rem;
    font-size: 0.65rem;
    color: var(--text-secondary);
}

.progress-track {
    height: 3px;
    background: var(--bg-tertiary);
    border-radius: 1.5px;
    overflow: hidden;
    display: flex;
}

.progress-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.progress-segment.complete {
    background: var(--status-complete-color);
}

.progress-segment.review {
    background: var(--status-review-color);
}

.progress-segment.progress {
    background: var(--status-progress-color);
}

.progress-segment.draft {
    background: var(--status-draft-color);
}

/* Global status classes */
.status-draft {
    background-color: var(--status-draft-color) !important;
}

.status-progress {
    background-color: var(--status-progress-color) !important;
}

.status-complete {
    background-color: var(--status-complete-color) !important;
}

.status-review {
    background-color: var(--status-review-color) !important;
}

/* Status Filters */
.status-filters {
    display: flex;
    padding: 0.2rem 0.75rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.status-filter-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.15rem 0;
    border: 1px solid var(--border-color);
    border-right: none;
    background: var(--bg-primary);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

.status-filter-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.status-filter-btn:last-child {
    border-radius: 0 4px 4px 0;
    border-right: 1px solid var(--border-color);
}

.status-filter-btn [data-i18n] {
    display: none;
}

.status-filter-btn:hover {
    border-color: var(--text-muted);
}

.status-filter-btn.active {
    border-color: currentColor;
    font-weight: 600;
}

.status-filter-btn.draft.active {
    background: rgba(255, 107, 107, 0.1);
    color: #e55a5a;
    border-color: rgba(255, 107, 107, 0.3);
    border-right-color: var(--border-color);
}

.status-filter-btn.progress.active {
    background: rgba(255, 217, 61, 0.1);
    color: #c9a82e;
    border-color: rgba(255, 217, 61, 0.3);
    border-right-color: var(--border-color);
}

.status-filter-btn.complete.active {
    background: rgba(81, 207, 102, 0.1);
    color: #3db854;
    border-color: rgba(81, 207, 102, 0.3);
    border-right-color: var(--border-color);
}

.status-filter-btn.review.active {
    background: rgba(74, 158, 255, 0.1);
    color: #3a8ae6;
    border-color: rgba(74, 158, 255, 0.3);
    border-right-color: var(--border-color);
}

.status-filter-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-filter-dot.draft {
    background: var(--status-draft-color);
}

.status-filter-dot.progress {
    background: var(--status-progress-color);
}

.status-filter-dot.complete {
    background: var(--status-complete-color);
}

.status-filter-dot.review {
    background: var(--status-review-color);
}

.status-filter-count {
    font-weight: 600;
}

/* Filtered Items */
.filtered-out {
    display: none !important;
}