/* App workspace: scoped shell, no generated-code styles in the parent. */
.mother-workspace {
  --app-bg: var(--mother-bg, #090e08);
  --app-panel: var(--mother-surface, #11170d);
  --app-text: var(--mother-text, #d4dda2);
  --app-muted: var(--mother-muted, #a1ad7d);
  --app-line: var(--mother-line, #414b28);
  --app-accent: var(--mother-accent, #d4e07a);
  grid-column: 3 !important; grid-row: 3 !important; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; background: var(--app-bg); color: var(--app-text);
  font: 13px/1.5 var(--mother-font, 'Lucida Console', 'Cascadia Mono', Consolas, monospace);
  border-left: 1px solid var(--app-line); text-shadow: none;
}
.mother-workspace[hidden] { display: none !important; }
.mother-workspace * { box-sizing: border-box; }
.muthur-terminal.mother-workspace-open { grid-template-columns: minmax(300px,1fr) 8px minmax(320px,var(--mother-app-width,48%)) !important; }
.mother-workspace-open > .muthur-chat { grid-column: 1 !important; grid-row: 3 !important; min-width: 0; }
.mother-workspace-open > .muthur-sessions { display: none !important; }
.mother-app-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--app-line); background: var(--app-panel); }
.mother-app-bar strong { flex: 1; min-width: 100px; font-size: 12px; letter-spacing: .08em; }
.mother-workspace button { min-height: 36px; padding: 7px 10px; border: 1px solid var(--app-line); background: var(--app-panel); color: var(--app-text); font: inherit; font-size: 11px; cursor: pointer; }
.mother-workspace button:hover { border-color: var(--app-accent); }
.mother-workspace button:focus-visible, .mother-workspace :is(input,textarea,select):focus-visible { outline: 2px solid var(--app-accent); outline-offset: 3px; }
.mother-workspace button:disabled { opacity: .55; cursor: wait; }
.mother-app-library { overflow: auto; padding: 18px; }
.mother-workspace h2 { font-size: 18px; line-height: 1.4; margin: 0 0 16px; }
.mother-workspace [hidden], .mother-app-tabs[hidden], .mother-app-resize[hidden] { display: none !important; }
.mother-app-status { padding: 8px 14px; color: var(--app-muted); font-size: 11px; min-height: 32px; overflow-wrap: anywhere; }
.mother-app-error { color: #f4b99e; }
.mother-app-card { padding: 14px 0; border-top: 1px solid var(--app-line); overflow-wrap: anywhere; }
.mother-app-card h3 { margin: 0 0 6px; font-size: 14px; }
.mother-app-card p { margin: 0 0 12px; color: var(--app-muted); }
.mother-app-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.mother-app-tools, .mother-app-revisions { padding: 6px 14px; margin: 0; }
.mother-app-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.mother-app-form label { width: 100%; font-size: 12px; }
.mother-workspace :is(input,textarea,select) { display: block; width: 100%; color: var(--app-text); border: 1px solid var(--app-line); padding: 10px; background: #050904; font: inherit; min-width: 0; }
.mother-workspace textarea { margin-top: 6px; resize: vertical; }
.mother-app-view .mother-app-form { margin: 8px 14px; max-height: 35dvh; overflow: auto; }
.mother-app-note { color: var(--app-muted); font-size: 11px; }
.mother-app-view { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.mother-app-view iframe { width: 100%; min-height: 180px; flex: 1; border: 0; background: var(--app-bg); }
.mother-app-resize { grid-column: 2 !important; grid-row: 3 !important; cursor: col-resize; touch-action: none; background: #242c19; z-index: 11; }
.mother-app-resize:hover, .mother-app-resize:focus-visible { background: #a1ad7d; outline: 0; }
.mother-workspace-resizing iframe { pointer-events: none; }
.mother-app-tabs { display: none; }
.mother-workspace-full .mother-workspace { position: fixed; inset: 0; z-index: 100050; }
.mother-workspace-full .mother-app-resize { display: none; }
@media(max-width:820px) {
  .muthur-terminal.mother-workspace-open { grid-template-columns: minmax(0,1fr) !important; }
  .mother-workspace { grid-column: 1 !important; z-index: 10; }
  .mother-workspace-open > .muthur-chat { visibility: hidden; margin-bottom: 46px; }
  .mother-workspace { margin-bottom: 46px; }
  .mother-app-resize { display: none; }
  .mother-app-tabs { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100051; height: 46px; background: #11170d; border-top: 1px solid #414b28; }
  .mother-app-tabs button { flex: 1; font: 12px 'Lucida Console', monospace; color: #d4dda2; background: transparent; border: 0; }
  .mother-app-tabs button[aria-pressed=true] { background: #28321b; color: #edf4c4; }
  .mother-workspace-chat > .muthur-chat { visibility: visible; }
  .mother-workspace-chat > .mother-workspace { display: none; }
  .mother-workspace button { min-height: 42px; }
}
