/* ===== SIDEBAR (Desktop >= 992px) ===== */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 220px;
    background: var(--bs-body-bg);
    border-right: 1px solid var(--bs-border-color);
    z-index: 1000;
    overflow-y: auto;
}

#sidebar .sidebar-brand {
    padding: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

#sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    color: var(--bs-body-color);
    border-radius: 0.375rem;
    margin: 0.125rem 0.5rem;
    font-size: 0.9rem;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

#sidebar .nav-link i {
    font-size: 1.25rem;
}

@media (min-width: 992px) {
    #main-content {
        margin-left: 220px;
    }
}

/* ===== BOTTOM NAV (Mobile < 992px) ===== */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

#bottom-nav .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.375rem 0;
    font-size: 0.65rem;
    color: var(--bs-body-color);
    text-decoration: none;
    line-height: 1.2;
}

#bottom-nav .nav-link i {
    font-size: 1.35rem;
    margin-bottom: 0.125rem;
}

#bottom-nav .nav-link:hover,
#bottom-nav .nav-link.active {
    color: var(--bs-primary);
}

@media (max-width: 991.98px) {
    body {
        padding-bottom: 3rem;
    }
}

/* ===== TOP BAR ===== */
#top-bar {
    border-bottom: 1px solid var(--bs-border-color);
}

/* ===== GENERAL ===== */
.card {
    margin-bottom: 0.75rem;
}

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-request.htmx-indicator {
    display: inline-block;
}

.htmx-request.htmx-indicator {
    display: inline-block;
}

#htmx-page-loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9998;
    overflow: hidden;
}

#htmx-page-loader.active {
    display: block;
}

#htmx-page-loader::after {
    content: '';
    display: block;
    width: 40%;
    height: 100%;
    background: var(--bs-primary);
    animation: htmx-slide 1s ease-in-out infinite;
}

@keyframes htmx-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}
