.tasks-page { --tasks-ink:#242424; --tasks-muted:#686868; --tasks-rule:#e5e5e7; --tasks-surface:#f5f5f6; color:var(--tasks-ink); }
.tasks-page [hidden] { display:none!important; }
.tasks-page .studio-header { height:48px; min-height:48px; padding:0 22px; }
.tasks-page .studio-shell { grid-template-columns:72px minmax(0,1fr); padding-top:48px; align-content:start; }
.tasks-page .studio-sidebar { top:48px; height:calc(100dvh - 48px); min-height:0; max-height:calc(100dvh - 48px); display:flex; flex-direction:column; }
.tasks-page .studio-sidebar nav { overflow-y:auto; min-height:0; }
.tasks-page .studio-sidebar nav a { text-align:center; }
@media(min-width:980px) {
  .tasks-page .studio-sidebar { overflow:hidden; }
  .tasks-page .studio-sidebar nav { flex:1 1 auto; align-content:start; grid-auto-rows:max-content; overflow-x:hidden; scrollbar-width:thin; }
  .tasks-page .studio-sidebar nav a > span { width:100%; }
  .tasks-page .sidebar-account,.tasks-page #sidebar-admin-entry { flex:none; }
}
.tasks-page .studio-main { padding:28px 32px 40px; max-width:1680px; width:100%; margin:0 auto; }
.tasks-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; }
.tasks-heading h1 { margin:0 0 7px; font-size:22px; line-height:1.4; font-weight:600; }
.tasks-heading p { margin:0; color:var(--tasks-muted); font-size:13px; }
.tasks-page .tasks-button { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:40px; padding:9px 14px; border:1px solid #d9dde2; border-radius:9px; background:#fff; color:var(--tasks-ink); text-decoration:none; font:inherit; font-size:13px; font-weight:500; cursor:pointer; }
.tasks-button .ui-icon { width:18px; height:18px; }
.tasks-page .tasks-button:hover { background:#f1f3f5; }
.tasks-page button:disabled { opacity:.5; cursor:default; }
.tasks-page :is(button,a,input,select):focus-visible { outline:1px solid #757575; outline-offset:3px; box-shadow:none; }
.tasks-workspace { background:#fff; border:1px solid var(--tasks-rule); border-radius:14px; overflow:hidden; }
.tasks-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:18px; padding:20px 22px 16px; }
.tasks-kinds { display:flex; gap:4px; padding:4px; border-radius:10px; background:var(--tasks-surface); }
.tasks-kinds button { min-height:36px; padding:7px 14px; background:transparent; color:var(--tasks-muted); border:0; border-radius:7px; font-size:13px; font-weight:500; }
.tasks-kinds button[aria-pressed="true"] { background:#fff; color:var(--tasks-ink); box-shadow:0 1px 3px #25282e12; }
.tasks-filters { display:flex; gap:10px; min-width:0; flex:1; justify-content:flex-end; }
.tasks-filters input { width:270px; max-width:100%; }
.tasks-filters :is(input,select) { min-height:40px; border:1px solid #dfe3e8; background:#fff; border-radius:9px; padding:8px 10px; color:var(--tasks-ink); font-size:13px; }
.tasks-filters input::placeholder { color:#727985; }
.tasks-dates { display:flex; flex-wrap:wrap; align-items:center; gap:10px; width:100%; color:var(--tasks-muted); font-size:12px; }
.tasks-dates label { display:flex; align-items:center; gap:10px; min-width:0; }.tasks-dates input { width:148px; min-width:0; min-height:38px; padding:7px 9px; border:1px solid #dfe3e8; border-radius:8px; background:#fff; color:var(--tasks-ink); font:inherit; font-size:13px; }
.tasks-dates .tasks-button { min-height:36px; padding:7px 10px; }#tasks-date-note { margin-left:auto; }
.tasks-query-note { margin:0 22px 14px; padding:9px 12px; border-radius:8px; background:#f5f5f6; color:#505050; font-size:12px; line-height:1.8; }
.tasks-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; color:var(--tasks-muted); font-size:12px; padding:0 22px 16px; }
.tasks-notice { margin:0 22px 12px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; border-radius:8px; background:#f5f5f6; color:#505050; font-size:13px; }
.tasks-notice p { margin:0; overflow-wrap:anywhere; }
.tasks-notice button { flex:none; }
.tasks-columns,.tasks-row { display:grid; grid-template-columns:minmax(170px,1fr) 84px 120px 156px 70px; gap:18px; align-items:center; }
.tasks-columns { padding:12px 22px; background:var(--tasks-surface); border-block:1px solid var(--tasks-rule); font-size:12px; color:var(--tasks-muted); }
.tasks-list { margin:0; padding:0; list-style:none; }
.tasks-list li+li { border-top:1px solid #edf0f2; }
.tasks-page .tasks-row { width:100%; min-width:0; text-align:left; border:0; border-radius:0; padding:17px 22px; background:#fff; font:inherit; font-size:13px; color:var(--tasks-ink); cursor:pointer; }
.tasks-page .tasks-row:hover { background:#f7f8fa; }
.tasks-page .tasks-row:focus-visible { outline-offset:-4px; }
.tasks-row-title { min-width:0; display:flex; align-items:center; gap:12px; }
.tasks-kind-icon { display:grid; place-items:center; flex:none; width:38px; height:42px; border-radius:8px; background:#f1f3f5; color:#6d7580; }
.tasks-kind-icon svg { width:23px; height:23px; }
.tasks-name { min-width:0; display:grid; gap:5px; }
.tasks-name strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; font-weight:500; }
.tasks-name small { font-size:11px; color:var(--tasks-muted); }
.tasks-name .tasks-group-count { font-size:12px; color:var(--tasks-muted); }
.tasks-row time { color:var(--tasks-muted); font-size:12px; }
.tasks-row-action { text-align:right; font-weight:500; }
.task-state { display:inline-flex; align-items:center; gap:6px; font-size:12px; line-height:1.6; color:#535c68; }
.task-state::before { content:""; width:6px; height:6px; border-radius:50%; background:#87909a; flex:none; }
.task-state[data-group="completed"] { color:#45634e; }.task-state[data-group="completed"]::before { background:#62836b; }
.task-state[data-group="attention"] { color:#806330; }.task-state[data-group="attention"]::before { background:#ae8546; }
.task-state[data-group="ended"] { color:#737985; }
.tasks-empty { min-height:300px; padding:50px 20px; text-align:center; }
.tasks-empty>i { display:grid; place-items:center; width:48px; height:48px; margin:0 auto 14px; color:#858e99; background:var(--tasks-surface); border-radius:12px; }
.tasks-empty h2 { font-size:16px; font-weight:500; margin:0 0 10px; }.tasks-empty p { margin:0 auto 18px; max-width:400px; font-size:13px; line-height:1.8; color:var(--tasks-muted); }
.tasks-footer { display:flex; justify-content:space-between; align-items:center; gap:16px; border-top:1px solid var(--tasks-rule); padding:16px 22px; }
.tasks-footer p { margin:0; color:var(--tasks-muted); font-size:12px; line-height:1.7; }
.task-detail-dialog { width:min(920px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:0; border:1px solid var(--tasks-rule); border-radius:16px; color:var(--tasks-ink); background:#fff; box-shadow:0 20px 80px #20242c30; }
.task-detail-dialog::backdrop { background:#20242c66; }
.task-detail-heading { position:sticky; top:0; z-index:1; display:flex; justify-content:space-between; align-items:center; gap:16px; padding:16px 20px; background:#fff; border-bottom:1px solid var(--tasks-rule); }
.task-detail-heading h2 { margin:0; font-size:16px; font-weight:600; min-width:0; overflow-wrap:anywhere; }
.task-detail-heading .tasks-button { flex-shrink:0; white-space:nowrap; }
.task-detail-grid { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(240px,1fr); }
.task-result { min-width:0; padding:20px; background:#f7f8f9; }
.task-result-media { min-height:260px; display:grid; place-items:center; color:var(--tasks-muted); font-size:13px; text-align:center; border-radius:10px; background:#eceff2; overflow:hidden; }
.task-result-media :is(img,video) { display:block; width:100%; max-height:56dvh; object-fit:contain; background:#15171a; }
.task-result-media p { padding:18px; line-height:1.9; }
#task-media-status { font-size:12px; line-height:1.7; color:var(--tasks-muted); margin:12px 0; }
#task-result-modes { display:flex; gap:8px; margin-bottom:12px; }#task-result-modes button { padding:8px 12px; border-radius:8px; background:#fff; color:var(--tasks-muted); border:1px solid #dfe3e8; font-size:13px; }
#task-result-modes button[aria-pressed="true"] { color:var(--tasks-ink); border-color:#858d98; }
.task-info { padding:20px; min-width:0; }.task-info>.task-state { margin:0; font-size:13px; }
.task-group-summary { margin:0 0 12px; font-size:12px; line-height:1.8; color:var(--tasks-muted); }.task-video-segments { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 14px; }.task-video-segments button { min-height:34px; border:1px solid #dfe3e8; border-radius:7px; padding:6px 9px; background:#fff; color:var(--tasks-muted); font-size:12px; }.task-video-segments button[aria-pressed="true"] { border-color:#858d98; color:var(--tasks-ink); }
.task-info-actions { display:flex; flex-wrap:wrap; gap:8px; }#task-copy-status { font-size:12px; line-height:1.7; color:var(--tasks-muted); }#task-copy-fallback-label { display:grid; gap:6px; margin-top:12px; font-size:12px; color:var(--tasks-muted); }#task-copy-fallback { width:100%; min-width:0; border:1px solid #dfe3e8; border-radius:7px; padding:8px; font:inherit; color:var(--tasks-ink); }
#task-detail-message { font-size:13px; line-height:1.8; margin:12px 0 20px; color:var(--tasks-muted); }
.task-recovery { margin:0 0 18px; padding:12px 14px; border:1px solid var(--tasks-rule); border-radius:9px; background:var(--tasks-surface); font-size:13px; line-height:1.7; }
.task-recovery strong { display:block; font-size:12px; font-weight:600; }
.task-recovery p { margin:4px 0 0; color:var(--tasks-muted); }
.task-recovery > .tasks-button { margin-top:10px; }
.task-retry-details { margin-top:12px; padding-top:12px; border-top:1px solid #dce0e5; }
.task-retry-details summary { font-weight:500; cursor:pointer; }
.task-recovery .task-retry-summary { margin-top:12px; padding:10px 12px; background:#fff; border:1px solid #e0e4e8; border-radius:8px; white-space:pre-wrap; overflow-wrap:anywhere; }
.task-recovery .task-retry-cost { margin-top:12px; color:var(--tasks-ink); font-weight:600; }
.task-retry-consent { display:flex; align-items:flex-start; gap:9px; padding:12px 0 2px; line-height:1.8; cursor:pointer; }
.task-retry-consent input { flex:none; width:17px; height:17px; margin:4px 0 0; accent-color:#353b43; }
.task-retry-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:12px; }
.tasks-page .task-retry-primary { background:#303640; border-color:#303640; color:#fff; }
.tasks-page .task-retry-primary:hover { background:#252a32; }
.task-retry-back { color:#505b68; font-size:12px; line-height:1.8; text-underline-offset:3px; }
.task-retry-id { overflow-wrap:anywhere; font-size:12px; }
.task-retry-details :is(button,input,summary):focus-visible { outline:1px solid #757575; outline-offset:3px; }
@media(max-width:760px) { .task-retry-actions .tasks-button { flex:1 1 100px; min-height:44px; }.task-retry-consent { min-height:44px; font-size:14px; }.task-retry-consent input { width:20px; height:20px; }.task-retry-back { padding:8px 0; } }
.task-info dl { margin:0 0 22px; font-size:12px; display:grid; gap:12px; }.task-info dt { color:var(--tasks-muted); margin-bottom:4px; }.task-info dd { margin:0; line-height:1.7; overflow-wrap:anywhere; }
.task-read-note { font-size:12px; line-height:1.7; color:var(--tasks-muted); }
@media(max-width:1100px) { .tasks-toolbar { align-items:stretch; }.tasks-filters { flex-basis:100%; justify-content:stretch; }.tasks-filters input { flex:1; width:auto; }.tasks-columns,.tasks-row { grid-template-columns:minmax(140px,1fr) 64px 100px 142px 52px; gap:12px; } }
@media(max-width:979px) {
  .tasks-page .studio-shell { grid-template-columns:minmax(0,1fr); }.tasks-page .studio-sidebar { position:static; height:auto; max-height:none; display:flex; flex-direction:row; align-items:center; padding:8px; }
  .tasks-page .studio-sidebar nav { display:flex; overflow-x:auto; }.tasks-page .studio-sidebar nav a { flex-direction:row; padding:8px; font-size:14px; gap:6px; }
  .tasks-page .sidebar-account { display:flex!important; padding:0 4px; margin:0 0 0 auto; flex-direction:row; }.tasks-page .sidebar-balance { display:none; }
  .tasks-page .studio-main { padding:20px 16px 28px; }
}
@media(min-width:761px) and (max-width:979px) { .tasks-page .studio-sidebar { padding-inline:12px; } }
@media(max-width:760px) {
  .tasks-page .studio-sidebar nav a { padding:7px 5px; gap:4px; }
  .tasks-page .studio-shell { padding-top:0; }.tasks-page .studio-header { position:static; padding:0 12px; }.tasks-page .studio-main { padding:18px 12px 28px; }
  .tasks-heading { margin-bottom:18px; gap:10px; }.tasks-heading h1 { font-size:18px; }.tasks-heading p { font-size:12px; }.tasks-heading .tasks-button { padding:8px 10px; }.tasks-heading i { display:none; }
  .tasks-toolbar { padding:14px 12px; gap:12px; }.tasks-kinds { width:100%; }.tasks-kinds button { flex:1; padding-inline:4px; }
  .tasks-filters { gap:8px; }.tasks-filters :is(input,select) { font-size:16px; min-width:0; }.tasks-filters select { width:116px; }
  .tasks-dates { gap:8px; }.tasks-dates label { flex:1 1 120px; flex-direction:column; align-items:stretch; gap:6px; }.tasks-dates label.tasks-date-to { flex-direction:row; align-self:flex-end; }.tasks-dates input { width:100%; font-size:16px; }.tasks-dates>span[aria-hidden] { align-self:flex-end; line-height:38px; }.tasks-dates .tasks-button { font-size:12px; }#tasks-date-note { margin-left:0; }.tasks-query-note { margin-inline:12px; }
  .tasks-meta { padding:0 12px 14px; }.tasks-notice { margin:0 12px 12px; align-items:flex-start; }.tasks-notice .tasks-button { padding:6px; min-height:34px; }
  .tasks-columns { display:none; }.tasks-page .tasks-row { grid-template-columns:minmax(0,1fr) 108px; gap:10px; padding:16px 12px; }
  .tasks-row-title { grid-column:1/-1; }.tasks-row-kind { display:none; }.tasks-row time { grid-column:1; grid-row:2; }.tasks-row .task-state { grid-column:2; grid-row:2; justify-self:end; }.tasks-row-action { display:none; }
  .tasks-footer { padding:14px 12px; flex-direction:column; align-items:stretch; }.tasks-footer .tasks-button { width:100%; }
  .task-detail-dialog { width:calc(100vw - 20px); max-height:calc(100dvh - 20px); }.task-detail-heading { padding:12px 14px; }.task-detail-grid { grid-template-columns:minmax(0,1fr); }.task-result,.task-info { padding:16px; }.task-result-media { min-height:180px; }.task-result-media :is(img,video) { max-height:45dvh; }
}
@media(prefers-reduced-motion:reduce) { .tasks-page * { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
@media(max-width:760px) {
  .tasks-page :is(.tasks-button,.tasks-kinds button,.task-detail-dialog button) { min-height:44px; }
}

/* Tool history stays readable alongside generated media. */
.tasks-name .tasks-group-count { overflow-wrap:anywhere; line-height:1.65; }
.tasks-page .task-result-media .tasks-button { margin:0 16px 24px; }
.tasks-page .task-detail-dialog[open] { animation:task-dialog-enter 140ms ease-out; }
@keyframes task-dialog-enter { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
@media(max-width:760px) { .tasks-kinds { flex-wrap:wrap; }.tasks-kinds button { flex:1 0 64px; }.tasks-page .tasks-filters :is(input,select),.tasks-page .tasks-dates input { min-height:44px; } }
.task-comparison-tray { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; margin:0 22px 18px; padding:14px; border:1px solid var(--tasks-rule); border-radius:9px; background:var(--tasks-surface); }
.task-comparison-tray strong { font-size:13px; font-weight:600; }.task-comparison-tray p { margin:6px 0 0; color:var(--tasks-muted); font-size:12px; line-height:1.7; }
.task-comparison-actions { margin-top:12px; }.task-billing { padding:14px; margin-bottom:18px; border:1px solid var(--tasks-rule); border-radius:9px; }
.task-billing h3 { margin:0 0 12px; font-size:13px; font-weight:600; }.task-billing p { margin:10px 0 0; font-size:12px; line-height:1.8; color:var(--tasks-muted); }.task-billing dl { margin:0; gap:9px; }.task-billing dl>div { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 12px; }.task-billing dt { margin:0; }.task-billing dd { text-align:right; }
.task-comparison-dialog { width:min(1100px,calc(100vw - 32px)); }.task-comparison-note { padding:0 20px; margin:16px 0; color:var(--tasks-muted); font-size:13px; line-height:1.8; overflow-wrap:anywhere; }
.task-comparison-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; padding:0 20px 20px; }.task-comparison-item { min-width:0; padding:14px; border:1px solid var(--tasks-rule); border-radius:10px; }
.task-comparison-item h3 { margin:0 0 8px; font-size:15px; font-weight:500; overflow-wrap:anywhere; }.task-comparison-item p { font-size:12px; color:var(--tasks-muted); line-height:1.8; overflow-wrap:anywhere; }.task-comparison-item .task-comparison-scope { color:var(--tasks-ink); }
.task-comparison-media { display:grid; place-items:center; min-height:160px; background:var(--tasks-surface); margin:12px 0; border-radius:8px; overflow:hidden; }.task-comparison-media :is(img,video) { display:block; width:100%; max-height:45dvh; object-fit:contain; }.task-comparison-media audio { width:100%; min-width:0; }.task-result-media audio { width:100%; min-width:0; }
.task-comparison-item .tasks-button { min-height:40px; }.task-comparison-item .task-info-actions { gap:6px; }
@media(max-width:760px) { .task-comparison-tray { margin-inline:12px; }.task-comparison-grid { grid-template-columns:minmax(0,1fr); padding:0 12px 16px; gap:12px; }.task-comparison-note { padding-inline:14px; }.task-comparison-item { padding:12px; }.task-comparison-dialog { width:calc(100vw - 20px); }.task-comparison-actions button,.task-comparison-item .tasks-button { min-height:44px; }.task-billing dd { text-align:left; } }
