/* Structural workspace primitives. Visual tokens: visual-system.css. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.workspace-scroll.is-empty { display: grid; place-items: center; }
.workspace-empty { width: min(100%, 480px); margin: 24px auto; padding: 32px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 4px 16px rgb(15 23 42 / 4%); }
.workspace-empty .empty-symbol { margin: 0 auto 20px; }
.workspace-empty h1 { font-size: 24px; letter-spacing: -.03em; }
.workspace-empty p { color: var(--muted); line-height: 1.6; margin: 16px 0 24px; }
.workspace-empty .primary { padding: 0 24px; }
.password-field { position: relative; display: block; min-width: 0; }
.password-field input { padding-right: 52px; }
.password-toggle { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.password-toggle:hover { color: var(--primary); background: var(--primary-soft); }
.password-toggle svg { width: 22px; height: 22px; }
html, body { width: 100%; height: 100%; margin: 0; }
body { min-width: 320px; overflow: hidden; background: var(--bg); color: var(--text); }
button, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, .attach-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 36%, transparent); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .48; }
.app-shell { display: flex; width: 100%; height: 100dvh; min-height: 0; }
.sidebar { display: flex; flex: 0 0 var(--sidebar-width); flex-direction: column; min-width: 0; height: 100%; padding: 24px 16px 16px; border-right: 1px solid var(--border); background: var(--surface); }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 1px 8px 22px; }
.brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; background: var(--primary); color: #fff; font-size: 18px; font-weight: 750; box-shadow: 0 2px 5px rgb(37 99 235 / 20%); }
.sidebar-brand div { display: grid; gap: 2px; }
.sidebar-brand strong { font-size: 15px; letter-spacing: -.02em; }
.sidebar-brand div span { color: var(--muted); font-size: 11px; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 650; cursor: pointer; transition: background-color 140ms ease-out, transform 140ms ease-out; }
.primary:hover:not(:disabled) { background: var(--primary-hover); }
.primary:active:not(:disabled) { transform: scale(.98); }
.new-task { width: 100%; justify-content: flex-start; padding: 0 14px; box-shadow: 0 2px 5px rgb(37 99 235 / 16%); }
.new-task > span { font-size: 20px; font-weight: 400; line-height: 1; }
.task-list-heading { display: flex; align-items: center; justify-content: space-between; margin: 28px 6px 9px; }
.task-list-heading h2 { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.count-badge { display: grid; min-width: 22px; height: 22px; place-items: center; padding: 0 6px; border-radius: 7px; background: var(--surface-inset); color: var(--muted); font-size: 11px; font-weight: 600; }
.task-list { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 4px; overflow: auto; margin: 0; padding: 0 2px 10px 0; list-style: none; scrollbar-width: thin; }
.list-empty { padding: 12px 9px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.task-row { position: relative; display: flex; align-items: stretch; gap: 2px; min-width: 0; }
.task-item { display: flex; flex: 1; min-width: 0; min-height: 58px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; transition: background-color 140ms ease-out, border-color 140ms ease-out; }
.task-item:hover { background: var(--surface-subtle); }
.task-item.selected { border-color: color-mix(in srgb, var(--primary) 24%, var(--border)); background: var(--primary-soft); }
.task-title-small { display: -webkit-box; width: 100%; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 550; line-height: 1.35; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.task-row.selected .task-title-small { color: var(--primary-hover); font-weight: 650; }
.task-subline { display: flex; width: 100%; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.task-subline time { margin-left: auto; white-space: nowrap; }
.state-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--muted-soft); }
.state-dot.queued { background: var(--warning); }
.state-dot.processing { background: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 13%, transparent); }
.state-dot.ready { background: var(--success); }
.state-dot.error { background: var(--danger); }
.processing-spinner { display: inline-block; width: 13px; height: 13px; flex: 0 0 13px; border: 2px solid color-mix(in srgb, var(--primary) 24%, transparent); border-top-color: var(--primary); border-radius: 50%; animation: processing-spin .85s linear infinite; }
.sidebar-spinner { width: 11px; height: 11px; flex-basis: 11px; border-width: 1.75px; }
.workspace-spinner { width: 22px; height: 22px; flex-basis: 22px; border-width: 2.5px; }
@keyframes processing-spin { to { transform: rotate(360deg); } }
.task-menu-trigger { align-self: center; width: 34px; height: 34px; flex: 0 0 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 1px; cursor: pointer; }
.task-menu-trigger:hover, .task-menu-trigger[aria-expanded="true"] { background: var(--surface-inset); color: var(--text); }
.task-menu { position: absolute; z-index: 5; top: calc(100% - 4px); right: 0; width: 156px; padding: 5px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 22px rgb(16 24 40 / 13%); }
.task-menu[hidden] { display: none; }
.task-menu button { display: flex; width: 100%; min-height: 36px; align-items: center; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font-size: 12px; text-align: left; cursor: pointer; }
.task-menu button:hover, .task-menu button:focus-visible { background: var(--surface-inset); }
.task-menu .menu-delete { color: var(--danger); }
.sidebar-footer { display: grid; gap: 9px; padding-top: 14px; border-top: 1px solid var(--border); }
.theme-toggle { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; text-align: left; cursor: pointer; }
.theme-toggle:hover { background: var(--surface-subtle); color: var(--text); }
.theme-icon { color: var(--primary); font-size: 16px; }
.workspace { display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; }
.workspace-topbar { display: flex; height: 56px; flex: 0 0 56px; align-items: center; justify-content: space-between; padding: 0 36px; border-bottom: 1px solid var(--border); background: var(--surface); }
.workspace-label { color: var(--muted-soft); font-size: 10px; font-weight: 700; letter-spacing: .11em; }
.connection-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-soft); }
.connection-status.connected .connection-dot { background: var(--success); }
.connection-status.working .connection-dot { background: var(--primary); }
.connection-status.waiting .connection-dot { background: var(--warning); }
.connection-status.error .connection-dot { background: var(--danger); }
.mobile-tasks { display: none; }
.workspace-scroll { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.task-content { width: min(100%, 1060px); margin: 0 auto; padding: 31px 40px 22px; }
.task-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 24px; }
.task-heading-copy { min-width: 0; }
.eyebrow { margin: 0 0 9px; color: var(--muted-soft); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 11px; font-size: clamp(22px, 2.2vw, 27px); font-weight: 680; letter-spacing: -.035em; line-height: 1.25; overflow-wrap: anywhere; text-wrap: balance; }
.task-meta { display: flex; align-items: center; gap: 10px; }
.muted { color: var(--muted); }
.state-chip { display: inline-flex; min-height: 25px; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 600; }
.state-chip::before { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-soft); content: ""; }
.state-chip.queued { border-color: color-mix(in srgb, var(--warning) 24%, var(--border)); background: color-mix(in srgb, var(--warning) 7%, var(--surface)); color: var(--warning); }
.state-chip.queued::before { background: var(--warning); }
.state-chip.processing { border-color: color-mix(in srgb, var(--primary) 24%, var(--border)); background: var(--primary-soft); color: var(--primary-hover); }
.state-chip.processing::before { background: var(--primary); }
.state-chip.ready { border-color: color-mix(in srgb, var(--success) 24%, var(--border)); color: var(--success); }
.state-chip.ready::before { background: var(--success); }
.state-chip.error { border-color: color-mix(in srgb, var(--danger) 24%, var(--border)); color: var(--danger); }
.state-chip.error::before { background: var(--danger); }
.state-chip.stopped { color: var(--muted); }
.task-meta > .muted { font-size: 12px; }
.task-actions { display: flex; align-items: center; gap: 8px; padding-top: 18px; }
.button-secondary { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; }
.button-secondary:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-subtle); }
.delete-current:hover:not(:disabled) { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); color: var(--danger); }
.new-task-empty { display: grid; justify-items: center; gap: 9px; margin: 0 0 20px; padding: 25px 20px; border: 1px dashed var(--border-strong); border-radius: 13px; background: var(--surface); text-align: center; }
.new-task-empty[hidden] { display: none; }
.empty-symbol { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-size: 21px; }
.new-task-empty h2 { margin: 2px 0 0; font-size: 16px; letter-spacing: -.02em; }
.new-task-empty p { max-width: 380px; margin: 0 0 3px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.task-summary { display: grid; grid-template-columns: minmax(0, .9fr) minmax(175px, .68fr) minmax(0, 1.25fr); align-items: stretch; gap: 14px; }
.summary-block, .work-status { position: relative; min-width: 0; min-height: 148px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.block-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.block-heading > div { min-width: 0; }
.block-icon { display: grid; width: 31px; height: 31px; flex: 0 0 31px; place-items: center; border-radius: 9px; background: var(--surface-inset); color: var(--muted); font-size: 17px; }
.output-icon { background: var(--primary-soft); color: var(--primary); }
.block-heading h2 { margin: 0; font-size: 12px; font-weight: 650; }
.block-subtitle { display: block; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.file-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.compact-list { max-height: 158px; overflow: auto; }
.compact-list > li { min-width: 0; color: var(--text); font-size: 11px; }
.compact-list .muted, .file-list > li.muted { color: var(--muted); line-height: 1.5; }
.compact-file { display: flex; min-width: 0; align-items: center; gap: 7px; }
.file-type { display: inline-grid; width: 25px; height: 27px; flex: 0 0 25px; place-items: center; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-subtle); color: var(--muted); font-size: 7px; font-weight: 750; text-transform: uppercase; }
.compact-file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--muted); font-size: 10px; white-space: nowrap; }
.attachment-card { display: flex; min-width: 0; min-height: 49px; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 11px; background: var(--surface-subtle); box-shadow: 0 1px 3px rgb(16 24 40 / 7%); }
.attachment-file-icon { display: grid; width: 33px; height: 33px; flex: 0 0 33px; place-items: center; border-radius: 9px; background: var(--surface-inset); color: var(--muted); }
.attachment-file-icon.pdf, .attachment-file-icon.powerpoint { background: color-mix(in srgb, var(--danger) 9%, var(--surface)); color: var(--danger); }
.attachment-file-icon.excel { background: color-mix(in srgb, var(--success) 10%, var(--surface)); color: var(--success); }
.attachment-file-icon.imagen { background: var(--primary-soft); color: var(--primary); }
.attachment-file-icon.audio { background: color-mix(in srgb, var(--primary) 10%, var(--surface)); color: var(--primary); }
.attachment-icon { width: 19px; height: 19px; }
.attachment-copy { display: grid; min-width: 0; gap: 3px; }
.attachment-copy strong { overflow: hidden; color: var(--text); font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.attachment-copy span { color: var(--muted); font-size: 10px; }
.work-status { display: flex; min-height: 148px; align-items: flex-start; gap: 10px; background: var(--surface-subtle); }
.status-symbol { display: grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.work-status strong { display: block; padding-top: 2px; font-size: 12px; font-weight: 650; line-height: 1.4; }
.work-status p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.work-status[data-kind="queued"] .status-symbol { background: color-mix(in srgb, var(--warning) 12%, var(--surface)); color: var(--warning); }
.work-status[data-kind="processing"] .status-symbol { background: var(--primary-soft); color: var(--primary); }
.work-status[data-kind="ready"] .status-symbol { background: color-mix(in srgb, var(--success) 11%, var(--surface)); color: var(--success); }
.work-status[data-kind="error"] .status-symbol { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); }
.work-status[data-kind="stopped"] .status-symbol { background: var(--surface-inset); color: var(--muted); }
.outputs-block { padding-right: 42px; }
.refresh-button { position: absolute; top: 17px; right: 14px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.refresh-button:hover:not(:disabled) { background: var(--surface-inset); color: var(--primary); }
.artifact-card { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-subtle); }
.artifact-info { display: flex; min-width: 0; align-items: center; gap: 8px; }
.artifact-info-copy { display: grid; min-width: 0; gap: 3px; }
.artifact-info strong { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.artifact-info span { color: var(--muted); font-size: 10px; }
.download-link { display: inline-flex; min-height: 30px; flex: 0 0 auto; align-items: center; padding: 0 9px; border-radius: 7px; background: var(--primary-soft); color: var(--primary-hover); font-size: 10px; font-weight: 650; text-decoration: none; }
.download-link:hover { background: var(--primary); color: #fff; }
.output-list { max-height: 82px; overflow: auto; }
.output-list > li { min-width: 0; }
.activity-section { margin-top: 32px; }
.activity-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.activity-heading .eyebrow { margin-bottom: 5px; }
.activity-heading h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.activity-heading > .muted { font-size: 11px; }
.messages { display: grid; min-height: 85px; align-content: start; justify-items: stretch; gap: 12px; }
.activity-empty { display: flex; align-items: center; gap: 10px; padding: 14px 15px; border-radius: 10px; background: var(--surface-subtle); color: var(--muted); }
.activity-empty > span { color: var(--primary); font-size: 15px; }
.activity-empty p { margin: 0; font-size: 12px; }
.message { width: fit-content; max-width: min(82%, 720px); padding: 11px 13px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); line-height: 1.55; overflow-wrap: anywhere; }
.message.user { justify-self: end; border-color: color-mix(in srgb, var(--primary) 19%, var(--border)); background: var(--primary-soft); }
.message.agent { justify-self: start; }
.message-role { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 650; }
.message > div:last-child { font-size: 13px; text-wrap: pretty; }
.artifact-message { position: relative; width: min(100%, 720px); max-width: 100%; padding-top: 13px; }
.artifact-close { position: absolute; top: 6px; right: 7px; width: 27px; height: 27px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.artifact-close:hover { background: var(--surface-inset); }
.artifact-cards { display: grid; gap: 7px; margin-top: 9px; }
.diagnostics { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.diagnostics summary { width: fit-content; cursor: pointer; }
.diagnostics pre { max-height: 280px; overflow: auto; color: var(--muted); font-size: 10px; line-height: 1.5; }
.composer { flex: 0 0 auto; padding: 12px max(24px, calc((100% - 980px) / 2)) 10px; border-top: 1px solid var(--border); background: var(--surface); }
.composer-box { width: min(100%, 980px); margin: 0 auto; padding: 10px 11px 9px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); box-shadow: 0 1px 2px rgb(16 24 40 / 4%), 0 3px 9px rgb(16 24 40 / 4%); }
textarea { display: block; width: 100%; min-height: 42px; max-height: 130px; resize: vertical; padding: 3px 4px 9px; border: 0; background: transparent; color: var(--text); font-size: 13px; line-height: 1.5; }
textarea::placeholder { color: var(--muted); }
textarea:focus-visible { outline: none; }
.composer-box:focus-within { border-color: color-mix(in srgb, var(--primary) 58%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 11%, transparent); }
textarea:disabled { cursor: not-allowed; }
.composer-row, .composer-files { display: flex; align-items: center; }
.composer-row { justify-content: space-between; gap: 12px; }
.composer-files { min-width: 0; gap: 9px; }
.attach-button { display: inline-flex; min-height: 34px; align-items: center; gap: 6px; padding: 0 8px; border-radius: 7px; color: var(--muted); font-size: 11px; cursor: pointer; }
.attach-button:hover { background: var(--surface-inset); color: var(--text); }
.attach-button > span:first-child { font-size: 17px; }
input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.selected-files { display: flex; min-width: 0; max-width: min(620px, 50vw); flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 11px; }
.selected-file { display: flex; align-items: center; min-width: 0; max-width: 100%; gap: 6px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-inset); line-height: 1.25; }
.selected-file strong, .selected-file > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file strong { color: var(--text); font-size: 11px; font-weight: 600; min-width: 0; }
.selected-file.upload-failed > span { color: var(--danger); }
.rename-dialog { width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgb(16 24 40 / 24%); }
.rename-dialog::backdrop { background: rgb(15 23 42 / 42%); }
.rename-dialog form { display: grid; gap: 12px; padding: 22px; }
.rename-dialog h2 { margin: 0 0 3px; font-size: 17px; }
.rename-dialog label { color: var(--muted); font-size: 12px; font-weight: 600; }
.rename-dialog input { width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.rename-dialog input:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 32%, transparent); outline-offset: 2px; }
.rename-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 5px; }
.rename-actions .primary { min-height: 38px; padding: 0 14px; font-size: 12px; }
.delete-task-name { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.delete-dialog #delete-description { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.button-danger { min-height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--danger); color: #fff; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.button-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 84%, #000); }
.retry-button { margin-top: 10px; color: var(--primary-hover); }
.work-status > div { min-width: 0; }
.selected-file > span { white-space: normal; overflow-wrap: anywhere; }
.send-button { min-height: 40px; gap: 8px; padding: 0 13px 0 15px; font-size: 13px; }
.send-icon { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.composer-hint { width: min(100%, 980px); margin: 5px auto 0; color: var(--muted-soft); font-size: 10px; text-align: right; }
.toast { position: fixed; z-index: 10; right: 24px; bottom: 104px; max-width: min(380px, calc(100vw - 32px)); padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); box-shadow: 0 8px 24px rgb(16 24 40 / 12%); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(5px); transition: opacity 150ms ease-out, transform 150ms ease-out; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { border-color: color-mix(in srgb, var(--danger) 34%, var(--border)); }
.sidebar-backdrop { display: none; }

@media (min-width: 1500px) { .task-content { padding-top: 38px; } }
@media (max-width: 1050px) { .workspace-topbar { padding: 0 26px; } .task-content { padding-right: 26px; padding-left: 26px; } .task-summary { grid-template-columns: minmax(0, 1fr) minmax(160px, .8fr); } .outputs-block { grid-column: 1 / -1; min-height: 126px; } }
@media (max-width: 900px) {
  body { overflow: hidden; }
  .sidebar { position: fixed; z-index: 8; top: 0; bottom: 0; left: 0; width: min(310px, calc(100vw - 52px)); height: 100dvh; box-shadow: 12px 0 32px rgb(16 24 40 / 12%); transform: translateX(-105%); transition: transform 190ms cubic-bezier(.23,1,.32,1); }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; z-index: 7; inset: 0; display: block; background: rgb(15 23 42 / 38%); opacity: 0; pointer-events: none; transition: opacity 180ms ease-out; }
  .app-shell.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .workspace-topbar { height: 52px; flex-basis: 52px; padding: 0 16px; }
  .mobile-tasks { display: inline-flex; min-height: 36px; align-items: center; gap: 7px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; }
  .mobile-tasks:hover { background: var(--surface-inset); }
  .workspace-label { display: none; }
  .task-content { padding: 22px 18px 17px; }
  .task-header { display: block; gap: 12px; padding-bottom: 20px; }
  .task-actions { gap: 6px; padding-top: 13px; }
  .button-secondary { min-height: 36px; padding: 0 9px; font-size: 11px; }
  .task-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .summary-block, .work-status { min-height: 132px; padding: 13px; }
  .work-status { grid-column: 1 / -1; min-height: auto; }
  .outputs-block { grid-column: 1 / -1; }
  .activity-section { margin-top: 26px; }
  .composer { padding: 9px 12px 7px; }
  .composer-hint { display: none; }
  .toast { bottom: 84px; right: 14px; }
}
@media (max-width: 480px) {
  .task-content { padding-right: 14px; padding-left: 14px; }
  .task-header { display: block; }
  .task-actions { padding-top: 13px; }
  h1 { max-width: 100%; font-size: 22px; }
  .task-summary { grid-template-columns: 1fr; }
  .summary-block, .work-status { min-height: auto; }
  .work-status { grid-column: auto; }
  .outputs-block { grid-column: auto; }
  .block-heading { margin-bottom: 11px; }
  .compact-list { max-height: 180px; }
  .output-list { max-height: 112px; }
  .selected-files { max-width: 36vw; }
  .attach-label { display: none; }
  .attach-button { width: 36px; justify-content: center; padding: 0; }
  .message { max-width: 94%; }
}
@media (prefers-reduced-motion: reduce) { .processing-spinner { animation: none; border-right-color: var(--primary); } *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

.selected-file .attachment-icon { flex: 0 0 16px; width: 16px; height: 16px; color: var(--primary); }
.selected-file button { flex: 0 0 32px; width: 32px; min-height: 32px; padding: 0; border: 0; background: transparent; color: var(--muted); border-radius: 6px; }
.selected-file button:hover { background: var(--primary-soft); color: var(--primary); }
.selected-file .selected-file-status { flex: 0 0 auto; white-space: nowrap; font-size: 10px; }
.selected-file.upload-failed { border-color: var(--danger); }
.attachment-overflow { min-height: 38px; padding: 4px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--primary-soft); color: var(--primary); font: inherit; cursor: pointer; }
.attachment-popover { width: min(440px, calc(100vw - 28px)); max-height: min(420px, 65vh); padding: 16px; border: 1px solid var(--border-strong); border-radius: 12px; color: var(--text); background: var(--surface); box-shadow: 0 12px 32px rgb(15 23 42 / 18%); overflow: auto; }
.attachment-popover::backdrop { background: transparent; }
.attachment-popover-row { margin-top: 10px; }
.attachment-popover-row .selected-file strong { flex: 1; }
.attachment-popover-row small { display: block; margin: 4px 6px; color: var(--muted); }
.execution-timing { display: block; color: var(--muted); margin-top: 6px; font-size: 12px; }
@media (max-width: 768px) {
  .composer-row { flex-wrap: wrap; }
  .composer-files { flex: 1 1 100%; align-items: flex-start; }
  .selected-files { flex: 1; max-width: none; }
  .selected-file button { min-height: 36px; }
}
