/* ===== LowTrack Sidebar Navigation ===== */

/* --- Layout Shell --- */
body, html {
    height: 100%;
    margin: 0;
}

/* Top bar */
.lt-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: #1e293b;
    color: #fff;
    padding: 0 16px;
    z-index: 1040;
}

.lt-topbar-brand img {
    height: 32px;
    width: auto;
}

.lt-search-input {
    background: #334155;
    border: 1px solid #475569;
    color: #f1f5f9;
    width: 220px;
    border-radius: 6px;
}

.lt-search-input::placeholder {
    color: #94a3b8;
}

.lt-search-input:focus {
    background: #475569;
    border-color: #60a5fa;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25);
}

/* Sidebar */
.lt-sidebar {
    position: fixed !important;
    top: 48px;
    left: 0;
    width: 250px;
    height: calc(100vh - 48px);
    background: #1e293b !important;
    background-color: #1e293b !important;
    border-right: 1px solid #334155;
    z-index: 1035;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.lt-sidebar .offcanvas-body {
    background: #1e293b !important;
    min-height: 0;
}

.lt-sidebar .offcanvas-header {
    background: #1e293b !important;
    color: #f1f5f9;
}

.lt-sidebar-scroll {
    overflow-y: auto;
    padding: 8px 0;
    min-height: 0;
}

/* Scrollbar for sidebar */
.lt-sidebar-scroll::-webkit-scrollbar {
    width: 5px;
}
.lt-sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.lt-sidebar-scroll::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

/* Sidebar section */
.lt-sidebar-section {
    margin-bottom: 4px;
}

/* Section heading (non-collapsible) */
.lt-sidebar-heading {
    display: flex;
    align-items: center;
    padding: 10px 16px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #cbd5e1;
}

.lt-sidebar-heading i {
    margin-right: 6px;
    font-size: 0.8rem;
}

/* Collapsible section heading (button) */
button.lt-sidebar-toggle {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #cbd5e1;
    transition: color 0.15s;
}

button.lt-sidebar-toggle:hover {
    color: #cbd5e1;
}

button.lt-sidebar-toggle span {
    display: flex;
    align-items: center;
}

button.lt-sidebar-toggle span i {
    margin-right: 6px;
    font-size: 0.8rem;
}

.lt-chevron {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

button.lt-sidebar-toggle[aria-expanded="true"] .lt-chevron {
    transform: rotate(180deg);
}

/* Nav links */
.lt-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lt-sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 7px 16px 7px 24px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.85rem;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.lt-sidebar-nav li a i {
    margin-right: 8px;
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
    opacity: 0.85;
}

.lt-sidebar-nav li a:hover {
    background: #334155;
    color: #f1f5f9;
    border-left-color: #60a5fa;
}

.lt-sidebar-nav li a:hover i {
    opacity: 1;
}

.lt-sidebar-nav li a.active {
    background: #334155;
    color: #60a5fa;
    border-left-color: #60a5fa;
    font-weight: 500;
}

.lt-sidebar-nav li a.active i {
    opacity: 1;
}

/* Sidebar footer */
.lt-sidebar-footer {
    padding: 10px 16px;
    border-top: 1px solid #334155;
    text-align: center;
}

.lt-sidebar-footer .text-muted {
    color: #64748b !important;
    font-size: 0.75rem;
}

/* Main content area */
.lt-main {
    margin-left: 250px;
    margin-top: 48px;
    padding: 24px 24px 80px 24px;
    min-height: calc(100vh - 48px);
    background: #f8fafc;
}

/* --- Responsive: below lg breakpoint --- */
@media (max-width: 991.98px) {
    .lt-sidebar {
        position: fixed !important;
        top: 0;
        height: 100vh;
        width: 280px;
        transform: translateX(-100%);
    }

    /* Bootstrap offcanvas handles the showing on mobile */
    .lt-sidebar.show,
    .lt-sidebar.showing {
        transform: translateX(0);
    }

    .lt-main {
        margin-left: 0;
    }
}

/* --- Wizard actions offset (for manifest form wizard) --- */
.wizard-actions {
    left: 470px; /* 250px app sidebar + 220px wizard sidebar */
}

@media (max-width: 991.98px) {
    .wizard-actions {
        left: 200px; /* wizard sidebar only on mobile */
    }
}

/* --- Active page highlighting script support --- */
/* Handled via JS at bottom of page, or manually with 'active' class */

/* --- Dashboard Cards --- */
.lt-dash-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border-radius: 8px;
}

.lt-dash-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

.lt-dash-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.lt-dash-card-sm {
    border-radius: 6px;
}

.lt-dash-card-sm:hover {
    background: #f1f5f9;
}
