:root {
    --wb-surface: #ffffff;
    --wb-border: rgba(15, 23, 42, 0.08);
    --wb-accent: #0ea5e9;
    --wb-text: #0f172a;
    --wb-muted: #64748b;
    --wb-danger: #ef4444;
    --wb-success: #22c55e;
    --wb-bg-strong: #f8fafc;
    --wb-rail-width: 62px;
}

.goldfish-app-window__body.workbench-body {
    padding: calc(var(--gcb-titlebar-clear, 55px) + 6px) 6px 6px 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.goldfish-app-window[data-app-window="workbench"] .goldfish-scrollbar {
    display: none !important;
}

.workbench {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    min-height: 0;
    color: var(--wb-text);
    font-family: "SF Pro Display", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
    position: relative;
}

.workbench-button {
    border: 1px solid var(--wb-border);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(248, 250, 252, 0.8));
    color: var(--wb-text);
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.workbench-button:hover {
    border-color: rgba(14, 165, 233, 0.35);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.workbench-button:active {
    transform: translateY(1px);
}

.workbench-button--primary {
    border-color: rgba(14, 165, 233, 0.5);
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.15), rgba(14, 165, 233, 0.05));
    box-shadow: 0 10px 22px rgba(14, 165, 233, 0.22);
}

.workbench-layout {
    flex: 1;
    height: 100%;
    min-height: 0;
    display: block;
    position: relative;
    background: var(--wb-surface);
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    overflow: hidden;
}

.workbench-columns {
    display: grid;
    grid-template-columns: minmax(0, var(--wb-col-1, 1fr)) minmax(0, var(--wb-col-2, 1fr));
    gap: 8px;
    height: 100%;
    position: relative;
}

.workbench-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    min-height: 0;
    box-sizing: border-box;
}

.workbench-column--main {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    box-sizing: border-box;
}

.workbench-column__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    overflow: hidden;
}

.workbench-column__empty {
    border: 1px dashed rgba(15, 23, 42, 0.15);
    border-radius: 10px;
    padding: 22px 12px;
    text-align: center;
    color: var(--wb-muted);
    font-size: 13px;
    background: rgba(255, 255, 255, 0.6);
}

.workbench-preview-shell {
    flex: 1;
    min-height: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    margin: 0;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.workbench-preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
    box-sizing: border-box;
    border-radius: 12px;
    display: block;
    overflow: hidden;
}

.workbench-pill-btn {
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
    color: var(--wb-text);
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.workbench-pill-btn:hover {
    border-color: rgba(14, 165, 233, 0.5);
    background: rgba(14, 165, 233, 0.08);
}

.workbench-pill-btn--mini {
    padding: 4px 8px;
    font-size: 11px;
}

.workbench-pill-btn.is-active {
    border-color: rgba(14, 165, 233, 0.8);
    background: rgba(14, 165, 233, 0.12);
    color: #0c4a6e;
}

.workbench-tabs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 10px;
    padding: 6px 8px;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
    min-height: 36px;
}

.workbench-tabs__actions {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.workbench-tabs__add {
    flex-shrink: 0;
}

.workbench-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.05);
    flex: 1;
    min-width: 0;
    overflow-x: auto;
}

.workbench-tab {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 6px 9px;
    font-size: 12px;
    cursor: pointer;
    color: var(--wb-muted);
    background: transparent;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.workbench-tab.is-active {
    border-color: rgba(14, 165, 233, 0.6);
    background: rgba(14, 165, 233, 0.12);
    color: var(--wb-text);
}

.workbench-tab__icon {
    font-size: 13px;
    line-height: 1;
}

.workbench-tab__label {
    white-space: nowrap;
}

.workbench-tab-close {
    margin-left: 4px;
    font-weight: 600;
    color: var(--wb-muted);
    cursor: pointer;
}

.workbench-tab-close:hover {
    color: var(--wb-text);
}

.workbench-tabs--terminals {
    display: none;
}

.workbench-tabs--terminals .workbench-tab {
    padding: 4px 8px;
    line-height: 1.15;
    height: auto;
}

.workbench-tab--compact {
    padding: 4px 8px;
    line-height: 1.15;
}

.workbench-url-row {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.workbench-urlbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.workbench-urlbar__input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    padding: 9px 10px;
    font-size: 13px;
    background: #f8fafc;
}

.workbench-urlbar__go {
    padding: 8px 12px;
}

.workbench-main {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-height: 0;
    padding: 0;
}

.workbench-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px;
    height: 30px;
    background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    color: #0f172a;
    flex-shrink: 0;
    margin-bottom: 10px;
}

