.tool-workspace {
    width: min(100%, 1240px);
    margin: 16px auto 0;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    min-height: 620px;
    border: 1px solid rgba(34, 31, 26, 0.08);
    border-radius: 16px;
    background: #ffffff;
    overflow: hidden;
}

.workspace-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 620px;
    background: #ffffff;
    border-left: 1px solid rgba(34, 31, 26, 0.08);
}

.workspace-sidebar__head {
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(34, 31, 26, 0.08);
}

.workspace-sidebar__title {
    font-size: 1.6rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text);
}

.workspace-sidebar__options {
    flex: 1 1 auto;
    padding: 18px 20px;
    overflow: auto;
}

.workspace-sidebar__options .options-panel,
.workspace-sidebar__options .result-panel,
.workspace-sidebar__options .progress-wrap {
    max-width: none;
    margin: 0;
}

.workspace-sidebar__options .options-panel,
.workspace-sidebar__options .result-panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.workspace-sidebar__options .progress-wrap {
    margin-top: 16px;
    border-radius: 12px;
}

.workspace-sidebar__options .options-panel h3 {
    margin-bottom: 14px;
    font-size: 1rem;
}

.workspace-sidebar__options .options-grid {
    gap: 12px;
}

.workspace-sidebar__options .form-group label {
    display: inline-block;
    margin-bottom: 8px;
    font-weight: 700;
}

.action-bar {
    padding: 16px 20px 20px;
    border-top: 1px solid rgba(34, 31, 26, 0.08);
    background: #ffffff;
    position: sticky;
    bottom: 0;
}

.action-bar:empty {
    display: none;
}

.action-bar .btn,
.action-bar .result-download {
    width: 100%;
    min-height: 56px;
    border-radius: 12px;
    font-size: 1rem;
    box-shadow: none;
}

.action-bar .btn.btn--ghost {
    min-height: 46px;
    margin-top: 10px;
}

.tool-options-panel__empty {
    display: none;
}

.tool-page.tool-page--workspace-ready .tool-process-band,
.tool-page.tool-page--workspace-ready .upload-status,
.tool-page.tool-page--workspace-ready .file-list {
    display: none !important;
}

.tool-page.tool-page--workspace-ready .progress-wrap,
.tool-page.tool-page--workspace-ready .options-panel,
.tool-page.tool-page--workspace-ready .result-panel {
    max-width: none;
}

.tool-page.tool-page--workspace-active #dropZone {
    display: none;
}

html[data-theme='dark'] .workspace,
html[data-theme='dark'] .workspace-sidebar,
html[data-theme='dark'] .action-bar {
    background: #161b27;
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .workspace-sidebar {
    border-left-color: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .workspace-sidebar__head,
html[data-theme='dark'] .action-bar {
    border-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 980px) {
    .workspace {
        grid-template-columns: 1fr;
    }

    .workspace-sidebar {
        min-height: 0;
        border-left: 0;
        border-top: 1px solid rgba(34, 31, 26, 0.08);
    }

    .workspace-sidebar__options {
        overflow: visible;
    }

    .action-bar {
        position: static;
    }
}

@media (max-width: 640px) {
    .tool-workspace {
        margin-top: 12px;
    }

    .workspace-sidebar__head,
    .workspace-sidebar__options,
    .action-bar {
        padding-left: 16px;
        padding-right: 16px;
    }
}
