.kiln-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.kiln-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 16px;
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
}

.kiln-topbar-left,
.kiln-topbar-center,
.kiln-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kiln-topbar-center {
    flex: 1;
    justify-content: center;
}

.kiln-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--bs-body-color);
    font-size: 15px;
    font-weight: 800;
}

.kiln-brand-mark {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--bs-border-color);
    border-radius: 7px;
    background: var(--bs-body-bg);
    color: var(--color-accent);
    font-size: 12px;
}

.kiln-top-btn,
.kiln-account-btn,
.kiln-icon-btn {
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    padding: 6px 12px;
    font-size: 14px;
}

.kiln-icon-btn {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
}

.kiln-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.kiln-top-btn:hover,
.kiln-account-btn:hover,
.kiln-icon-btn:hover {
    background: var(--bs-secondary-bg);
}

.kiln-body {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.kiln-sidebar {
    overflow-y: auto;
    padding: 16px;
    border-right: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
}

.kiln-sidebar-action {
    width: 100%;
    margin-bottom: 16px;
    padding: 9px 10px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    text-align: left;
}

.kiln-tree {
    font-size: 14px;
}

.kiln-tree-muted {
    color: var(--bs-secondary-color);
}

.kiln-tree-project,
.kiln-tree-version,
.kiln-tree-task {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--bs-body-color);
    text-align: left;
    padding: 5px 7px;
    border-radius: 6px;
}

.kiln-tree-project:hover,
.kiln-tree-version:hover,
.kiln-tree-task:hover,
.kiln-sidebar-action:hover {
    background: var(--bs-secondary-bg);
    color: var(--bs-body-color);
}

.kiln-tree-group {
    margin: 2px 0 6px 12px;
}

.kiln-tree-version-group {
    margin-bottom: 4px;
    padding-left: 12px;
    border-left: 1px solid var(--bs-border-color);
}

.kiln-tree-label {
    margin-top: 2px;
    padding: 4px 7px 3px;

    color: var(--color-accent);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.kiln-tree-version-group .kiln-tree-version,
.kiln-tree-version-group .kiln-tree-task {
    padding-left: 12px;
}

.kiln-viewer {
    overflow: auto;
    padding: 28px 32px;
    background: var(--bs-body-bg);
}

@media (max-width: 900px) {
    .kiln-body {
        grid-template-columns: 1fr;
    }

    .kiln-sidebar {
        display: none;
    }

    .kiln-sidebar.is-open {
        display: block;
    }

    .kiln-topbar {
        height: auto;
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px;
    }

    .kiln-topbar-center {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .kiln-viewer {
        padding: 20px;
    }
}