.workbench-preview-spacer {
    flex: 1;
    background: hotpink;
    height: 100%;
    border-radius: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    overflow: hidden;
}

.workbench-preview-spacer__col {
    display: block;
    height: 100%;
}

.workbench-preview-spacer__col--left {
    background: pink;
}

.workbench-preview-spacer__col--mid {
    background: #fff9c4; /* pale yellow */
}

.workbench-preview-spacer__col--right {
    background: plum;
}

.workbench-canvas-shell {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: stretch;
    gap: 0;
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.workbench-canvas {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.workbench-canvas__inner {
    flex: 1;
    min-height: 0;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.workbench-canvas__capture {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(14, 165, 233, 0.02));
    border: 1px dashed rgba(14, 165, 233, 0.35);
    border-radius: 12px;
    text-align: center;
    padding: 16px;
}

.workbench-canvas__capture-icon {
    font-size: 28px;
}

.workbench-canvas__capture-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}

.workbench-canvas__capture-meta .label {
    font-weight: 700;
    color: var(--wb-text);
}

.workbench-canvas__capture-meta .size {
    color: var(--wb-muted);
    font-size: 12px;
    margin-top: 4px;
}

.workbench-capture-rail {
    width: 0;
    flex: 0 0 0;
    background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
    border-left: 0;
    display: none;
    padding: 0;
    overflow: hidden;
    align-items: flex-start;
}

.workbench-capture-rail.is-visible {
    display: flex;
    width: var(--wb-rail-width);
    flex: 0 0 var(--wb-rail-width);
    padding: 10px 6px;
    border-left: 1px solid rgba(15, 23, 42, 0.06);
    flex-direction: column;
    align-items: center;
    gap: 6px;
    overflow-y: auto;
}

.workbench-capture-rail__actions {
    display: grid;
    gap: 6px;
    width: 100%;
    margin-bottom: 8px;
}

.workbench-capture-rail__list {
    display: grid;
    gap: 6px;
    width: 100%;
    align-content: flex-start;
    justify-items: center;
    grid-auto-flow: row;
}

.workbench-capture__empty {
    font-size: 11px;
    color: var(--wb-muted);
    text-align: center;
    padding: 12px 6px;
    width: 100%;
    border: 1px dashed rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
}

.workbench-capture--icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(14, 165, 233, 0.12));
    border: 1px solid rgba(15, 23, 42, 0.08);
    display: grid;
    place-items: center;
    color: var(--wb-text);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: transform 0.1s ease, border-color 0.12s ease, box-shadow 0.12s ease;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.workbench-capture--icon:hover {
    transform: translateY(-1px);
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.workbench-capture--icon.is-active {
    border-color: rgba(14, 165, 233, 0.8);
    background: rgba(14, 165, 233, 0.18);
}

.workbench-capture--wrapper {
    position: relative;
}

.workbench-capture--delete {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: rgba(255, 255, 255, 0.9);
    color: var(--wb-text);
    font-size: 12px;
    line-height: 16px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

.workbench-capture--delete:hover {
    border-color: rgba(239, 68, 68, 0.6);
    color: #b91c1c;
}

.workbench-icon-btn {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.9);
    color: var(--wb-text);
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.1s ease;
}

.workbench-icon-btn--ghost {
    background: #fff;
}

.workbench-icon-btn.is-active {
    border-color: rgba(14, 165, 233, 0.6);
}

.workbench-icon-btn:hover {
    border-color: rgba(14, 165, 233, 0.5);
}

.workbench-icon-btn:active {
    transform: translateY(1px);
}

.workbench-container {
    background: transparent;
    border: none;
    border-radius: 0;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.workbench-container__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px;
    height: 30px;
    background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    flex-shrink: 0;
    margin-bottom: 10px;
}

.workbench-container__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
    color: #0f172a;
}

