/* HSH-LAB Shell/Main App Layout */

:root {
    --sidebar-width: 260px;
    line-height: 1rem;
}

/* Shell layout */
.shell-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.shell-body {
    flex: 1;
    display: flex;
    min-height: 0;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--hsh-surface);
    border-right: 1px solid var(--bs-border-color);
    padding: 1rem;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar .nav-link {
    color: var(--bs-body-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    background-color: var(--hsh-surface-hover);
}

.sidebar .nav-link.active {
    background-color: var(--hsh-primary);
    color: var(--hsh-on-primary);
}

.sidebar-footer {
    padding-top: 0.75rem;
    border-top: 1px solid var(--bs-border-color);
}

/* Main content */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    padding: 0.77rem 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    background-color: var(--hsh-surface);
}

.topbar-brand {
    color: var(--bs-body-color);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    align-self: stretch;
}

.topbar-brand:hover {
    color: var(--bs-body-color);
}

.topbar-brand-divider {
    align-self: stretch;
    width: 1px;
    background-color: currentColor;
    flex-shrink: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    flex-wrap: nowrap;
}

.topbar-user-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    margin-left: auto;
    min-width: 0;
    flex-shrink: 1;
}

.topbar-user-meta {
    min-width: 0;
    line-height: 1.0rem;
}

.page-content {
    padding: 1.0rem;
}

/* Husqvarna icons */
.hsh-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon .spinner-border {
    flex-shrink: 0;
}

.sidebar .nav-link .hsh-icon {
    margin-right: 0.5rem;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 991.98px) {
    .shell-body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid var(--bs-border-color);
    }

    .topbar {
        padding: 0.75rem;
    }

    .topbar-user-actions {
        gap: 0.75rem;
    }
}
