/* Dense workspace chrome and a read-only task console. Landing is unchanged. */
.app-shell {
  --app-bg: #101113;
  --app-surface: #181a1d;
  --app-surface-raised: #202327;
  --app-line: #2b2e32;
  --app-line-strong: #42474d;
  --app-text: #e8ebee;
  --app-muted: #a5adb6;
  --app-lime: #88dc65;
  --app-red: #ff7981;
  --app-yellow: #ebc873;
  --app-control: #22252a;
  --app-input: #111316;
  --app-rail: #15171a;
  --bone: var(--app-text);
  --muted: var(--app-muted);
  --lime: var(--app-lime);
  --line: var(--app-line);
  color: var(--app-text);
  background: transparent;
}
:root[data-theme="light"] .app-shell {
  --app-bg: #f3f5f6;
  --app-surface: #ffffff;
  --app-surface-raised: #edf1f3;
  --app-line: #d7dde2;
  --app-line-strong: #aebac4;
  --app-text: #202a33;
  --app-muted: #586976;
  --app-lime: #397824;
  --app-red: #b52b3a;
  --app-yellow: #8b6310;
  --app-control: #edf1f3;
  --app-input: #ffffff;
  --app-rail: #eef1f3;
  background: transparent;
}
.module-stop-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--app-line-strong, var(--line));
  border-radius: 16px;
  color: var(--app-text, var(--bone));
  background: var(--app-surface, var(--steel));
  box-shadow: 0 24px 80px #0008;
}
.module-stop-dialog::backdrop { background: #060b14b8; }
.module-stop-dialog h2 { margin: 0 0 12px; font-size: 22px; }
.module-stop-dialog p { margin: 0 0 22px; line-height: 1.6; }
.module-stop-dialog .task-actions { margin: 0; }
.module-stop-dialog button:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
:root[data-theme="light"] .module-stop-dialog { color: #202a33; background: #fff; border-color: #aebac4; }
@media (min-width: 981px) {
  .app-shell { grid-template-columns: 220px minmax(0,1fr); }
  .app-shell .rail { padding: 20px 12px 16px; gap: 18px; }
  .app-shell .rail button.nav { min-height: 34px; padding: 7px 10px; font-size: 12px; }
  .app-shell .rail .nav-group { margin-bottom: 13px; }
  .app-shell .rail-foot { max-width: 100%; padding-inline: 8px; }
}
.app-shell .rail button.nav.active {
  background: color-mix(in srgb,var(--app-lime) 10%,var(--app-rail));
}
.app-shell .workspace { padding-inline: clamp(20px,2.4vw,36px); }
.app-shell .workspace-content > .page-head:not(.home-command-hero) {
  padding-top: 24px; padding-bottom: 18px; margin-bottom: 20px; gap: 18px;
}
.app-shell .module-section-cards { margin: 18px 0 20px; padding-bottom: 18px; gap: 10px; }
.app-shell .module-section-card { min-height: 74px; padding: 14px; }
.module-sections-enhanced .app-shell .module-form { gap: 16px; }
.module-sections-enhanced .module-section-region:has(> #module-form-validation):not(
  :has(> #module-form-validation > :not([hidden]))
) { display: none; }
.module-sections-enhanced .module-section-region:has(> #m-task-settings):not(
  :has(> #m-task-settings > .module-section-region:not(.module-section-hidden) > :not([hidden]))
) { display: none; }
.app-shell .module-static-panel { border-radius: 10px; }
.app-shell .module-task-console {
  border: 1px solid var(--app-line-strong); border-radius: 12px;
  background: var(--app-surface); overflow: hidden; margin: 0 0 18px;
}
.app-shell .task-console-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px 18px; padding: 16px 20px;
  border-bottom: 1px solid var(--app-line); min-width: 0;
}
.app-shell .task-console-header :is(h2,h3) {
  margin: 0; font: 600 15px/1.5 var(--sans); letter-spacing: -.015em;
}
.app-shell .task-console-header > div { min-width: 0; display: grid; gap: 5px; }
.app-shell .task-console-header > div > b {
  font: 600 14px/1.5 var(--sans); overflow-wrap: anywhere;
}
.app-shell .task-console-header .eyebrow { font-size: 9px; }
.app-shell .task-console-header .task-console-status.is-active { color: var(--app-lime); }
.app-shell .task-console-header :is(p,small) {
  margin: 4px 0 0; color: var(--app-muted); font-size: 11px; line-height: 1.6;
}
.app-shell .task-console-metrics {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 1px; padding: 0; background: var(--app-line); border-bottom: 1px solid var(--app-line);
}
.app-shell .task-console-metrics > * {
  display: grid; align-content: start; gap: 6px; padding: 13px 20px;
  min-width: 0; background: var(--app-surface);
}
.app-shell .task-console-metrics :is(span,small) {
  font: 400 11px/1.5 var(--sans); color: var(--app-muted); overflow-wrap: anywhere;
}
.app-shell .task-console-metrics :is(strong,b) {
  font: 600 23px/1.25 var(--sans); color: var(--app-text);
  letter-spacing: -.035em; font-variant-numeric: tabular-nums;
}
.app-shell .task-console-lines {
  display: block; list-style: none; margin: 0; padding: 0;
  max-height: 260px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--app-line-strong) transparent;
}
.app-shell .task-console-line {
  display: grid; grid-template-columns: 72px minmax(0,1fr) auto;
  align-items: start; gap: 12px; padding: 12px 20px;
  border-bottom: 1px solid var(--app-line); border-left: 2px solid transparent;
  min-width: 0;
}
.app-shell .task-console-line:last-child { border-bottom: 0; }
.app-shell .task-console-time {
  padding-top: 2px; font: 400 11px/1.7 var(--mono);
  color: var(--app-muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.app-shell .task-console-time > small {
  display: block; font: 400 9px/1.5 var(--sans); color: var(--app-muted);
}
.app-shell .task-console-message { min-width: 0; display: grid; gap: 4px; }
.app-shell .task-console-message b {
  font: 600 12px/1.65 var(--sans); color: var(--app-text); overflow-wrap: anywhere;
}
.app-shell .task-console-message small {
  font: 400 11px/1.7 var(--sans); color: var(--app-muted); overflow-wrap: anywhere;
}
.app-shell .task-console-status {
  max-width: 170px; padding-top: 2px; font: 500 11px/1.7 var(--sans);
  color: var(--app-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-shell .task-console-line.status-success { border-left-color: var(--app-lime); }
.app-shell .task-console-line.status-success .task-console-status { color: var(--app-lime); }
.app-shell .task-console-line.status-error { border-left-color: var(--app-red); }
.app-shell .task-console-line.status-error .task-console-status { color: var(--app-red); }
.app-shell .task-console-line.status-warning { border-left-color: var(--app-yellow); }
.app-shell .task-console-line.status-warning .task-console-status { color: var(--app-yellow); }
.app-shell .task-console-line.status-waiting {
  border-left-color: var(--app-line-strong); background: var(--app-surface);
}
.app-shell .task-console-lines > :is(.muted,.task-console-empty) {
  margin: 0; padding: 18px 20px; font: 400 12px/1.75 var(--sans);
}
.app-shell .task-console-caption {
  margin: 0; padding: 11px 20px; border-top: 1px solid var(--app-line);
  font: 400 10px/1.7 var(--sans); color: var(--app-muted);
}
@media (max-width: 700px) {
  .app-shell .workspace { padding-inline: 16px; }
  .app-shell .workspace-content > .page-head:not(.home-command-hero) {
    padding-top: 16px; padding-bottom: 16px; margin-bottom: 18px;
  }
  .app-shell .module-section-cards { gap: 8px; margin-top: 14px; }
  .app-shell .module-section-card { padding: 12px; min-height: 72px; }
  .app-shell .task-console-header { padding: 14px 16px; gap: 8px 12px; }
  .app-shell .task-console-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .app-shell .task-console-metrics > * { padding: 11px 16px; }
  .app-shell .task-console-line {
    grid-template-columns: 54px minmax(0,1fr); gap: 3px 10px; padding: 11px 14px;
  }
  .app-shell .task-console-time { grid-column: 1; grid-row: 1; font-size: 10px; }
  .app-shell .task-console-message { grid-column: 2; grid-row: 1; }
  .app-shell .task-console-status {
    grid-column: 2; grid-row: 2; max-width: none; padding-top: 0;
    white-space: normal; overflow: visible; overflow-wrap: anywhere;
  }
}
/* Real action updates: corporate motion, no simulated log events or progress. */
.app-shell [data-log-row] { transition: border-color 240ms cubic-bezier(.2,0,0,1); }
.app-shell [data-log-row] .task-console-status,
.app-shell [data-log-row]>div>p:first-of-type { transition: color 220ms cubic-bezier(.2,0,0,1); }
.app-shell [data-journal-action][data-log-tone="success"]>div>p:first-of-type { color: var(--app-lime); }
.app-shell [data-journal-action][data-log-tone="error"]>div>p:first-of-type { color: var(--app-red); }
.app-shell [data-journal-action][data-log-tone="warning"]>div>p:first-of-type { color: var(--app-yellow); }
.app-shell [data-log-running="true"] .task-console-status::before,
.app-shell [data-journal-action][data-log-running="true"]>div>p:first-of-type::before {
  content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 7px;
  border-radius: 50%; background: currentColor; vertical-align: 2px;
  animation: task-log-running-pulse 1900ms ease-in-out infinite;
}
@keyframes task-log-running-pulse {
  0%,100% { opacity: .45; transform: scale(.9); }
  50% { opacity: .9; transform: scale(1); }
}
.task-log-motion-paused .app-shell [data-log-running="true"] .task-console-status::before,
.task-log-motion-paused .app-shell [data-journal-action][data-log-running="true"]>div>p:first-of-type::before { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .app-shell [data-log-row],.app-shell [data-log-row] .task-console-status,
  .app-shell [data-log-row]>div>p:first-of-type { transition: none !important; }
  .app-shell [data-log-running="true"] .task-console-status::before,
  .app-shell [data-journal-action][data-log-running="true"]>div>p:first-of-type::before { animation: none !important; opacity: .8; transform: none; }
}
.module-parsing-source-import { border:1px solid var(--app-line-strong); border-radius:10px; padding:16px; margin:12px 0; min-width:0; background:var(--app-surface-raised); }
.module-parsing-source-import p { margin:6px 0 12px; font-size:12px; overflow-wrap:anywhere; }
.module-parsing-source-controls { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:end; }
.module-parsing-source-controls .field { margin:0; min-width:0; }
.module-parsing-source-controls select { width:100%; max-width:100%; }
.app-shell .task-console-live { display:flex; gap:12px; align-items:center; padding:13px 20px; border-bottom:1px solid var(--app-line); color:var(--app-yellow); }
.task-console-live > div { flex:1; display:grid; gap:4px; min-width:0; }
.task-console-live b { font:600 12px/1.5 var(--sans); }
.task-console-live small { font:400 11px/1.6 var(--sans); color:var(--app-muted); overflow-wrap:anywhere; }
.task-console-live-dot { flex:none; width:9px; height:9px; border:1px solid currentColor; border-radius:50%; animation:task-log-queued-pulse 2200ms ease-in-out infinite; }
.task-console-live-read { font:500 10px/1.5 var(--sans); color:var(--app-muted); white-space:nowrap; }
.task-console-live[data-log-live="running"] { color:var(--app-lime); }
.task-console-live[data-log-live="running"] .task-console-live-dot { background:currentColor; }
.app-shell [data-log-waiting="true"] .task-console-status::before,
.app-shell [data-journal-action][data-log-waiting="true"]>div>p:first-of-type::before { content:""; display:inline-block; width:6px; height:6px; margin-right:7px; border:1px solid var(--app-yellow); border-radius:50%; vertical-align:1px; animation:task-log-queued-pulse 2200ms ease-in-out infinite; }
.app-shell .task-console-message .task-console-wait,.app-shell .module-actions-log .task-console-wait { display:block; color:var(--app-yellow); font:400 11px/1.65 var(--sans); font-variant-numeric:tabular-nums; }
@keyframes task-log-queued-pulse { 0%,100% { opacity:.45; transform:scale(.9); } 50% { opacity:1; transform:scale(1.08); } }
.task-log-motion-paused .task-console-live-dot,
.task-log-motion-paused .app-shell [data-log-waiting="true"] .task-console-status::before,
.task-log-motion-paused .app-shell [data-journal-action][data-log-waiting="true"]>div>p:first-of-type::before { animation-play-state:paused; }
@media(max-width:620px) { .module-parsing-source-controls { grid-template-columns:minmax(0,1fr); } .module-parsing-source-controls .btn { width:100%; } .task-console-live { flex-wrap:wrap; } .task-console-live-read { flex-basis:100%; margin-left:21px; } }
@media(prefers-reduced-motion:reduce) { .task-console-live-dot,.app-shell [data-log-waiting="true"] .task-console-status::before,.app-shell [data-journal-action][data-log-waiting="true"]>div>p:first-of-type::before { animation:none !important; transform:none; opacity:.8; } }