.workbench-container__title--muted {
    color: var(--wb-muted);
}

.workbench-container__actions {
    display: inline-flex;
    gap: 6px;
}

.workbench-container__body {
    display: contents;
}

.workbench-terminal-host {
    flex: 1;
    min-height: 0;
}

.workbench-terminal {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    padding: 8px 0 8px 8px;
    font-family: "SF Mono", "JetBrains Mono", "Roboto Mono", monospace;
    color: #0f172a;
    min-height: 400px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.workbench-terminal-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.workbench-terminal-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.workbench-terminal-tab {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(248, 250, 252, 0.9);
    border-radius: 8px;
    padding: 2px 6px;
    font-size: 11px;
    color: var(--wb-muted);
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.workbench-terminal-tab.is-active {
    border-color: rgba(14, 165, 233, 0.6);
    background: rgba(14, 165, 233, 0.15);
    color: var(--wb-text);
}

.workbench-terminal-tab:hover {
    border-color: rgba(14, 165, 233, 0.8);
    color: var(--wb-text);
}

.workbench-terminal__status {
    font-size: 12px;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 18px;
}

.workbench-terminal__status-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workbench-terminal__mount {
    flex: 1;
    min-height: 200px;
    background: #ffffff;
    border-radius: 0;
    overflow: hidden;
    border: none;
}

.workbench-terminal__mount .xterm {
    height: 100%;
    width: 100%;
}

.workbench-terminal__error {
    color: #fca5a5;
    align-items: center;
    justify-content: center;
}

.workbench-terminal__prompt {
    color: #22d3ee;
}

.workbench-terminal__dim {
    color: #94a3b8;
}

.workbench-left-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.workbench-left-area .workbench-container {
    flex: 0 0 auto;
}

.workbench-messages {
    background: linear-gradient(180deg, #e0e7ef, #cbd5e1);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    padding: 5px;
    min-height: 40px;
    flex: 1 1 auto;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
}

.workbench-messages-demo {
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    border: none;
    padding: 0;
    gap: 8px;
}

.workbench-messages-demo__header {
    background: rgba(255, 255, 255, 0.5);
    min-height: 20px;
    padding: 4px 8px;
    font-weight: 600;
    color: #000000;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-size: 11px;
}

.workbench-messages-demo__body {
    background: transparent;
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 0;
}

.workbench-messages-demo__body-col {
    padding: 12px;
    color: #000000;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.workbench-messages-demo__body-col--left {
    background: rgba(173, 216, 230, 0.5);
    color: #000000;
}

.workbench-messages-demo__body-col--middle {
    background: rgba(173, 216, 230, 0.5);
    color: #000000;
}

.workbench-messages-demo__body-col--right {
    background: rgba(173, 216, 230, 0.5);
    color: #000000;
}

.workbench-messages-demo__footer {
    background: rgba(255, 255, 255, 0.5);
    min-height: 20px;
    padding: 4px 8px;
    color: #000000;
    font-weight: 600;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-size: 11px;
}

.workbench-welcome {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    display: grid;
    gap: 12px;
}

.workbench-welcome__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    color: var(--wb-accent);
}

.workbench-welcome__headline {
    font-size: 22px;
    font-weight: 700;
    color: var(--wb-text);
}

.workbench-welcome__body {
    color: var(--wb-muted);
    line-height: 1.6;
}

.workbench-welcome__actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-top: 4px;
}
