/* frontend/css/studio/tokens.css */
:root { --studio-bg-root: #080c14; --studio-bg-surface: #0f1624; --studio-bg-elevated: #162032; --studio-bg-card: #1b273d; --studio-bg-card-hover: #22314d; --studio-bg-card-active: #2a3c5e; --studio-bg-overlay: rgba(8, 12, 20, 0.88); --studio-dot-matrix: radial-gradient(rgba(140, 144, 159, 0.14) 1px, transparent 1px); --studio-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --studio-font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace; --studio-text-primary: #f1f5f9; --studio-text-secondary: #94a3b8; --studio-text-muted: #64748b; --studio-text-inverse: #080c14; --studio-border-subtle: #263654; --studio-border-muted: rgba(38, 54, 84, 0.6); --studio-border-highlight: #3b82f6; --studio-border-focus-ring: #38bdf8; --studio-focus-glow: 0 0 0 3px rgba(56, 189, 248, 0.35); --studio-accent-blue: #3b82f6; --studio-accent-blue-light: #60a5fa; --studio-accent-blue-container: #1d4ed8; --studio-accent-blue-glow: 0 0 24px -4px rgba(59, 130, 246, 0.45); --studio-accent-emerald: #10b981; --studio-accent-emerald-light: #34d399; --studio-accent-emerald-container: #00a572; --studio-accent-emerald-on: #002113; --studio-accent-emerald-glow: 0 0 20px -3px rgba(16, 185, 129, 0.45); --studio-accent-violet: #8b5cf6; --studio-accent-violet-light: #a78bfa; --studio-accent-violet-container: rgba(139, 92, 246, 0.2); --studio-accent-violet-glow: 0 0 20px -3px rgba(139, 92, 246, 0.45); --studio-accent-amber: #f59e0b; --studio-accent-amber-glow: 0 0 16px -2px rgba(245, 158, 11, 0.4); --studio-accent-rose: #f43f5e; --studio-accent-rose-glow: 0 0 16px -2px rgba(244, 63, 94, 0.4); --studio-accent-indigo: #6366f1; --studio-status-ok-bg: #052e2b; --studio-status-ok-border: #10b981; --studio-status-ok-fg: #6ee7b7; --studio-status-warn-bg: #2b1d07; --studio-status-warn-border: #f59e0b; --studio-status-warn-fg: #fde68a; --studio-status-err-bg: #331018; --studio-status-err-border: #fb7185; --studio-status-err-fg: #fecdd3; --studio-status-info-bg: #082f49; --studio-status-info-border: #38bdf8; --studio-status-info-fg: #bae6fd; --studio-status-muted-bg: #1e293b; --studio-status-muted-border: #475569; --studio-status-muted-fg: #cbd5e1; --studio-agent-analyst: #10b981; --studio-agent-architect: #3b82f6; --studio-agent-qa: #f59e0b; --studio-agent-ui: #8b5cf6; --studio-edge-active-stroke: #047857; --studio-edge-active-stroke-dark: #065f46; --studio-edge-active-width: 3.6px; --studio-edge-active-shadow: drop-shadow(0 0 4px rgba(4, 120, 87, 0.65)); --studio-edge-completed-stroke: #cbd5e1; --studio-edge-completed-width: 2.2px; --studio-edge-completed-opacity: 0.95; --studio-edge-standby-stroke: #94a3b8; --studio-edge-standby-width: 1.4px; --studio-edge-standby-dash: 2 4; --studio-edge-standby-opacity: 0.50; --studio-badge-active-bg: #022c22; --studio-badge-active-border: #047857; --studio-badge-active-text: #ffffff; --studio-badge-active-glow: 0 0 5px rgba(4, 120, 87, 0.55); --studio-badge-completed-bg: #1e293b; --studio-badge-completed-border: #cbd5e1; --studio-badge-completed-text: #f1f5f9; --studio-badge-standby-bg: #0b1120; --studio-badge-standby-border: rgba(148, 163, 184, 0.35); --studio-badge-standby-text: #94a3b8; --studio-legend-bg: rgba(11, 17, 32, 0.90); --studio-legend-border: rgba(148, 163, 184, 0.22); --studio-legend-backdrop: blur(14px); --studio-legend-shadow: 0 4px 20px rgba(0, 0, 0, 0.50); --studio-radius-sm: 6px; --studio-radius-md: 10px; --studio-radius-lg: 14px; --studio-radius-xl: 18px; --studio-radius-full: 9999px; --studio-transition-fast: 0.15s ease; --studio-transition-normal: 0.25s ease; --pg-surface-bg: var(--studio-bg-elevated); --pg-surface-bg-deep: var(--studio-bg-surface); --pg-surface-gradient: linear-gradient( 90deg, rgba(59, 130, 246, 0.16) 0%, rgba(22, 32, 50, 0.98) 55%); --pg-surface-atomic-gradient: linear-gradient( 90deg, rgba(245, 158, 11, 0.16) 0%, rgba(22, 32, 50, 0.98) 55%); --pg-surface-error-gradient: linear-gradient( 90deg, rgba(244, 63, 94, 0.18) 0%, rgba(22, 32, 50, 0.98) 55%); --pg-border-active: rgba(96, 165, 250, 0.55); --pg-border-atomic: rgba(245, 158, 11, 0.55); --pg-border-error: rgba(248, 113, 113, 0.65); --pg-text-primary: var(--studio-text-primary); --pg-text-secondary: #cbd5e1; --pg-accent-active: var(--studio-accent-blue-light); --pg-accent-stepped: var(--studio-accent-emerald-light); --pg-accent-atomic: #fbbf24; --pg-cancel-bg: rgba(244, 63, 94, 0.16); --pg-cancel-border: rgba(248, 113, 113, 0.6); --pg-cancel-text: #fecdd3; --pg-focus-ring: var(--studio-border-focus-ring); --pg-font-sans: var(--studio-font-sans); --pg-font-mono: var(--studio-font-mono); --pg-lock-opacity: 0.48; }
/* frontend/css/studio/base.css */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }
html,
body { width: 100%; height: 100%; overflow: hidden; background-color: var(--studio-bg-root); color: var(--studio-text-primary); font-family: var(--studio-font-sans); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--studio-bg-root); }
::-webkit-scrollbar-thumb { background: var(--studio-border-subtle); border-radius: var(--studio-radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--studio-text-muted); }
:focus-visible { outline: 2px solid var(--studio-border-focus-ring) !important; outline-offset: 2px !important; box-shadow: var(--studio-focus-glow) !important; }
.material-symbols-outlined { font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24; display: inline-block; vertical-align: middle; line-height: 1; user-select: none; }
.material-symbols-outlined.fill-1 { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
#studio-app-root { display: flex; flex-direction: column; width: 100vw; height: 100vh; overflow: hidden; position: relative; }
/* frontend/css/studio/layout.css */
#studio-topbar { height: 56px; min-height: 56px; max-height: 56px; background-color: var(--studio-bg-surface); border-bottom: 1px solid var(--studio-border-subtle); display: flex; align-items: center; justify-content: space-between; padding: 0 6px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; z-index: 50; gap: 3px; user-select: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); width: 100%; max-width: 100vw; box-sizing: border-box; }
.studio-topbar-left,
.studio-topbar-center,
.studio-topbar-right { display: flex; align-items: center; flex-shrink: 0; gap: 3px; }
.studio-brand-anchor { display: flex; align-items: center; gap: 5px; text-decoration: none; color: var(--studio-text-primary); font-weight: 700; font-size: 12.5px; letter-spacing: -0.02em; white-space: nowrap; }
.studio-brand-text { font-size: 12.5px; }
.studio-brand-bolt { width: 24px; height: 24px; border-radius: var(--studio-radius-md); background: linear-gradient( 135deg, #1d4ed8, #3b82f6); display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 0 14px rgba(59, 130, 246, 0.4); }
.studio-brand-bolt .material-symbols-outlined { font-size: 15px; }
.studio-divider-v { width: 1px; height: 14px; background-color: var(--studio-border-subtle); margin: 0 1px; }
.studio-app-select-wrapper { position: relative; display: flex; align-items: center; }
#studio-app-select { appearance: none; background-color: var(--studio-bg-elevated); color: var(--studio-text-primary); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 3px 18px 3px 16px; font-size: 11px; font-weight: 500; cursor: pointer; transition: border-color var(--studio-transition-fast); outline: none; max-width: 92px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
#studio-app-select:hover { border-color: var(--studio-border-highlight); }
#studio-app-select option { background-color: #0F1624; color: #F1F5F9; }
#studio-app-root[data-view-mode=spec-lab] #studio-app-select { max-width: 184px; }
.studio-app-select-dot { position: absolute; left: 5px; width: 5px; height: 5px; border-radius: 50%; background-color: var(--studio-accent-emerald); box-shadow: 0 0 8px var(--studio-accent-emerald); pointer-events: none; }
.studio-app-select-chevron { position: absolute; right: 4px; font-size: 13px; color: var(--studio-text-muted); pointer-events: none; }
.studio-shared-apps-wrapper { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; }
.studio-shared-apps-wrapper.hidden,
.studio-shared-apps-wrapper[hidden] { display: none !important; }
.studio-shared-apps-btn { display: inline-flex; align-items: center; gap: 4px; background-color: rgba(56, 189, 248, 0.12); color: #bae6fd; border: 1px solid rgba(56, 189, 248, 0.35); border-radius: var(--studio-radius-md); padding: 3px 8px; min-height: 26px; font-family: inherit; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all var(--studio-transition-fast); }
.studio-shared-apps-btn:hover { background-color: rgba(56, 189, 248, 0.22); border-color: rgba(56, 189, 248, 0.65); color: #f0f9ff; }
.studio-shared-apps-btn:focus-visible { outline: 2px solid var(--studio-border-focus-ring); outline-offset: 2px; }
.studio-shared-apps-popover { background: var(--studio-bg-surface); color: var(--studio-text-primary); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.72); width: min(340px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: min(360px, 70dvh); overflow-y: auto; overflow-x: hidden; padding: 8px; z-index: 120; box-sizing: border-box; }
.studio-shared-apps-popover:is(:popover-open, .\:popover-open, .is-open) { display: block; }
@supports (position-area: block-end) {
  .studio-shared-apps-popover { inset: auto; margin: 6px 0 0 0; position-area: block-end span-inline-end; position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline; }
}
@supports not (position-area: block-end) {
  .studio-shared-apps-popover { position: fixed; inset: 60px auto auto 12px; margin: 0; }
}
@media (max-width: 640px) {
  .studio-shared-apps-btn { padding: 3px 6px; font-size: 10.5px; }
  .studio-shared-apps-popover { inset: 60px 12px auto 12px; width: auto; }
}
.studio-shared-apps-popover-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 8px 6px; margin-bottom: 6px; border-bottom: 1px solid var(--studio-border-subtle); font-size: 11px; font-weight: 700; color: var(--studio-text-primary); }
.studio-shared-apps-popover-subtitle { font-size: 10px; font-weight: 600; color: var(--studio-text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.studio-shared-apps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.studio-shared-app-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--studio-radius-md); background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); min-width: 0; }
.studio-shared-app-meta { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; }
.studio-shared-app-title { font-size: 12px; font-weight: 600; color: var(--studio-text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.studio-shared-app-role { flex-shrink: 0; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 6px; border-radius: 9999px; background: rgba(148, 163, 184, 0.16); border: 1px solid rgba(148, 163, 184, 0.35); color: #cbd5e1; }
.studio-shared-app-link { flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px; min-height: 28px; border-radius: var(--studio-radius-sm); background: rgba(16, 185, 129, 0.14); border: 1px solid rgba(16, 185, 129, 0.4); color: #6ee7b7; font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: all var(--studio-transition-fast); }
.studio-shared-app-link:hover { background: rgba(16, 185, 129, 0.25); border-color: rgba(16, 185, 129, 0.7); color: #ecfdf5; }
@media (pointer: coarse) {
  .studio-shared-app-link { min-height: 44px; padding: 6px 10px; }
}
.studio-run-select-wrapper { position: relative; display: flex; align-items: center; }
.studio-run-select-wrapper.hidden,
#studio-app-root[data-view-mode=spec-lab] .studio-run-select-wrapper { display: none !important; }
#studio-run-select { appearance: none; background-color: var(--studio-bg-elevated); color: var(--studio-text-secondary); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 3px 12px 3px 8px; font-size: 11px; font-weight: 500; cursor: pointer; transition: all var(--studio-transition-fast); outline: none; max-width: 92px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; box-sizing: border-box; }
#studio-run-select:hover { border-color: var(--studio-border-highlight); color: var(--studio-text-primary); }
#studio-run-select:focus,
#studio-run-select:focus-visible { border-color: var(--studio-border-focus-ring) !important; color: var(--studio-text-primary); }
#studio-run-select option { background-color: #0F1624; color: #F1F5F9; }
#btn-studio-new-app { display: inline-flex; align-items: center; gap: 3px; background-color: var(--studio-bg-card); color: var(--studio-text-primary); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 3px 6px; font-size: 10.5px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast); white-space: nowrap; }
#btn-studio-new-app .material-symbols-outlined { font-size: 13px; }
#btn-studio-new-app:hover { background-color: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); color: #fff; transform: translateY(-1px); }
#studio-view-toggle { display: inline-flex; align-items: center; background-color: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); padding: 2px; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4); }
.studio-toggle-btn { display: inline-flex; align-items: center; gap: 2px; padding: 3px 5px; border-radius: var(--studio-radius-full); border: none; background: transparent; color: var(--studio-text-secondary); font-size: 10px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast); text-decoration: none; user-select: none; }
.studio-toggle-btn:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 1px; }
.studio-toggle-btn .material-symbols-outlined { font-size: 13px; }
.studio-toggle-btn.active { background-color: var(--studio-bg-elevated); color: var(--studio-accent-blue-light); border: 1px solid rgba(59, 130, 246, 0.4); box-shadow: 0 0 12px rgba(59, 130, 246, 0.3); }
.studio-toggle-btn:hover:not(.active) { color: var(--studio-text-primary); }
#studio-live-progress-pill { display: inline-flex; align-items: center; gap: 4px; background-color: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); padding: 2px 6px; font-size: 10px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--studio-text-secondary); cursor: pointer; transition: border-color var(--studio-transition-fast); }
#studio-progress-pill-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#studio-live-progress-pill:hover { border-color: var(--studio-accent-emerald); }
.pulse-beacon { position: relative; display: flex; width: 8px; height: 8px; flex-shrink: 0; }
.pulse-beacon-ping { position: absolute; width: 100%; height: 100%; border-radius: 50%; background-color: var(--studio-accent-emerald); opacity: 0.75; animation: studio-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite; }
.pulse-beacon-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background-color: var(--studio-accent-emerald); }
#btn-studio-preview-app { display: inline-flex; align-items: center; gap: 5px; background: linear-gradient( 135deg, #00a572, #10b981); color: var(--studio-accent-emerald-on); border: none; border-radius: var(--studio-radius-md); padding: 5px 11px; font-size: 11.5px; font-weight: 700; white-space: nowrap; flex-shrink: 0; cursor: pointer; box-shadow: 0 0 16px rgba(16, 185, 129, 0.35); transition: all var(--studio-transition-fast); }
#btn-studio-preview-app:hover { filter: brightness(1.1); box-shadow: 0 0 20px rgba(16, 185, 129, 0.5); transform: translateY(-1px); }
#btn-studio-preview-app.hidden,
#btn-studio-preview-app[hidden] { display: none !important; }
.studio-btn-admin-builds { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; color: #bae6fd; background: linear-gradient( 135deg, rgba(56, 189, 248, 0.18), rgba(59, 130, 246, 0.2)); border: 1px solid rgba(56, 189, 248, 0.45); border-radius: var(--studio-radius-md); padding: 2px 6px; min-height: 24px; text-decoration: none; white-space: nowrap; flex-shrink: 0; transition: all var(--studio-transition-fast); }
.studio-btn-admin-builds:hover { color: #ffffff; border-color: #38bdf8; background: linear-gradient( 135deg, rgba(56, 189, 248, 0.32), rgba(59, 130, 246, 0.35)); }
.studio-btn-admin-builds.hidden { display: none !important; }
#btn-bridge-admin-view { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; color: var(--studio-text-muted); text-decoration: none; padding: 2px 5px; min-height: 24px; white-space: nowrap; border-radius: var(--studio-radius-md); border: 1px solid transparent; transition: all var(--studio-transition-fast); }
#btn-bridge-admin-view .material-symbols-outlined { font-size: 13px; }
#btn-bridge-admin-view:hover { color: var(--studio-text-secondary); border-color: var(--studio-border-subtle); background-color: var(--studio-bg-elevated); }
@media (max-width: 1480px) {
  #studio-topbar .studio-divider-v { display: none; }
}
.studio-workspace-container { display: flex; flex: 1; width: 100%; height: calc(100vh - 56px); overflow: hidden; position: relative; }
#studio-console-aside { width: 360px; min-width: 360px; max-width: 360px; height: 100%; background-color: var(--studio-bg-surface); border-right: 1px solid var(--studio-border-subtle); display: flex; flex-direction: column; z-index: 30; transition: transform var(--studio-transition-normal), margin-left var(--studio-transition-normal); position: relative; }
#studio-console-aside.collapsed { margin-left: -360px; }
#btn-expand-console { position: absolute; top: 14px; left: 14px; z-index: 35; width: 36px; height: 36px; border-radius: var(--studio-radius-md); background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-primary); display: none; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); transition: all var(--studio-transition-fast); }
#btn-expand-console:hover { border-color: var(--studio-border-highlight); background-color: var(--studio-bg-elevated); }
#studio-console-aside.collapsed ~ #btn-expand-console { display: flex; }
#studio-canvas-pane { flex: 1; height: 100%; display: flex; flex-direction: column; background-color: var(--studio-bg-root); background-image: var(--studio-dot-matrix); background-size: 24px 24px; overflow: hidden; position: relative; }
#studio-agent-drawer { width: 380px; min-width: 380px; max-width: 380px; height: 100%; min-height: 0; overflow: hidden; background-color: var(--studio-bg-surface); border-left: 1px solid var(--studio-border-subtle); display: flex; flex-direction: column; z-index: 30; transition: transform var(--studio-transition-normal), margin-right var(--studio-transition-normal); position: relative; }
#studio-agent-drawer.collapsed { margin-right: -380px; }
#btn-expand-drawer { position: absolute; top: 14px; right: 14px; z-index: 35; width: 36px; height: 36px; border-radius: var(--studio-radius-md); background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-primary); display: none; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); transition: all var(--studio-transition-fast); }
#btn-expand-drawer:hover { border-color: var(--studio-border-highlight); background-color: var(--studio-bg-elevated); }
#studio-agent-drawer.collapsed ~ #btn-expand-drawer { display: flex; }
.studio-console-header { padding: 14px 16px; border-bottom: 1px solid var(--studio-border-subtle); background-color: rgba(15, 22, 36, 0.95); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.studio-console-title-group { display: flex; align-items: center; gap: 10px; }
.studio-bot-avatar { width: 32px; height: 32px; border-radius: var(--studio-radius-md); background-color: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); display: flex; align-items: center; justify-content: center; color: var(--studio-accent-blue-light); }
.studio-console-title { font-size: 14px; font-weight: 700; color: var(--studio-text-primary); line-height: 1.2; }
.studio-team-status { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--studio-accent-emerald); }
.studio-team-status-dot { width: 6px; height: 6px; border-radius: 50%; background-color: var(--studio-accent-emerald); box-shadow: 0 0 6px var(--studio-accent-emerald); }
.studio-team-status-dot.standby { background-color: var(--studio-text-muted); box-shadow: none; animation: none; }
.studio-icon-btn { width: 28px; height: 28px; border-radius: var(--studio-radius-sm); background: transparent; border: none; color: var(--studio-text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--studio-transition-fast); }
.studio-icon-btn:hover { background-color: var(--studio-bg-elevated); color: var(--studio-text-primary); }
#studio-console-messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; background-color: rgba(10, 14, 22, 0.4); }
#console-active-question-banner { display: none !important; margin: 0 !important; padding: 0 !important; border: none !important; height: 0 !important; min-height: 0 !important; max-height: 0 !important; overflow: hidden !important; }
.chat-timestamp-badge { align-self: center; background-color: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); padding: 3px 10px; border-radius: var(--studio-radius-full); font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--studio-text-muted); }
.chat-msg { display: flex; gap: 10px; align-items: flex-start; max-width: 100%; }
.chat-msg.user { justify-content: flex-end; padding-left: 24px; }
.chat-msg.agent { padding-right: 24px; }
.chat-avatar { width: 26px; height: 26px; border-radius: var(--studio-radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.chat-avatar.lead { background-color: rgba(59, 130, 246, 0.2); border: 1px solid rgba(59, 130, 246, 0.4); color: var(--studio-accent-blue-light); }
.chat-avatar.copilot { background-color: rgba(16, 185, 129, 0.2); border: 1px solid rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald); }
.chat-avatar.specialist { background-color: rgba(59, 130, 246, 0.18); border: 1px solid rgba(59, 130, 246, 0.45); color: var(--studio-accent-blue-light); }
.chat-avatar.user { background-color: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-primary); border-radius: 50%; }
.chat-content-wrap { display: flex; flex-direction: column; gap: 4px; max-width: calc(100% - 36px); }
.chat-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; white-space: nowrap; font-size: 11px; }
.chat-msg.user .chat-meta { justify-content: flex-end; }
.chat-author { font-weight: 600; }
.chat-author.lead { color: var(--studio-accent-blue-light); }
.chat-author.copilot { color: var(--studio-accent-emerald); }
.chat-author.specialist { color: var(--studio-accent-blue-light); }
.chat-author.user { color: var(--studio-text-secondary); }
.chat-meta-model { font-size: 10px; font-weight: 500; color: var(--studio-text-muted); margin-left: 4px; }
.chat-time { color: var(--studio-text-muted); }
.chat-bubble { padding: 10px 13px; border-radius: var(--studio-radius-lg); font-size: 13px; line-height: 1.45; word-break: break-word; }
.chat-msg.agent .chat-bubble { background-color: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-primary); border-top-left-radius: 2px; }
.chat-msg.user .chat-bubble { background: linear-gradient( 135deg, #1d4ed8, #2563eb); color: #fff; border-top-right-radius: 2px; font-weight: 500; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3); }
.chat-bubble-body { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.chat-bubble .chat-paragraph { margin: 0; line-height: 1.5; }
.chat-bubble .chat-paragraph-gap { height: 6px; }
.chat-bubble .chat-heading-1,
.chat-bubble .chat-heading-2,
.chat-bubble .chat-heading-3 { margin: 8px 0 3px 0; font-weight: 700; color: var(--studio-text-primary); line-height: 1.35; }
.chat-bubble .chat-heading-1 { font-size: 14px; }
.chat-bubble .chat-heading-2 { font-size: 13.5px; }
.chat-bubble .chat-heading-3 { font-size: 13px; color: var(--studio-accent-blue-light); }
.chat-bubble .chat-list { margin: 4px 0 6px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.chat-bubble .chat-ul { list-style-type: disc; }
.chat-bubble .chat-ol { list-style-type: decimal; }
.chat-bubble .chat-list li { line-height: 1.45; }
.chat-bubble .chat-list li::marker { color: var(--studio-accent-blue-light); }
.chat-bubble .chat-inline-code { background: rgba(255, 255, 255, 0.08); padding: 2px 6px; border-radius: 4px; font-size: 12px; font-family: var(--studio-font-mono, monospace); color: #93c5fd; border: 1px solid rgba(255, 255, 255, 0.06); }
.chat-bubble .chat-code-block { background: rgba(0, 0, 0, 0.35); padding: 10px 12px; border-radius: 6px; overflow-x: auto; margin: 8px 0; font-size: 12px; font-family: var(--studio-font-mono, monospace); border: 1px solid rgba(255, 255, 255, 0.08); line-height: 1.45; }
.steering-badge { display: inline-flex; align-items: center; gap: 6px; background-color: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald); padding: 4px 8px; border-radius: var(--studio-radius-sm); font-size: 11px; font-weight: 600; margin-top: 6px; }
.studio-console-suggestions { display: none !important; margin: 0 !important; padding: 0 !important; border: none !important; height: 0 !important; min-height: 0 !important; max-height: 0 !important; overflow: hidden !important; background-color: rgba(15, 22, 36, 0.7); flex-shrink: 0; }
.studio-suggestions-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--studio-text-muted); font-weight: 700; margin-bottom: 6px; }
.studio-suggestions-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.studio-suggestion-pill { background-color: var(--studio-bg-card); color: var(--studio-text-secondary); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); padding: 5px 10px; font-size: 11px; font-weight: 500; cursor: pointer; text-align: left; transition: all var(--studio-transition-fast); }
.studio-suggestion-pill:hover { background-color: var(--studio-bg-card-hover); color: var(--studio-text-primary); border-color: var(--studio-border-highlight); }
.studio-console-input-dock { padding: 12px 14px; border-top: 1px solid var(--studio-border-subtle); background-color: var(--studio-bg-surface); flex-shrink: 0; }
.studio-input-wrap { position: relative; display: flex; flex-direction: column; align-items: stretch; min-height: 148px; background-color: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); transition: border-color var(--studio-transition-fast), box-shadow var(--studio-transition-fast); }
.studio-input-wrap:focus-within { border-color: var(--studio-border-highlight); box-shadow: 0 0 10px rgba(59, 130, 246, 0.25); }
#studio-console-input { width: 100%; min-height: 116px; max-height: 280px; background: transparent; border: none; padding: 12px 14px 42px 14px; color: var(--studio-text-primary); font-family: inherit; font-size: 13.5px; line-height: 1.5; resize: vertical; outline: none; box-sizing: border-box; }
#studio-console-input::placeholder { color: var(--studio-text-muted); }
.studio-input-actions { position: absolute; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px; background: rgba(8, 12, 20, 0.85); backdrop-filter: blur(4px); padding: 2px 4px; border-radius: var(--studio-radius-md); }
#btn-console-mic { width: 28px; height: 28px; border-radius: var(--studio-radius-sm); background: transparent; border: none; color: var(--studio-text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: color var(--studio-transition-fast); }
#btn-console-mic:hover { color: var(--studio-text-primary); }
#btn-console-mic.listening { color: var(--studio-accent-rose); animation: studio-pulse 1s infinite alternate; }
#btn-console-send { width: 30px; height: 30px; border-radius: var(--studio-radius-md); background-color: var(--studio-accent-blue); border: none; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 0 10px rgba(59, 130, 246, 0.4); transition: all var(--studio-transition-fast); }
#btn-console-send:hover { background-color: #2563eb; transform: scale(1.05); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
/* frontend/css/studio/dag-canvas.css */
.studio-canvas-topbar { padding: 8px 16px; background-color: rgba(15, 22, 36, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--studio-border-subtle); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; z-index: 20; flex-shrink: 0; }
#studio-stage-stepper { display: inline-flex; align-items: center; gap: 6px 8px; position: relative; flex-shrink: 0; flex-wrap: wrap; min-width: 0; max-width: 100%; }
#studio-single-stage-pill { flex-shrink: 0; max-width: 100%; }
.stage-step-pill { display: flex; align-items: center; gap: 6px; background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); padding: 3px 10px 3px 5px; font-size: 11px; font-weight: 600; color: var(--studio-text-muted); cursor: pointer; transition: all var(--studio-transition-fast); white-space: nowrap; }
.stage-step-pill.consolidated-stage-status { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 5px; font-family: var(--studio-font-sans); user-select: none; }
.stage-step-pill .step-circle { width: 18px; height: 18px; border-radius: 50%; background-color: var(--studio-bg-elevated); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; flex-shrink: 0; transition: all var(--studio-transition-fast); }
.stage-step-pill.consolidated-stage-status .stage-step-label { font-size: 11px; font-weight: 600; color: var(--studio-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.stage-step-pill.consolidated-stage-status .stage-step-state-badge { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 7px; border-radius: var(--studio-radius-full); line-height: 1.2; transition: all var(--studio-transition-fast); }
.stage-step-pill.consolidated-stage-status .stage-step-state-badge[data-state=standby],
.stage-step-pill.consolidated-stage-status:not(.active):not(.completed) .stage-step-state-badge { background-color: rgba(148, 163, 184, 0.12); border: 1px solid rgba(148, 163, 184, 0.25); color: var(--studio-text-muted); }
.stage-step-pill.consolidated-stage-status .stage-step-state-badge[data-state=in-progress] { background-color: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.35); color: var(--studio-accent-blue); }
.stage-step-pill.consolidated-stage-status .stage-step-state-badge[data-state=active] { background-color: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.25); color: var(--studio-accent-blue-light); }
.stage-step-pill.consolidated-stage-status .stage-step-state-badge[data-state=completed],
.stage-step-pill.consolidated-stage-status.completed .stage-step-state-badge { background-color: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.35); color: var(--studio-accent-emerald); }
.stage-step-pill.completed { border-color: rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald); }
.stage-step-pill.completed .step-circle { background-color: var(--studio-accent-emerald-container); color: var(--studio-accent-emerald-on); animation: none; }
.stage-step-pill.active { background-color: var(--studio-bg-elevated); border-color: var(--studio-border-highlight); color: var(--studio-text-primary); box-shadow: 0 0 12px rgba(59, 130, 246, 0.3); }
.stage-step-pill.active .step-circle { background-color: var(--studio-accent-blue); color: #fff; animation: studio-pulse 1.8s infinite; }
.stage-step-pill:hover:not(.active) { border-color: var(--studio-text-muted); color: var(--studio-text-secondary); }
.stage-step-pill:focus-visible { outline: 2px solid var(--studio-accent-blue); outline-offset: 2px; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35); }
.studio-canvas-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; flex-shrink: 0; min-width: 0; max-width: 100%; }
#studio-canvas-mode-toggle { background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); color: var(--studio-text-secondary); padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast); }
#studio-canvas-mode-toggle:hover { border-color: var(--studio-border-highlight); color: var(--studio-text-primary); }
#btn-replay-flow { display: inline-flex; align-items: center; gap: 4px; background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); color: var(--studio-accent-emerald); padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast); }
#btn-replay-flow:hover { background-color: rgba(16, 185, 129, 0.15); border-color: var(--studio-accent-emerald); }
#studio-trace-select { background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); color: var(--studio-text-secondary); padding: 5px 8px; font-size: 12px; outline: none; cursor: pointer; }
.studio-canvas-viewport { flex: 1; position: relative; overflow: auto; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; padding: 10px 12px 68px 12px; }
#studio-historical-banner { background: linear-gradient( 90deg, rgba(59, 130, 246, 0.16), rgba(15, 23, 42, 0.95)); border: 1px solid rgba(59, 130, 246, 0.45); border-radius: var(--studio-radius-md); padding: 8px 16px; width: 100%; max-width: 640px; margin: 0 auto 6px auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; z-index: 20; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); animation: fadeIn 0.25s ease-in-out; }
#studio-historical-banner.hidden { display: none !important; }
.historical-banner-left { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--studio-text-primary); }
.historical-banner-icon { color: var(--studio-accent-blue-light); font-size: 18px; }
.historical-banner-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-historical-action { display: inline-flex; align-items: center; gap: 6px; height: 32px; min-height: 32px; padding: 0 12px; font-size: 12px; font-weight: 700; border-radius: var(--studio-radius-sm); cursor: pointer; transition: all var(--studio-transition-fast); border: 1px solid var(--studio-border-subtle); user-select: none; }
.btn-historical-action:focus-visible { outline: 2px solid var(--studio-border-focus-ring) !important; outline-offset: 2px !important; box-shadow: var(--studio-focus-glow) !important; }
.btn-historical-preview { background: rgba(59, 130, 246, 0.16); color: var(--studio-accent-blue-light); border-color: rgba(59, 130, 246, 0.45); }
.btn-historical-preview:hover { background: rgba(59, 130, 246, 0.3); border-color: var(--studio-accent-blue); color: #fff; }
.btn-historical-restore { background: rgba(245, 158, 11, 0.16); color: var(--studio-accent-amber); border-color: rgba(245, 158, 11, 0.45); }
.btn-historical-restore:hover { background: rgba(245, 158, 11, 0.28); border-color: var(--studio-accent-amber); }
.btn-historical-latest { background: rgba(16, 185, 129, 0.16); color: var(--studio-accent-emerald-light); border-color: rgba(16, 185, 129, 0.45); }
.btn-historical-latest:hover { background: rgba(16, 185, 129, 0.3); border-color: var(--studio-accent-emerald); }
@keyframes revision-wave-pulse {
  0% { box-shadow: 0 0 12px -2px rgba(59, 130, 246, 0.35); border-color: rgba(59, 130, 246, 0.6); }
  50% { box-shadow: 0 0 24px -4px rgba(59, 130, 246, 0.45); border-color: var(--studio-accent-blue-light); }
  100% { box-shadow: 0 0 12px -2px rgba(59, 130, 246, 0.35); border-color: rgba(59, 130, 246, 0.6); }
}
.agent-node-card.revision-wave-running { border-color: var(--studio-accent-blue) !important; box-shadow: 0 0 24px -4px rgba(59, 130, 246, 0.45) !important; animation: revision-wave-pulse 1.2s ease-in-out infinite !important; }
.agent-node-badge.running { background-color: rgba(59, 130, 246, 0.25) !important; color: var(--studio-accent-blue-light) !important; border: 1px solid rgba(59, 130, 246, 0.5) !important; }
#studio-canvas-graph { position: relative; width: 640px; height: 650px; margin: 0 auto; flex-shrink: 0; }
#studio-edges-svg { position: absolute; top: 0; left: 0; width: 640px; height: 650px; pointer-events: none; z-index: 1; }
@keyframes studio-flow {
  from { stroke-dashoffset: 40; }
  to { stroke-dashoffset: 0; }
}
.studio-flow-active { stroke-dasharray: 6 6; animation: studio-flow 1.2s linear infinite; }
.agent-node-card { position: absolute; z-index: 10; background-color: rgba(22, 32, 50, 0.94); backdrop-filter: blur(8px); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 7px 9px; width: 148px; cursor: pointer; transition: all var(--studio-transition-fast); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); user-select: none; }
.agent-node-card:hover { border-color: var(--studio-border-highlight); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6); }
.agent-node-card.selected { border: 2px solid var(--studio-accent-blue); box-shadow: 0 0 20px rgba(59, 130, 246, 0.4), 0 0 0 1px var(--studio-accent-blue); }
.agent-node-card.active { border-color: var(--studio-accent-blue); box-shadow: 0 0 24px rgba(59, 130, 246, 0.35); }
.agent-node-card.completed { border-color: rgba(16, 185, 129, 0.5); }
.agent-node-card.queued { opacity: 0.72; }
.agent-node-header { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 5px; }
.agent-node-id { font-size: 8.5px; font-weight: 700; text-transform: uppercase; color: var(--studio-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-node-badge { font-size: 8px; font-weight: 700; text-transform: uppercase; padding: 1px 5px; border-radius: var(--studio-radius-full); white-space: nowrap; flex-shrink: 0; }
.agent-node-badge.active { background-color: rgba(59, 130, 246, 0.2); color: var(--studio-accent-blue-light); border: 1px solid rgba(59, 130, 246, 0.4); }
.agent-node-badge.completed { background-color: rgba(16, 185, 129, 0.2); color: var(--studio-accent-emerald); border: 1px solid rgba(16, 185, 129, 0.4); }
.agent-node-badge.queued { background-color: var(--studio-bg-card); color: var(--studio-text-muted); border: 1px solid var(--studio-border-subtle); }
.agent-node-body { display: flex; align-items: center; gap: 7px; }
.agent-node-icon { width: 26px; height: 26px; border-radius: var(--studio-radius-sm); background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); display: flex; align-items: center; justify-content: center; color: var(--studio-accent-blue-light); flex-shrink: 0; }
.agent-node-card.completed .agent-node-icon { color: var(--studio-accent-emerald); }
.agent-node-info { flex: 1; min-width: 0; }
.agent-node-title { font-size: 11px; font-weight: 700; color: var(--studio-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-node-role { font-size: 9.5px; color: var(--studio-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-steering-tag { display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; font-size: 8.5px; font-weight: 600; color: var(--studio-accent-emerald); background-color: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); padding: 1px 5px; border-radius: var(--studio-radius-full); }
#studio-simple-stepper { width: 100%; max-width: 580px; display: flex; flex-direction: column; align-items: center; gap: 20px; margin: 0 auto; }
.simple-stage-card { width: 100%; background-color: rgba(22, 32, 50, 0.95); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-xl); padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: all var(--studio-transition-fast); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); }
.simple-stage-card:hover { border-color: var(--studio-border-highlight); transform: translateY(-2px); }
.simple-stage-card.active { border: 2px solid var(--studio-accent-blue); box-shadow: 0 0 24px rgba(59, 130, 246, 0.35); }
.simple-stage-card.completed { border-color: rgba(16, 185, 129, 0.5); }
.simple-card-header { display: flex; align-items: center; justify-content: space-between; }
.simple-stage-number { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--studio-accent-blue-light); }
.simple-stage-title { font-size: 15px; font-weight: 700; color: var(--studio-text-primary); }
.simple-stage-desc { font-size: 12px; color: var(--studio-text-secondary); }
.simple-progress-wrap { margin-top: 4px; }
.simple-progress-labels { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 4px; color: var(--studio-text-secondary); }
.simple-progress-track { width: 100%; height: 6px; background-color: var(--studio-bg-card); border-radius: var(--studio-radius-full); overflow: hidden; }
.simple-progress-bar { height: 100%; background: linear-gradient( 90deg, #3b82f6, #10b981); border-radius: var(--studio-radius-full); transition: width 0.4s ease; }
.studio-canvas-dock-zoom { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); background-color: rgba(22, 32, 50, 0.92); backdrop-filter: blur(10px); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-xl); padding: 4px 8px; display: flex; align-items: center; gap: 4px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); z-index: 25; }
.zoom-pct-label { font-size: 12px; font-family: var(--studio-font-mono); font-weight: 600; color: var(--studio-text-primary); padding: 0 6px; }
.studio-canvas-tip { position: absolute; bottom: 18px; right: 20px; background-color: rgba(22, 32, 50, 0.85); backdrop-filter: blur(8px); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); padding: 6px 14px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--studio-text-secondary); z-index: 25; }
.studio-drawer-header { padding: 14px 16px; border-bottom: 1px solid var(--studio-border-subtle); background-color: rgba(15, 22, 36, 0.95); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-shrink: 0; }
.drawer-title-group { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.drawer-agent-icon { width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--studio-radius-md); background-color: rgba(59, 130, 246, 0.2); border: 1px solid rgba(59, 130, 246, 0.4); display: flex; align-items: center; justify-content: center; color: var(--studio-accent-blue-light); }
#drawer-agent-title { font-size: 14px; font-weight: 700; color: var(--studio-text-primary); line-height: 1.2; }
#drawer-agent-status { font-size: 11px; color: var(--studio-accent-emerald); font-weight: 600; }
.studio-drawer-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 14px; background-color: rgba(10, 14, 22, 0.3); }
.studio-drawer-body > * { flex-shrink: 0; }
.drawer-header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.drawer-follow-active-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 3px 9px; border-radius: 9999px; border: 1px solid rgba(59, 130, 246, 0.45); background: rgba(59, 130, 246, 0.16); color: #93c5fd; font-size: 10.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all var(--studio-transition-fast); }
.drawer-follow-active-btn:hover { background: rgba(59, 130, 246, 0.28); border-color: rgba(96, 165, 250, 0.7); color: #ffffff; }
.drawer-follow-active-btn:focus-visible { outline: 2px solid var(--studio-border-focus-ring); outline-offset: 2px; }
#drawer-active-tracks-section { background: rgba(15, 22, 36, 0.65); border: 1px solid var(--studio-border-subtle); border-radius: 12px; padding: 10px 11px; }
.drawer-tracks-count-pill { font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 9999px; background: rgba(59, 130, 246, 0.14); border: 1px solid rgba(59, 130, 246, 0.3); color: #93c5fd; text-transform: none; letter-spacing: normal; }
.drawer-active-tracks { display: flex; flex-direction: column; gap: 7px; }
.drawer-tracks-empty { font-size: 11.5px; color: var(--studio-text-muted); padding: 4px 2px; }
.drawer-active-track-card { background: rgba(22, 32, 50, 0.92); border: 1px solid rgba(59, 130, 246, 0.28); border-left: 3px solid #3b82f6; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.drawer-active-track-card.retrying { border-left-color: #f59e0b; border-color: rgba(245, 158, 11, 0.35); }
.drawer-active-track-card.completed { border-left-color: #10b981; border-color: rgba(16, 185, 129, 0.35); }
.drawer-active-track-card.failed { border-left-color: #ef4444; border-color: rgba(239, 68, 68, 0.45); }
.drawer-track-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.drawer-track-agent { font-size: 10px; font-weight: 700; color: #93c5fd; text-transform: uppercase; letter-spacing: 0.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-elapsed-badge { font-family: var(--studio-font-mono); font-size: 10px; font-weight: 700; color: #34d399; background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.28); padding: 1px 6px; border-radius: 9999px; white-space: nowrap; flex-shrink: 0; }
.drawer-track-label { font-size: 12px; font-weight: 600; color: var(--studio-text-primary); line-height: 1.35; }
.drawer-track-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 10.5px; color: var(--studio-text-secondary); }
.drawer-track-progress-pill { font-family: var(--studio-font-mono); font-size: 10px; font-weight: 700; color: #e2e8f0; background: rgba(148, 163, 184, 0.14); padding: 1px 6px; border-radius: 5px; white-space: nowrap; flex-shrink: 0; }
.drawer-milestone-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 6px; }
.drawer-milestone-group-header { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--studio-text-muted); padding: 2px 2px 0; }
.drawer-milestone-item { background: rgba(22, 32, 50, 0.88); border: 1px solid rgba(51, 65, 85, 0.6); border-left: 3px solid #3b82f6; border-radius: 7px; padding: 7px 9px; display: flex; flex-direction: column; gap: 3px; }
.drawer-milestone-item.completed { border-left-color: #10b981; }
.drawer-milestone-item.retrying { border-left-color: #f59e0b; }
.drawer-milestone-item.failed { border-left-color: #ef4444; }
.drawer-milestone-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.drawer-milestone-title { font-size: 11.5px; font-weight: 600; color: var(--studio-text-primary); line-height: 1.35; }
.drawer-milestone-status-icon { font-size: 10.5px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.drawer-milestone-detail { font-size: 11px; color: var(--studio-text-secondary); line-height: 1.35; }
.drawer-milestone-sub { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 9.5px; color: var(--studio-text-muted); }
.drawer-deliverables-list { padding: 10px 12px 2px; display: flex; flex-direction: column; gap: 10px; }
.drawer-deliverables-group { display: flex; flex-direction: column; gap: 5px; }
.drawer-deliverables-group-title { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--studio-text-muted); }
.drawer-deliverables-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.drawer-deliverable-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 8px; border-radius: 6px; border: 1px solid rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.09); color: #e2e8f0; font-size: 11px; font-weight: 600; cursor: pointer; text-align: left; transition: all var(--studio-transition-fast); }
.drawer-deliverable-chip:hover { background: rgba(16, 185, 129, 0.2); border-color: rgba(16, 185, 129, 0.55); }
.drawer-deliverable-path { font-family: var(--studio-font-mono); font-size: 9.5px; color: #34d399; opacity: 0.85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.drawer-technical-details { flex-shrink: 0; background: rgba(15, 22, 36, 0.55); border: 1px solid var(--studio-border-subtle); border-radius: 10px; overflow: hidden; }
#drawer-technical-details > summary,
.drawer-technical-summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; font-size: 11px; font-weight: 700; color: var(--studio-text-secondary); cursor: pointer; user-select: none; scroll-margin-bottom: 18px; }
#drawer-technical-details > summary::-webkit-details-marker { display: none; }
#drawer-technical-details > summary:hover { background: rgba(30, 41, 59, 0.5); color: var(--studio-text-primary); }
.drawer-technical-meta { font-family: var(--studio-font-mono); font-size: 10px; font-weight: 600; color: var(--studio-text-muted); }
.drawer-technical-body { padding: 10px 12px 12px; border-top: 1px solid var(--studio-border-subtle); display: flex; flex-direction: column; gap: 12px; }
.drawer-tech-metrics { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer-tech-metric-pill { font-family: var(--studio-font-mono); font-size: 10px; padding: 2px 7px; border-radius: 5px; background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); }
.drawer-section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--studio-text-muted); margin-bottom: 6px; }
.drawer-value-box { background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; }
.drawer-value-box .material-symbols-outlined { color: var(--studio-accent-blue-light); font-size: 20px; flex-shrink: 0; margin-top: 2px; }
#drawer-what-it-does { font-size: 13px; color: var(--studio-text-primary); line-height: 1.45; }
#drawer-live-checklist { display: flex; flex-direction: column; gap: 8px; }
.checklist-item { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--studio-text-secondary); line-height: 1.4; padding: 6px 8px; border-radius: var(--studio-radius-md); }
.checklist-item.done { color: var(--studio-text-muted); text-decoration: line-through; }
.checklist-item.done .material-symbols-outlined { color: var(--studio-accent-emerald); font-size: 16px; }
.checklist-item.active { background-color: var(--studio-bg-elevated); border: 1px solid rgba(59, 130, 246, 0.4); color: var(--studio-accent-blue-light); font-weight: 600; }
.checklist-spinner { width: 14px; height: 14px; border: 2px solid var(--studio-accent-blue-light); border-top-color: transparent; border-radius: 50%; animation: studio-spin 0.8s linear infinite; flex-shrink: 0; margin-top: 2px; }
#drawer-deliverables-card { background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-xl); overflow: hidden; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); }
.deliverables-empty-state { padding: 24px 16px; text-align: center; color: var(--studio-text-secondary); font-size: 12px; border: 1px dashed var(--studio-border-subtle); border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.phone-mockup-canvas { height: 180px; background-color: var(--studio-bg-root); border-bottom: 1px solid var(--studio-border-subtle); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; background-image: radial-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px); background-size: 16px 16px; }
.phone-mockup-frame { width: 130px; height: 160px; background-color: var(--studio-bg-surface); border: 2px solid var(--studio-border-subtle); border-radius: 14px; padding: 6px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7); transition: transform var(--studio-transition-normal); }
.phone-mockup-canvas:hover .phone-mockup-frame { transform: scale(1.05); }
.phone-mockup-topbar { display: flex; justify-content: space-between; align-items: center; font-size: 7px; font-family: var(--studio-font-mono); color: var(--studio-text-muted); }
.phone-mockup-streak { background-color: var(--studio-bg-elevated); border-radius: 6px; padding: 4px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--studio-border-muted); }
.phone-streak-ring { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--studio-accent-emerald); display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: var(--studio-accent-emerald); }
.phone-streak-text { font-size: 7px; font-weight: 700; color: var(--studio-text-primary); line-height: 1.1; }
.phone-workout-card { background-color: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); border-radius: 6px; padding: 4px 6px; font-size: 7px; color: var(--studio-accent-blue-light); font-weight: 600; }
.phone-tabbar { display: flex; justify-content: space-around; border-top: 1px solid var(--studio-border-muted); padding-top: 3px; color: var(--studio-text-muted); font-size: 8px; }
.drawer-actions-stack { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
#btn-open-preview { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; background-color: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 8px 12px; color: var(--studio-text-primary); font-size: 12px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast); }
#btn-open-preview:hover { background-color: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); }
#btn-approve-stage { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; background: linear-gradient( 135deg, #00a572, #10b981); border: none; border-radius: var(--studio-radius-md); padding: 9px 12px; color: var(--studio-accent-emerald-on); font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 0 16px rgba(16, 185, 129, 0.35); transition: all var(--studio-transition-fast); }
#btn-approve-stage:hover { filter: brightness(1.1); transform: translateY(-1px); }
.drawer-footer-note { padding: 8px 8px; border-top: 1px solid var(--studio-border-subtle); font-size: 9.5px; color: var(--studio-text-muted); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 4px; white-space: nowrap; overflow: hidden; }
.drawer-footer-note .header-engine-pill { min-height: 18px; padding: 0 5px; font-size: 9px; font-weight: 600; gap: 2px; line-height: 1.2; white-space: nowrap; flex-shrink: 0; }
.drawer-footer-note .header-engine-pill:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 1px; }
#studio-new-app-view { position: fixed; inset: 0; background-color: var(--studio-bg-root); z-index: 100; display: none; flex-direction: column; overflow-y: auto; overflow-x: hidden; width: 100%; max-width: 100vw; box-sizing: border-box; }
#studio-new-app-view.open { display: flex; }
.new-app-topbar { height: auto; min-height: 44px; background-color: rgba(15, 22, 36, 0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--studio-border-subtle); display: flex; align-items: center; justify-content: space-between; padding: 6px 20px; flex-shrink: 0; position: sticky; top: 0; z-index: 50; width: 100%; max-width: 100%; box-sizing: border-box; flex-wrap: wrap; gap: 8px; }
#btn-close-new-app-studio { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); color: var(--studio-text-secondary); padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast); }
#btn-close-new-app-studio:hover { color: var(--studio-text-primary); border-color: var(--studio-border-highlight); background-color: var(--studio-bg-elevated); }
.new-app-topbar-pill { display: inline-flex; align-items: center; gap: 8px; background-color: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); padding: 5px 14px; font-size: 12px; color: var(--studio-accent-blue-light); font-weight: 500; }
.new-app-main-grid { flex: 0 0 auto; max-width: 1680px; width: 100%; margin: 0 auto; padding: 10px clamp(16px, 2vw, 28px) 20px; display: flex; flex-direction: column; gap: 10px; box-sizing: border-box; overflow-x: clip; }
.new-app-left-pane { order: 2; display: flex; flex-direction: column; gap: 10px; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; scroll-margin-bottom: 20px; }
.new-app-chat-header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.new-app-chat-intro { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 460px; }
.new-app-chat-intro .new-app-hero-pill { align-self: flex-start; }
.new-app-chat-status-group { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.new-app-hidden-options-shell:not(:has(button:not(.hidden), .archetype-grid:not(.hidden), .stitch-options-empty-placeholder:not(.hidden))) { display: none; }
.new-app-hero-pill { display: inline-flex; align-items: center; gap: 6px; background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); padding: 4px 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--studio-accent-emerald); }
.new-app-heading { font-size: clamp(19px, 1.8vw, 22px); line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; color: var(--studio-text-primary); }
.new-app-subheading { font-size: 12.5px; color: var(--studio-text-secondary); line-height: 1.4; }
.idea-canvas-box { background-color: var(--studio-bg-surface); border: 1px solid rgba(59, 130, 246, 0.4); border-radius: var(--studio-radius-xl); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 0 24px -4px rgba(59, 130, 246, 0.25); transition: all var(--studio-transition-fast); width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; overflow: hidden; scroll-margin-bottom: 20px; }
.idea-canvas-box:focus-within { border-color: var(--studio-border-highlight); box-shadow: 0 0 30px rgba(59, 130, 246, 0.4); }
.idea-canvas-box.drag-over { border-color: var(--studio-accent-emerald); border-style: dashed; box-shadow: 0 0 32px rgba(16, 185, 129, 0.45); background-color: rgba(16, 185, 129, 0.05); }
.idea-box-header { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--studio-text-muted); text-transform: uppercase; font-weight: 700; border-bottom: 1px solid var(--studio-border-muted); padding-bottom: 8px; }
#new-app-prompt-input { width: 100%; min-height: 74px; background: transparent; border: 1.5px solid transparent; border-radius: var(--studio-radius-md); padding: 10px 12px; color: var(--studio-text-primary); font-family: inherit; font-size: 14px; line-height: 1.5; resize: vertical; outline: none; transition: border-color var(--studio-transition-fast), box-shadow var(--studio-transition-fast); box-sizing: border-box; }
#new-app-prompt-input:focus,
#new-app-prompt-input:focus-visible { border-color: rgba(59, 130, 246, 0.85); outline: none !important; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18) !important; }
#new-app-prompt-input::placeholder { color: var(--studio-text-muted); }
.idea-attached-files-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 4px 0; }
.attached-file-chip { display: inline-flex; align-items: center; gap: 6px; background-color: var(--studio-bg-card); border: 1px solid rgba(59, 130, 246, 0.4); border-radius: var(--studio-radius-full); padding: 4px 10px; font-size: 11.5px; color: var(--studio-text-primary); max-width: 100%; }
.attached-file-meta { color: var(--studio-text-muted); font-size: 10px; }
.attached-file-remove { background: none; border: none; color: var(--studio-text-muted); font-size: 14px; line-height: 1; cursor: pointer; padding: 0 2px; display: inline-flex; align-items: center; justify-content: center; transition: color var(--studio-transition-fast); }
.attached-file-remove:hover { color: #ef4444; }
.idea-box-actions { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--studio-border-muted); flex-wrap: wrap; gap: 10px; }
.idea-action-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.idea-action-btns > button,
.idea-action-btns > a,
#btn-open-spec-lab-from-kickoff,
#btn-open-voice-discovery-from-kickoff,
#btn-launch-stitch-screen,
#btn-new-app-speak,
#btn-new-app-enhance,
#btn-new-app-attach-file { white-space: nowrap; flex-shrink: 0; max-width: 100%; }
#btn-new-app-speak,
#btn-new-app-enhance,
#btn-new-app-attach-file { display: inline-flex; align-items: center; gap: 6px; background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--studio-text-primary); cursor: pointer; transition: all var(--studio-transition-fast); }
#btn-new-app-speak:hover,
#btn-new-app-enhance:hover,
#btn-new-app-attach-file:hover { background-color: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); }
#btn-new-app-enhance { background: linear-gradient( 135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2)); border-color: rgba(59, 130, 246, 0.4); }
.stitch-options-empty-placeholder { display: flex; align-items: center; gap: 16px; background-color: var(--studio-bg-surface); border: 1px dashed var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 24px 20px; margin-top: 8px; }
.stitch-empty-icon-wrap { width: 44px; height: 44px; border-radius: var(--studio-radius-md); background-color: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.archetype-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.archetype-card { background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 14px; cursor: pointer; transition: all var(--studio-transition-fast); display: flex; flex-direction: column; gap: 6px; position: relative; min-width: 0; max-width: 100%; box-sizing: border-box; }
.archetype-card:hover { border-color: var(--studio-border-highlight); transform: translateY(-2px); }
.archetype-card.selected { border: 2px solid var(--studio-accent-blue); background-color: var(--studio-bg-elevated); box-shadow: 0 0 20px rgba(59, 130, 246, 0.25); }
.archetype-card-top { display: flex; align-items: center; gap: 10px; }
.archetype-icon { width: 34px; height: 34px; border-radius: var(--studio-radius-md); background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); display: flex; align-items: center; justify-content: center; color: var(--studio-accent-blue-light); }
.archetype-card.selected .archetype-icon { color: #fff; background-color: var(--studio-accent-blue); }
.archetype-title { font-size: 13px; font-weight: 700; color: var(--studio-text-primary); }
.archetype-desc { font-size: 11px; color: var(--studio-text-secondary); line-height: 1.4; }
.new-app-stitch-step-badge { display: inline-flex; align-items: center; gap: 4px; background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.35); border-radius: var(--studio-radius-full); padding: 3px 10px; font-size: 11px; font-weight: 700; color: #34d399; transition: all var(--studio-transition-fast); }
.new-app-stitch-step-badge.status-loading,
#stitch-options-live-status[data-status=loading] { background: rgba(59, 130, 246, 0.15) !important; border-color: rgba(59, 130, 246, 0.4) !important; color: var(--studio-accent-blue-light) !important; }
.new-app-stitch-step-badge.status-fallback,
#stitch-options-live-status[data-status=fallback] { background: rgba(245, 158, 11, 0.12) !important; border-color: rgba(245, 158, 11, 0.4) !important; color: var(--studio-accent-amber) !important; }
.new-app-stitch-step-badge.status-synced,
#stitch-options-live-status[data-status=synced] { background: rgba(16, 185, 129, 0.16) !important; border-color: rgba(16, 185, 129, 0.5) !important; color: var(--studio-accent-emerald-light) !important; }
.new-app-stitch-step-badge.status-empty,
#stitch-options-live-status[data-status=empty] { background: rgba(100, 116, 139, 0.12) !important; border-color: var(--studio-border-subtle) !important; color: var(--studio-text-muted) !important; }
.archetype-badge { display: inline-block; font-size: 9px; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--studio-border-muted); }
.stitch-mini-pill { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); }
.stitch-option-card.selected .stitch-mini-pill { border-color: rgba(56, 189, 248, 0.35); color: var(--studio-text-primary); background: rgba(59, 130, 246, 0.12); }
@keyframes stitch-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.stitch-skeleton-shimmer { background: linear-gradient( 90deg, #111927 25%, #1e2c44 50%, #111927 75%); background-size: 200% 100%; animation: stitch-shimmer 1.5s infinite; }
.stitch-card-mini-preview { width: 100%; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.08); margin: 4px 0; min-height: 46px; transition: all var(--studio-transition-fast); }
.stitch-option-card.selected .stitch-card-mini-preview { border-color: rgba(56, 189, 248, 0.45); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.stitch-option-card.generating { border-color: var(--studio-accent-emerald) !important; box-shadow: 0 0 18px rgba(16, 185, 129, 0.28) !important; pointer-events: auto; }
.stitch-option-card.generating .stitch-card-mini-preview { height: 46px !important; min-height: 46px !important; max-height: 46px !important; background: linear-gradient( 90deg, #111927 25%, #1e2c44 50%, #111927 75%) !important; background-size: 200% 100% !important; animation: stitch-shimmer 1.5s infinite !important; border-color: rgba(16, 185, 129, 0.35) !important; }
.stitch-option-card[data-source=local-nlp].selected { border-color: var(--studio-accent-amber) !important; box-shadow: 0 0 16px rgba(245, 158, 11, 0.25) !important; }
.stitch-option-card[data-source=local-nlp].selected .stitch-card-mini-preview { border-color: rgba(245, 158, 11, 0.45); }
.stitch-option-card[data-source=local-nlp].selected .stitch-mini-pill { border-color: rgba(245, 158, 11, 0.35); color: #fbbf24; background: rgba(245, 158, 11, 0.12); }
.btn-loading-spinner { display: inline-block; animation: studio-spin 1s linear infinite; }
#btn-generate-4-stitch-options.is-generating { opacity: 0.85; cursor: wait !important; background: var(--studio-bg-card) !important; border-color: var(--studio-border-highlight) !important; color: var(--studio-text-secondary) !important; }
.stitch-option-card:focus-visible,
#btn-generate-4-stitch-options:focus-visible,
#btn-new-app-attach-file:focus-visible,
#stitch-options-live-status:focus-visible,
.stitch-variant-pill:focus-visible,
.stitch-feedback-chip:focus-visible { outline: 2px solid var(--studio-border-focus-ring) !important; outline-offset: 2px !important; box-shadow: var(--studio-focus-glow) !important; }
.vibe-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.vibe-card { background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 10px; cursor: pointer; transition: all var(--studio-transition-fast); display: flex; flex-direction: column; gap: 6px; min-width: 0; box-sizing: border-box; }
.vibe-card:hover { border-color: var(--studio-border-highlight); }
.vibe-card.selected { border: 2px solid var(--studio-accent-blue); background-color: var(--studio-bg-elevated); box-shadow: 0 0 16px rgba(59, 130, 246, 0.25); }
.vibe-swatch { height: 44px; border-radius: var(--studio-radius-sm); display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--studio-border-muted); }
.vibe-title { font-size: 11px; font-weight: 700; color: var(--studio-text-primary); }
.new-app-right-pane { order: 1; display: flex; flex-direction: column; gap: 10px; position: static; top: auto; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
.architect-card { background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-xl); padding: 10px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); position: relative; overflow: hidden; min-width: 0; max-width: 100%; box-sizing: border-box; }
.architect-topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.architect-header { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.architect-avatar-ring { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--studio-accent-emerald); padding: 2px; position: relative; }
.architect-avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background-color: var(--studio-bg-card); }
.architect-speech-bubble { flex: 1 1 360px; min-width: 0; background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); border-top-left-radius: 2px; padding: 8px 12px; font-size: 12px; color: var(--studio-text-primary); line-height: 1.45; }
#live-blueprint-card { background-color: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 100%; box-sizing: border-box; }
.blueprint-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--studio-border-muted); padding-bottom: 6px; }
#blueprint-app-title { font-size: 15px; font-weight: 700; color: var(--studio-text-primary); }
#blueprint-app-category { font-size: 11px; color: var(--studio-accent-emerald); }
#blueprint-screens-list { display: flex; flex-direction: column; gap: 6px; }
.blueprint-screen-item { display: flex; align-items: center; justify-content: space-between; background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-muted); border-radius: var(--studio-radius-md); padding: 8px 10px; font-size: 12px; color: var(--studio-text-primary); }
.stitch-preview-container { display: flex; flex-direction: column; gap: 10px; }
.stitch-preview-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; -webkit-overflow-scrolling: touch; gap: 8px; box-sizing: border-box; width: 100%; }
.stitch-preview-toolbar::-webkit-scrollbar { height: 4px; }
.stitch-preview-toolbar::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.4); }
.stitch-preview-toolbar::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.4); border-radius: 2px; }
.stitch-preview-toolbar-title { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--studio-text-primary); flex-shrink: 0; white-space: nowrap; }
.stitch-preview-toolbar-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; white-space: nowrap; }
.stitch-btn-secondary { display: inline-flex; align-items: center; gap: 4px; background: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 4px 8px; font-size: 11px; font-weight: 600; color: var(--studio-text-secondary); cursor: pointer; transition: all var(--studio-transition-fast); }
.stitch-btn-secondary:hover { background: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); color: var(--studio-text-primary); }
.stitch-variant-pills-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stitch-variant-pill { background: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 6px 4px; font-size: 10.5px; font-weight: 600; color: var(--studio-text-secondary); text-align: center; cursor: pointer; transition: all var(--studio-transition-fast); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stitch-variant-pill:hover { color: var(--studio-text-primary); border-color: var(--studio-border-highlight); }
.stitch-variant-pill.active { background: var(--studio-bg-card); border-color: var(--studio-accent-emerald); color: #34d399; box-shadow: 0 0 10px rgba(16, 185, 129, 0.25); font-weight: 700; }
.stitch-variant-pill.multiscreen-mode { font-family: var(--studio-font-mono); font-size: 11px; padding: 6px 8px; background: rgba(139, 92, 246, 0.08); border-color: rgba(139, 92, 246, 0.3); color: #c4b5fd; }
.stitch-variant-pill.multiscreen-mode:hover { background: rgba(139, 92, 246, 0.16); border-color: var(--studio-accent-violet); color: #ffffff; }
.stitch-variant-pill.multiscreen-mode.active { background: rgba(139, 92, 246, 0.25); border-color: var(--studio-accent-violet); color: #ffffff; box-shadow: 0 0 12px rgba(139, 92, 246, 0.35); }
#new-app-stitch-tab-strip { width: 100%; max-width: 100%; flex-wrap: wrap; padding: 8px 12px; border-radius: var(--studio-radius-md); border: 1px solid var(--studio-border-subtle); }
#new-app-stitch-tab-strip .stitch-preview-tab-btn { min-height: 34px; padding: 6px 14px; }
.stitch-preview-iframe-wrapper { position: relative; width: 100%; height: clamp(420px, 49vh, 660px); border-radius: var(--studio-radius-lg); overflow: hidden; border: 1px solid var(--studio-border-subtle); background: #080c14; }
#new-app-stitch-preview-frame { width: 100%; height: 100%; border: none; display: block; background: #080c14; }
.stitch-preview-loading { position: absolute; inset: 0; background: rgba(8, 12, 20, 0.85); backdrop-filter: blur(4px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--studio-text-secondary); z-index: 10; }
.stitch-preview-empty-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; background: #080c14; z-index: 5; }
.stitch-feedback-section { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--studio-border-muted); padding-top: 8px; }
.stitch-feedback-label { font-size: 11px; font-weight: 700; color: var(--studio-text-secondary); display: flex; align-items: center; gap: 4px; }
.stitch-feedback-chips-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.stitch-feedback-chip { background: var(--studio-bg-surface); border: 1px dashed var(--studio-border-subtle); border-radius: var(--studio-radius-full); padding: 3px 8px; font-size: 10px; font-weight: 600; color: var(--studio-accent-blue-light); cursor: pointer; transition: all var(--studio-transition-fast); }
.stitch-feedback-chip:hover { border-color: var(--studio-accent-emerald); color: var(--studio-accent-emerald); background: rgba(16, 185, 129, 0.08); }
.stitch-feedback-input-row { display: flex; gap: 6px; }
#new-app-stitch-feedback-input { flex: 1; background: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 7px 10px; font-size: 11.5px; color: var(--studio-text-primary); outline: none; transition: border-color var(--studio-transition-fast); }
#new-app-stitch-feedback-input:focus { border-color: var(--studio-border-highlight); }
#btn-apply-stitch-feedback { background: linear-gradient( 135deg, #0ea5e9, #10b981); border: none; border-radius: var(--studio-radius-md); color: #fff; font-size: 11px; font-weight: 700; padding: 0 12px; cursor: pointer; white-space: nowrap; transition: filter var(--studio-transition-fast); }
#btn-apply-stitch-feedback:hover { filter: brightness(1.1); }
.stitch-feedback-tags-container { display: flex; flex-wrap: wrap; gap: 6px; min-height: 4px; }
.stitch-feedback-tag { display: inline-flex; align-items: center; gap: 6px; background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.35); border-radius: var(--studio-radius-full); padding: 2px 8px; font-size: 10.5px; color: #34d399; font-weight: 600; }
.stitch-feedback-tag-remove { background: none; border: none; color: #34d399; font-size: 13px; line-height: 1; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.blueprint-features-strip { border-top: 1px solid var(--studio-border-muted); padding-top: 8px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; }
.blueprint-features-heading { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--studio-text-muted); white-space: nowrap; }
.blueprint-features-list { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px 16px; font-size: 11px; color: var(--studio-text-secondary); }
.stitch-kickoff-controls-bar { display: grid; grid-template-columns: minmax(250px, 1.15fr) minmax(250px, 1fr) minmax(280px, 1.15fr); gap: 12px; align-items: stretch; width: 100%; min-width: 0; }
.stitch-kickoff-controls-bar #studio-engine-selector-card { padding: 8px 12px !important; margin-bottom: 0; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; }
.stitch-kickoff-controls-bar .engine-option-card { padding: 6px 10px; }
.stitch-kickoff-controls-bar .right-pane-hitl-summary { margin-bottom: 0; height: 100%; box-sizing: border-box; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding: 8px 12px; border-radius: 12px; }
.stitch-kickoff-controls-bar #btn-kickoff-build { padding: 11px 16px; font-size: 14px; }
.right-pane-hitl-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 100%; }
.stitch-kickoff-cta-wrap { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
#btn-kickoff-build { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; background: linear-gradient( 135deg, #1d4ed8, #00a572); border: none; border-radius: var(--studio-radius-lg); padding: 14px 20px; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 0 0 24px rgba(16, 185, 129, 0.35); transition: all var(--studio-transition-fast); }
#btn-kickoff-build:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 0 30px rgba(16, 185, 129, 0.5); }
#btn-kickoff-build:disabled,
#btn-generate-4-stitch-options:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
#studio-executive-workspace { flex: 1; height: 100%; overflow-y: auto; background-color: var(--studio-bg-root); padding: 24px; display: none; flex-direction: column; gap: 24px; }
#studio-executive-workspace.active { display: flex; }
.exec-header-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.exec-title-group h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--studio-text-primary); }
.exec-title-group p { font-size: 13px; color: var(--studio-text-secondary); }
.exec-header-actions { display: flex; align-items: center; gap: 10px; }
#studio-exec-session-select { background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); color: var(--studio-text-primary); padding: 7px 12px; font-size: 13px; outline: none; cursor: pointer; }
#btn-export-exec-pdf,
#btn-open-print-report { display: inline-flex; align-items: center; gap: 6px; background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--studio-text-primary); cursor: pointer; transition: all var(--studio-transition-fast); }
#btn-export-exec-pdf:hover,
#btn-open-print-report:hover { background-color: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); }
.exec-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.exec-kpi-card { background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
.exec-kpi-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--studio-text-muted); }
.exec-kpi-value { font-size: 24px; font-weight: 800; color: var(--studio-text-primary); letter-spacing: -0.02em; }
.exec-kpi-sub { font-size: 11px; color: var(--studio-accent-emerald); font-weight: 600; }
.exec-narrative-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.exec-narrative-card { background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.narrative-title { font-size: 15px; font-weight: 700; color: var(--studio-text-primary); display: flex; align-items: center; gap: 8px; }
.narrative-body { font-size: 13px; color: var(--studio-text-secondary); line-height: 1.55; }
.narrative-story { display: flex; flex-direction: column; gap: 10px; }
.narrative-story-beat { padding: 9px 12px; border-left: 2px solid var(--studio-accent-emerald); background: rgba(22, 32, 50, 0.55); border-radius: 0 var(--studio-radius-sm) var(--studio-radius-sm) 0; }
.narrative-story-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--studio-accent-emerald-light); margin-bottom: 3px; }
.narrative-story-text { margin: 0; font-size: 13px; line-height: 1.55; color: #cbd5e1; }
.narrative-highlights { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.narrative-highlight-item { font-size: 12px; line-height: 1.45; color: var(--studio-accent-blue-light); display: flex; align-items: flex-start; gap: 8px; }
.narrative-highlight-item .material-symbols-outlined { margin-top: 2px; flex-shrink: 0; }
.narrative-highlight-label { font-weight: 700; color: var(--studio-text-primary); }
.narrative-highlight-value { color: #bfdbfe; }
.exec-charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.exec-chart-card { background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.chart-card-title { font-size: 14px; font-weight: 700; color: var(--studio-text-primary); }
.exec-svg-chart-container { width: 100%; height: 220px; position: relative; }
.exec-deliverables-section { display: flex; flex-direction: column; gap: 12px; }
.exec-deliverables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.exec-deliverable-item { background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: all var(--studio-transition-fast); }
.exec-deliverable-item:hover { border-color: var(--studio-border-highlight); background-color: var(--studio-bg-elevated); }
#studio-preview-modal { position: fixed; inset: 0; width: 100vw; height: 100vh; background-color: var(--studio-bg-overlay); backdrop-filter: blur(12px); border: none; z-index: 120; display: none; align-items: center; justify-content: center; padding: 24px; }
#studio-preview-modal.open { display: flex; }
.preview-modal-dialog { width: 100%; max-width: 1100px; height: 90vh; background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-xl); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8); }
.preview-modal-header { padding: 12px 20px; border-bottom: 1px solid var(--studio-border-subtle); background-color: rgba(15, 22, 36, 0.95); display: flex; align-items: center; justify-content: space-between; }
.preview-modal-title { font-size: 15px; font-weight: 700; color: var(--studio-text-primary); display: flex; align-items: center; gap: 8px; }
.preview-device-switch { display: inline-flex; align-items: center; background-color: var(--studio-bg-card); border-radius: var(--studio-radius-full); padding: 2px; }
.preview-device-btn { padding: 4px 10px; border-radius: var(--studio-radius-full); border: none; background: transparent; color: var(--studio-text-muted); font-size: 11px; font-weight: 600; cursor: pointer; }
.preview-device-btn.active { background-color: var(--studio-bg-elevated); color: var(--studio-accent-blue-light); }
.preview-modal-body { flex: 1; background-color: var(--studio-bg-root); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; padding: 14px 20px 20px; }
#stitch-preview-tab-strip { width: 100%; flex-shrink: 0; }
#preview-frame-container { width: 100%; flex: 1; min-height: 0; height: 100%; display: flex; align-items: center; justify-content: center; transition: max-width 0.3s ease; }
#preview-frame-container.mobile { max-width: 390px; border: 4px solid var(--studio-border-subtle); border-radius: 28px; overflow: hidden; box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8); }
#preview-frame-container.tablet { max-width: 768px; border: 4px solid var(--studio-border-subtle); border-radius: 20px; overflow: hidden; }
#preview-frame-container.desktop { max-width: 100%; border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); overflow: hidden; }
#studio-preview-iframe { width: 100%; height: 100%; border: none; background-color: #fff; }
@keyframes studio-ping {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}
@keyframes studio-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.96); }
}
@keyframes studio-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@media (max-width: 1200px) {
  .vibe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .new-app-main-grid { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 24px; }
}
@media (max-width: 1180px) {
  #studio-console-aside { width: 320px; min-width: 320px; }
  #studio-agent-drawer { width: 340px; min-width: 340px; }
  .exec-narrative-grid,
  .exec-charts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .stitch-kickoff-controls-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stitch-kickoff-cta-wrap { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .new-app-main-grid { display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 24px; }
  .new-app-right-pane { position: static; top: 0; }
  .archetype-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  #studio-console-aside { position: absolute; left: 0; top: 0; bottom: 0; box-shadow: 4px 0 24px rgba(0, 0, 0, 0.8); }
  #studio-agent-drawer { position: absolute; right: 0; top: 0; bottom: 0; box-shadow: -4px 0 24px rgba(0, 0, 0, 0.8); }
}
@media (max-width: 768px) {
  .new-app-topbar-spacer { display: none; }
  .stitch-preview-toolbar { flex-wrap: wrap; overflow-x: visible; gap: 6px; }
  .stitch-preview-toolbar-title { white-space: normal; }
  .stitch-preview-toolbar-actions { flex-wrap: wrap; }
  .stitch-preview-iframe-wrapper { height: clamp(300px, 46vh, 460px); }
  .architect-topbar-row { flex-direction: column; align-items: stretch; }
  #blueprint-architect-speech { flex: 1 1 auto; }
  .stitch-kickoff-controls-bar { grid-template-columns: 1fr; }
  .idea-box-actions { flex-direction: column; align-items: stretch; }
  .idea-action-btns { width: 100%; }
  .idea-action-btns > button,
  .idea-action-btns > a,
  #btn-open-spec-lab-from-kickoff,
  #btn-open-voice-discovery-from-kickoff,
  #btn-launch-stitch-screen,
  #btn-new-app-speak,
  #btn-new-app-enhance,
  #btn-new-app-attach-file { white-space: normal; text-align: center; }
  .new-app-topbar-pill { max-width: 100%; }
}
@media (max-width: 600px) {
  .archetype-grid { grid-template-columns: 1fr; }
  .vibe-grid { grid-template-columns: 1fr; }
}
@media (pointer: coarse), (max-width: 768px) {
  .studio-toggle-btn,
  .stage-step-pill,
  .studio-suggestion-pill,
  #btn-studio-new-app,
  #btn-studio-preview-app,
  #btn-open-preview,
  #btn-approve-stage,
  #btn-kickoff-build,
  #btn-console-send,
  #btn-console-mic { min-height: 44px; min-width: 44px; }
  #studio-console-input { font-size: 16px; }
}
.agent-node-card.orchestrator-hub { background: linear-gradient( 135deg, rgba(16, 185, 129, 0.22), rgba(15, 23, 42, 0.96)); border: 2px solid #10b981; box-shadow: 0 0 24px rgba(16, 185, 129, 0.35); }
.agent-node-card.up-next { border: 1px dashed rgba(245, 158, 11, 0.65); opacity: 0.92; }
.agent-node-badge.hub { background: rgba(16, 185, 129, 0.25); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.55); }
.agent-node-badge.up-next { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.45); }
.studio-flow-dispatch-beam { stroke-dasharray: 8 5; animation: studio-flow 0.75s linear infinite; }
.agent-question-box { background: linear-gradient( 135deg, rgba(245, 158, 11, 0.14), rgba(59, 130, 246, 0.14)); border: 1.5px solid rgba(245, 158, 11, 0.6); border-radius: 12px; padding: 11px 12px; margin-bottom: 12px; box-shadow: 0 0 20px rgba(245, 158, 11, 0.18); display: flex; flex-direction: column; gap: 8px; }
#console-active-question-banner .agent-question-box { margin: 8px 12px 4px 12px; }
.agent-question-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.agent-question-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #fbbf24; background: rgba(245, 158, 11, 0.2); border: 1px solid rgba(245, 158, 11, 0.45); padding: 2px 8px; border-radius: 9999px; }
.agent-question-text { font-size: 12px; font-weight: 700; color: var(--studio-text-primary); line-height: 1.4; }
.agent-question-options { display: flex; flex-direction: column; gap: 5px; }
.agent-quick-answer-btn { text-align: left; background: rgba(15, 23, 42, 0.85); border: 1px solid rgba(59, 130, 246, 0.4); border-radius: 8px; padding: 6px 10px; font-size: 11px; font-weight: 600; color: #e2e8f0; cursor: pointer; transition: all 0.15s ease; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.agent-quick-answer-btn:hover { background: rgba(16, 185, 129, 0.2); border-color: #10b981; color: #ffffff; }
#drawer-live-activity-section { background: rgba(15, 22, 36, 0.75); border: 1px solid rgba(16, 185, 129, 0.32); border-radius: 12px; padding: 10px 11px; margin-bottom: 4px; }
.drawer-auto-pill { font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 9999px; border: 1px solid var(--studio-border-subtle); background: var(--studio-bg-card); color: var(--studio-text-secondary); cursor: pointer; }
.drawer-auto-pill.active { background: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.45); color: #34d399; }
.drawer-live-activity-feed { display: flex; flex-direction: column; gap: 6px; max-height: 165px; overflow-y: auto; }
.drawer-activity-item { background: rgba(22, 32, 50, 0.9); border-left: 3px solid #10b981; border-radius: 6px; padding: 6px 8px; font-size: 11px; line-height: 1.35; color: var(--studio-text-primary); }
.drawer-activity-item.question { border-left-color: #f59e0b; }
.drawer-activity-meta { display: flex; align-items: center; justify-content: space-between; font-size: 9.5px; color: var(--studio-text-muted); margin-bottom: 2px; font-weight: 700; }
.hidden { display: none !important; }
#studio-version-badge { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald-light); border-radius: 9999px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 14px; font-family: var(--studio-font-mono); font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all var(--studio-transition-fast); white-space: nowrap; }
#studio-version-badge:hover { background: rgba(16, 185, 129, 0.25); border-color: var(--studio-accent-emerald); box-shadow: 0 0 12px rgba(16, 185, 129, 0.35); transform: translateY(-1px); }
#studio-version-badge .version-dot { width: 8px; height: 8px; border-radius: 50%; background-color: var(--studio-accent-emerald); box-shadow: 0 0 6px var(--studio-accent-emerald); }
#studio-version-badge .version-caret { font-size: 11px; opacity: 0.8; }
#studio-github-status-pill,
.studio-github-pill { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; max-width: 96px; overflow: hidden; text-overflow: ellipsis; padding: 2px 6px; background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); color: var(--studio-text-primary); font-size: 10px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast); white-space: nowrap; }
#studio-github-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; display: inline-block; }
#studio-github-status-pill:hover,
.studio-github-pill:hover { background-color: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); transform: translateY(-1px); }
.github-status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.github-status-dot.connected,
.github-status-dot.synced { background-color: var(--studio-accent-emerald); box-shadow: 0 0 8px var(--studio-accent-emerald); }
.github-status-dot.local { background-color: var(--studio-accent-amber); box-shadow: 0 0 6px var(--studio-accent-amber); }
.github-status-dot.failed { background-color: var(--studio-accent-rose); box-shadow: 0 0 6px var(--studio-accent-rose); }
#studio-user-profile-pill,
.studio-profile-pill { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 2px 6px; max-width: 106px; overflow: hidden; background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); color: var(--studio-text-primary); font-size: 10px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast); white-space: nowrap; }
#studio-user-label { max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
#studio-user-profile-pill:hover,
.studio-profile-pill:hover { background-color: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); transform: translateY(-1px); }
.profile-avatar { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient( 135deg, var(--studio-accent-blue), var(--studio-accent-violet)); color: #ffffff; font-size: 9.5px; font-weight: 700; }
#studio-build-audit-modal,
.studio-modal-backdrop { position: fixed; inset: 0; background: var(--studio-bg-overlay); backdrop-filter: blur(8px); z-index: 999; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.studio-modal-backdrop.hidden { display: none !important; }
#studio-onboarding-modal { position: fixed; inset: 0; background: var(--studio-bg-overlay); z-index: 999; display: flex; align-items: center; justify-content: center; }
#studio-onboarding-modal.hidden { display: none !important; }
#studio-release-history-modal { position: fixed; inset: 0; background: var(--studio-bg-overlay); z-index: 999; display: flex; align-items: center; justify-content: center; }
#studio-release-history-modal.hidden { display: none !important; }
.studio-modal-dialog { background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-xl); box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px var(--studio-border-subtle); width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; padding: 24px; gap: 20px; }
.release-history-dialog { max-width: 780px; }
.studio-modal-header { display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--studio-border-subtle); padding-bottom: 16px; gap: 12px; }
.studio-modal-title { font-size: 18px; font-weight: 700; color: var(--studio-text-primary); margin: 0; }
.onboard-step-indicator { font-size: 12px; font-weight: 700; color: var(--studio-accent-emerald-light); background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.35); border-radius: var(--studio-radius-full); padding: 3px 10px; display: inline-block; }
.onboard-status-banner { padding: 10px 14px; border-radius: var(--studio-radius-md); font-size: 13px; line-height: 1.4; }
.onboard-status-banner.info { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.4); color: var(--studio-accent-blue-light); }
.onboard-status-banner.success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald-light); }
.onboard-status-banner.error { background: rgba(244, 63, 94, 0.15); border: 1px solid rgba(244, 63, 94, 0.4); color: #fb7185; }
.onboard-step-body { display: flex; flex-direction: column; gap: 16px; }
.btn-oauth { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 18px; border-radius: var(--studio-radius-lg); font-size: 14px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast); border: 1px solid var(--studio-border-subtle); width: 100%; }
.btn-oauth-google { background-color: #ffffff; color: #1f2937; }
.btn-oauth-google:hover { background-color: #f3f4f6; transform: translateY(-1px); }
.btn-oauth-github { background-color: #24292f; color: #ffffff; border-color: #444c56; }
.btn-oauth-github:hover { background-color: #2f363d; transform: translateY(-1px); }
.onboard-divider-row { display: flex; align-items: center; gap: 12px; color: var(--studio-text-muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; }
.onboard-divider-row::before,
.onboard-divider-row::after { content: ""; flex: 1; height: 1px; background-color: var(--studio-border-subtle); }
.onboard-input-group { display: flex; flex-direction: column; gap: 6px; }
.onboard-input-group label { font-size: 12px; font-weight: 600; color: var(--studio-text-secondary); }
.onboard-input-group input { min-height: 44px; background-color: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 10px 14px; color: var(--studio-text-primary); font-size: 13.5px; outline: none; }
.onboard-input-group input:focus { border-color: var(--studio-border-focus-ring); box-shadow: var(--studio-focus-glow); }
.onboard-org-summary-badge { background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 10px 14px; font-size: 13px; color: var(--studio-text-secondary); }
.onboard-org-summary-badge strong { color: var(--studio-accent-emerald-light); }
.github-masked-hint-badge { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); border-radius: var(--studio-radius-md); padding: 8px 12px; font-size: 12px; color: var(--studio-accent-emerald-light); font-family: var(--studio-font-mono); }
.btn-primary-action { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; background: linear-gradient( 135deg, var(--studio-accent-emerald), var(--studio-accent-emerald-container)); color: #080c14; font-weight: 700; font-size: 13.5px; border-radius: var(--studio-radius-md); border: none; cursor: pointer; transition: all var(--studio-transition-fast); }
.btn-primary-action:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-secondary-action { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); font-weight: 600; font-size: 13px; border-radius: var(--studio-radius-md); cursor: pointer; transition: all var(--studio-transition-fast); }
.btn-secondary-action:hover { background: var(--studio-bg-card-hover); color: var(--studio-text-primary); }
#btn-onboard-signout,
.studio-btn-secondary { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); color: var(--studio-text-secondary); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast); }
#btn-onboard-signout:hover,
.studio-btn-secondary:hover { background: rgba(244, 63, 94, 0.12); border-color: rgba(244, 63, 94, 0.4); color: #fb7185; }
.connected-status-card { display: flex; flex-direction: column; gap: 14px; background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 16px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
.connected-status-card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.connected-state-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--studio-accent-emerald-light); background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.35); border-radius: var(--studio-radius-full); padding: 3px 10px; }
.connected-state-workspace-pill,
.connected-state-sync-pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; color: var(--studio-text-secondary); background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); padding: 3px 9px; }
.connected-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--studio-accent-emerald); box-shadow: 0 0 6px var(--studio-accent-emerald); }
.connected-user-row { display: flex; align-items: center; gap: 12px; background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 12px 14px; }
.connected-avatar-circle { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient( 135deg, var(--studio-accent-blue), var(--studio-accent-emerald)); color: #ffffff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex-shrink: 0; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.connected-user-meta { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.connected-user-name { font-weight: 700; font-size: 14px; color: var(--studio-text-primary); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.connected-user-email { font-size: 12.5px; color: var(--studio-text-secondary); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.connected-sub-status-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 10px 14px; }
.connected-sub-status-info { display: flex; align-items: center; gap: 10px; }
.connected-actions-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.connected-github-handle-row { display: flex; align-items: center; gap: 12px; background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 12px 14px; color: var(--studio-text-primary); }
.connected-github-meta { font-size: 12px; color: var(--studio-text-secondary); margin-top: 2px; }
.btn-danger-outline { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; background: rgba(244, 63, 94, 0.08); border: 1px solid rgba(244, 63, 94, 0.4); color: #fb7185; font-weight: 600; font-size: 13px; border-radius: var(--studio-radius-md); cursor: pointer; transition: all var(--studio-transition-fast); }
.btn-danger-outline:hover { background: rgba(244, 63, 94, 0.18); border-color: rgba(244, 63, 94, 0.65); color: #ffffff; }
.release-modal-header-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; }
.release-modal-project-name { font-size: 14px; font-weight: 700; color: var(--studio-text-primary); }
.studio-version-badge-pill { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald-light); padding: 3px 8px; border-radius: 9999px; font-family: var(--studio-font-mono); font-weight: 700; font-size: 11px; }
.release-modal-github-link { color: var(--studio-accent-blue-light); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.release-modal-github-link:hover { text-decoration: underline; }
.release-link-repo-row { display: flex; gap: 8px; align-items: center; background: var(--studio-bg-card); padding: 12px; border-radius: var(--studio-radius-md); border: 1px solid var(--studio-border-subtle); }
.release-link-repo-row input { flex: 1; min-height: 40px; background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-sm); padding: 6px 12px; color: var(--studio-text-primary); font-size: 12.5px; outline: none; }
.modal-iteration-bar { display: flex; gap: 8px; align-items: center; background: var(--studio-bg-card); padding: 12px; border-radius: var(--studio-radius-md); border: 1px solid var(--studio-border-subtle); flex-wrap: wrap; }
.modal-iteration-bar input { flex: 1; min-height: 44px; min-width: 240px; background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-sm); padding: 8px 12px; color: var(--studio-text-primary); font-size: 13px; outline: none; }
.modal-iteration-bar select { min-height: 44px; background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-sm); padding: 8px 12px; color: var(--studio-text-primary); font-size: 12px; outline: none; }
.studio-release-timeline-list { display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.release-timeline-card { background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; transition: all var(--studio-transition-fast); }
.release-timeline-card:hover { border-color: var(--studio-border-highlight); background: var(--studio-bg-card-hover); }
.release-timeline-card.active-release { border-color: var(--studio-accent-emerald); box-shadow: 0 0 16px -4px rgba(16, 185, 129, 0.35); }
.release-card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.release-card-title-group { display: flex; align-items: center; gap: 8px; }
.release-version-pill { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald-light); font-family: var(--studio-font-mono); font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 9999px; }
.release-type-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; }
.release-type-badge.initial { background: rgba(59, 130, 246, 0.15); color: var(--studio-accent-blue-light); border: 1px solid rgba(59, 130, 246, 0.35); }
.release-type-badge.enhancement { background: rgba(139, 92, 246, 0.15); color: var(--studio-accent-violet-light); border: 1px solid rgba(139, 92, 246, 0.35); }
.release-type-badge.bugfix { background: rgba(245, 158, 11, 0.15); color: var(--studio-accent-amber); border: 1px solid rgba(245, 158, 11, 0.35); }
.release-semver { font-size: 11.5px; color: var(--studio-text-muted); font-family: var(--studio-font-mono); }
.release-card-actions { display: flex; align-items: center; gap: 6px; }
.release-card-summary { font-size: 13px; color: var(--studio-text-secondary); line-height: 1.4; }
.release-card-meta { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--studio-text-muted); }
.release-current-tag { font-size: 11px; font-weight: 700; color: var(--studio-accent-emerald-light); padding: 4px 8px; }
.btn-restore { min-height: 44px; padding: 6px 12px; border-radius: var(--studio-radius-sm); background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); color: var(--studio-accent-amber); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: all var(--studio-transition-fast); }
.btn-restore:hover { background: rgba(245, 158, 11, 0.15); border-color: var(--studio-accent-amber); }
#studio-rollback-confirm-modal { position: fixed; inset: 0; background: var(--studio-bg-overlay); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; transition: opacity var(--studio-transition-fast); }
#studio-rollback-confirm-modal.hidden { display: none !important; opacity: 0; pointer-events: none; }
.rollback-confirm-overlay { position: fixed; inset: 0; background: var(--studio-bg-overlay); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 1000; }
.rollback-confirm-dialog { background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-xl); box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--studio-border-subtle); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; padding: 24px; gap: 16px; transform: scale(1); transition: transform var(--studio-transition-fast), opacity var(--studio-transition-fast); }
.rollback-modal-title-group { display: flex; align-items: center; gap: 12px; }
.rollback-warning-badge { width: 40px; height: 40px; min-width: 40px; border-radius: var(--studio-radius-md); background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.4); color: var(--studio-accent-amber); display: flex; align-items: center; justify-content: center; box-shadow: var(--studio-accent-amber-glow); }
.rollback-modal-subtitle { display: block; font-size: 11.5px; color: var(--studio-text-secondary); font-weight: 500; margin-top: 2px; }
.rollback-intro-text { font-size: 13.5px; color: var(--studio-text-secondary); line-height: 1.5; margin: 0 0 14px 0; }
.rollback-intro-text strong { color: var(--studio-text-primary); font-weight: 700; }
.rollback-version-transition-card,
.rollback-transition-card { display: flex; align-items: center; justify-content: space-between; background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 14px 18px; margin-bottom: 14px; gap: 12px; }
.version-step { display: flex; flex-direction: column; gap: 4px; }
.version-step-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; color: var(--studio-text-muted); }
.version-step-badge { font-family: var(--studio-font-mono); font-size: 13px; font-weight: 700; color: var(--studio-text-secondary); background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); padding: 4px 10px; border-radius: var(--studio-radius-sm); display: inline-flex; align-items: center; gap: 4px; }
.version-step.target .version-step-badge,
.version-step-badge.target { color: var(--studio-accent-emerald-light); background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 0 10px rgba(16, 185, 129, 0.25); }
.version-step-arrow { color: var(--studio-accent-amber); display: flex; align-items: center; justify-content: center; }
.rollback-release-summary { background: var(--studio-bg-elevated); border-left: 3px solid var(--studio-accent-amber); border-radius: 0 var(--studio-radius-md) var(--studio-radius-md) 0; padding: 10px 14px; font-size: 12.5px; line-height: 1.45; color: var(--studio-text-secondary); margin-bottom: 14px; }
.rollback-release-summary.hidden { display: none !important; }
.rollback-impact-box { display: flex; flex-direction: column; gap: 10px; background: rgba(8, 12, 20, 0.65); border: 1px solid var(--studio-border-muted); border-radius: var(--studio-radius-md); padding: 12px 14px; }
.impact-item { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; line-height: 1.45; color: var(--studio-text-secondary); }
.impact-item strong { color: var(--studio-text-primary); font-weight: 600; }
.impact-item code { font-family: var(--studio-font-mono); font-size: 11px; background: rgba(255, 255, 255, 0.06); padding: 1px 4px; border-radius: 3px; color: var(--studio-text-primary); }
.impact-icon { font-size: 16px !important; flex-shrink: 0; margin-top: 2px; }
.impact-icon.text-amber { color: var(--studio-accent-amber); }
.impact-icon.text-blue { color: var(--studio-accent-blue-light); }
.impact-icon.text-emerald { color: var(--studio-accent-emerald-light); }
.studio-modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--studio-border-subtle); padding-top: 16px; margin-top: 4px; }
.btn-rollback-cancel,
.btn-secondary-action { min-height: 44px; min-width: 44px; padding: 10px 18px; border-radius: var(--studio-radius-md); background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-primary); font-weight: 600; font-size: 13px; cursor: pointer; transition: all var(--studio-transition-fast); display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn-rollback-cancel:hover,
.btn-secondary-action:hover { background: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); }
.btn-rollback-confirm,
.btn-primary-action.btn-rollback-confirm { min-height: 44px; min-width: 44px; padding: 10px 20px; border-radius: var(--studio-radius-md); background: linear-gradient( 135deg, #f59e0b, #f43f5e); border: none; color: #080c14; font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: 0 0 16px -2px rgba(245, 158, 11, 0.4); transition: all var(--studio-transition-fast); display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn-rollback-confirm:hover,
.btn-primary-action.btn-rollback-confirm:hover { filter: brightness(1.1); box-shadow: 0 0 20px rgba(244, 63, 94, 0.5); }
.btn-rollback-confirm:disabled,
.btn-rollback-cancel:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.btn-rollback-cancel:focus-visible,
.btn-rollback-confirm:focus-visible,
#btn-close-rollback-modal:focus-visible { outline: 2px solid var(--studio-border-focus-ring) !important; outline-offset: 2px !important; box-shadow: var(--studio-focus-glow) !important; }
@media (max-width: 767px) {
  .rollback-confirm-dialog { max-width: 100%; border-radius: var(--studio-radius-lg); padding: 18px 16px; }
  .studio-modal-footer { flex-direction: column-reverse; gap: 8px; }
  .btn-rollback-cancel,
  .btn-rollback-confirm { width: 100%; min-height: 44px; }
}
/* frontend/css/studio/spec-lab.css */
#studio-spec-lab-workspace { width: 100vw; height: calc(100vh - 56px); overflow: hidden; background-color: var(--studio-bg-root); color: var(--studio-text-primary); font-family: var(--studio-font-sans); position: relative; z-index: 10; }
#studio-spec-lab-workspace.spec-lab-workspace-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: auto auto auto 1fr; width: 100vw; height: calc(100vh - 56px); overflow: hidden; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
#spec-lab-header { grid-column: span 12 / span 12; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 18px; background-color: var(--studio-bg-surface); border-bottom: 1px solid var(--studio-border-subtle); min-height: 44px; z-index: 15; }
.spec-lab-header-left { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; }
.spec-lab-header-title { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.spec-lab-session-title-wrap { display: inline-flex; align-items: center; flex: 0 1 200px; max-width: 220px; min-width: 130px; }
.spec-lab-title-input { width: 100%; height: 28px; background: rgba(15, 22, 36, 0.7); border: 1px solid var(--studio-border-subtle); border-radius: 6px; padding: 0 8px; color: var(--studio-text-primary); font-family: var(--studio-font-sans); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; outline: none; transition: all 0.15s ease; box-sizing: border-box; }
.spec-lab-title-input:hover { border-color: rgba(59, 130, 246, 0.4); }
.spec-lab-title-input:focus,
.spec-lab-title-input:focus-visible { border-color: var(--studio-accent-blue) !important; background: rgba(15, 22, 36, 0.95); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35) !important; outline: none !important; }
.spec-lab-save-status { display: inline-flex; align-items: center; gap: 5px; font-family: var(--studio-font-mono); font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 9999px; background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.25); color: var(--studio-accent-emerald); white-space: nowrap; transition: all 0.2s ease; }
.spec-lab-save-dot { width: 6px; height: 6px; border-radius: 50%; background-color: currentColor; }
.spec-lab-save-status.saving { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.3); color: #60A5FA; }
.spec-lab-save-status.unsaved { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.3); color: #F59E0B; }
.spec-lab-save-status.offline { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); color: #EF4444; }
.studio-btn-save-spec { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; background-color: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.35); border-radius: 6px; color: #10B981; font-size: 11.5px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; white-space: nowrap; }
.studio-btn-save-spec:hover { background-color: rgba(16, 185, 129, 0.16); border-color: #10B981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.25); }
.studio-btn-save-spec.is-saving { opacity: 0.7; pointer-events: none; }
.spec-lab-header-icon { font-size: 20px; color: var(--studio-accent-indigo); }
.spec-lab-header-heading { font-size: 13.5px; font-weight: 700; color: var(--studio-text-primary); letter-spacing: -0.01em; }
.spec-lab-version-chip { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: var(--studio-radius-full); background: rgba(99, 102, 241, 0.18); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.35); font-family: var(--studio-font-mono); }
.spec-lab-header-sub { font-size: 11px; color: var(--studio-text-muted); display: none; }
@media (min-width: 1024px) {
  .spec-lab-header-sub { display: inline-block; }
}
#spec-lab-stitch-sync-bar { display: inline-flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; max-width: 390px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; color: var(--studio-text-secondary); background-color: var(--studio-bg-card); padding: 4px 12px; border-radius: var(--studio-radius-full); border: 1px solid var(--studio-border-muted); font-family: var(--studio-font-mono); }
@media (max-width: 1199px) {
  #spec-lab-header,
  .spec-lab-header-left { flex-wrap: wrap; }
}
#spec-lab-stitch-sync-bar .spec-lab-sync-dot { width: 7px; height: 7px; border-radius: 50%; background-color: var(--studio-accent-emerald); box-shadow: 0 0 6px var(--studio-accent-emerald); }
.spec-lab-sync-title { font-weight: 600; color: var(--studio-text-primary); }
.spec-lab-sync-info { color: var(--studio-accent-blue-light); }
#spec-lab-agent-strip { grid-column: span 12 / span 12; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 6px 18px; background-color: var(--studio-bg-elevated); border-bottom: 1px solid var(--studio-border-subtle); min-height: 40px; z-index: 14; }
.spec-agent-badges-group,
.spec-skill-pills-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spec-agent-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--studio-radius-full); font-size: 11px; font-weight: 600; background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); transition: all var(--studio-transition-fast); cursor: default; user-select: none; min-height: 26px; }
.spec-agent-badge[data-agent="@analyst"] { --agent-accent: var(--studio-agent-analyst); }
.spec-agent-badge[data-agent="@solution-architect"] { --agent-accent: var(--studio-agent-architect); }
.spec-agent-badge[data-agent="@qa"] { --agent-accent: var(--studio-agent-qa); }
.spec-agent-badge[data-agent="@ui-designer"] { --agent-accent: var(--studio-agent-ui); }
.spec-agent-badge .spec-agent-indicator { width: 6px; height: 6px; border-radius: 50%; background-color: var(--agent-accent, #94a3b8); opacity: 0.6; }
.spec-agent-badge.active,
.spec-agent-badge.participating { background-color: rgba(15, 23, 42, 0.8); border-color: var(--agent-accent, var(--studio-border-highlight)); color: var(--studio-text-primary); box-shadow: 0 0 10px -2px var(--agent-accent, rgba(59, 130, 246, 0.4)); }
.spec-agent-badge.active .spec-agent-indicator,
.spec-agent-badge.participating .spec-agent-indicator { opacity: 1; box-shadow: 0 0 6px var(--agent-accent, #3b82f6); }
.spec-agent-badge.active { font-weight: 700; }
.spec-skill-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--studio-radius-sm); font-size: 10.5px; font-family: var(--studio-font-mono); background-color: rgba(30, 41, 59, 0.6); border: 1px solid var(--studio-border-muted); color: var(--studio-text-muted); min-height: 24px; }
.spec-skill-pill.active { color: var(--studio-accent-emerald-light); border-color: rgba(16, 185, 129, 0.4); background-color: rgba(16, 185, 129, 0.12); font-weight: 600; }
#spec-lab-left-pane { grid-column: span 5 / span 5; background-color: var(--studio-bg-surface); border-right: 1px solid var(--studio-border-subtle); display: flex; flex-direction: column; height: 100%; overflow: hidden; min-width: 0; min-height: 0; }
.spec-lab-pane-header { padding: 12px 16px; background-color: var(--studio-bg-elevated); border-bottom: 1px solid var(--studio-border-subtle); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-shrink: 0; }
.spec-lab-segmented-toggle { display: inline-flex; align-items: center; background-color: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 2px; gap: 2px; }
.spec-lab-toggle-btn { padding: 6px 12px; border-radius: var(--studio-radius-sm); font-size: 11.5px; font-weight: 600; color: var(--studio-text-secondary); background: transparent; border: 1px solid transparent; cursor: pointer; transition: all var(--studio-transition-fast); display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.spec-lab-toggle-btn:hover { color: var(--studio-text-primary); }
.spec-lab-toggle-btn.active { background-color: var(--studio-bg-card); color: var(--studio-accent-emerald); border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 0 10px rgba(16, 185, 129, 0.2); }
#spec-lab-brownfield-container { display: inline-flex; align-items: center; }
#spec-lab-brownfield-container.hidden { display: none !important; }
#spec-lab-brownfield-project-select { background-color: var(--studio-bg-root); color: var(--studio-text-primary); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-sm); padding: 4px 8px; font-size: 11px; font-family: var(--studio-font-sans); outline: none; cursor: pointer; max-width: 160px; }
#spec-lab-brownfield-project-select:focus-visible { border-color: var(--studio-accent-blue); }
.spec-lab-engine-badge { font-family: var(--studio-font-mono); font-size: 11px; color: var(--studio-text-muted); display: inline-flex; align-items: center; gap: 4px; }
.spec-lab-engine-badge .material-symbols-outlined { color: var(--studio-accent-blue-light); }
.spec-lab-left-scroll-body { flex: 1 1 auto; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.spec-lab-left-scroll-body > * { flex-shrink: 0; }
#spec-lab-seed-box { flex-shrink: 0; min-height: 210px; background-color: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); transition: border-color var(--studio-transition-fast), box-shadow var(--studio-transition-fast); }
#spec-lab-seed-box.loading { position: relative; overflow: hidden; }
#spec-lab-seed-box.loading::after { content: ""; position: absolute; top: 0; left: -100%; width: 200%; height: 100%; background: linear-gradient( 90deg, transparent, rgba(59, 130, 246, 0.15), transparent); animation: studio-shimmer 1.5s infinite; pointer-events: none; }
#spec-lab-seed-box.capacity-warning { border-color: var(--studio-accent-amber); }
#spec-lab-seed-box.capacity-exceeded { border-color: var(--studio-accent-rose); box-shadow: var(--studio-accent-rose-glow); }
#spec-lab-seed-box.locked { background-color: var(--studio-bg-surface); border-color: var(--studio-border-muted); }
.spec-lab-box-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.spec-lab-box-title { font-size: 12px; font-weight: 700; color: var(--studio-text-primary); display: inline-flex; align-items: center; gap: 6px; }
.spec-lab-box-title .material-symbols-outlined { color: var(--studio-accent-blue-light); }
.spec-lab-char-badge { font-family: var(--studio-font-mono); font-size: 10.5px; color: var(--studio-text-muted); background-color: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-sm); padding: 2px 8px; }
.spec-lab-char-badge.warning { color: var(--studio-accent-amber); border-color: rgba(245, 158, 11, 0.4); }
.spec-lab-char-badge.danger { color: var(--studio-accent-rose); border-color: rgba(244, 63, 94, 0.5); font-weight: 700; }
#spec-lab-seed-input { width: 100%; flex-shrink: 0; min-height: 88px; background-color: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 10px 12px; font-size: 12.5px; font-family: var(--studio-font-sans); color: var(--studio-text-primary); line-height: 1.5; resize: vertical; outline: none; transition: border-color var(--studio-transition-fast), box-shadow var(--studio-transition-fast); }
#spec-lab-seed-input:focus-visible { border-color: var(--studio-border-highlight); box-shadow: var(--studio-focus-glow); }
#spec-lab-seed-input::placeholder { color: var(--studio-text-muted); }
#spec-lab-seed-input:read-only { opacity: 0.85; cursor: default; }
.spec-lab-chips-list { display: flex; flex-wrap: wrap; gap: 6px; }
.spec-lab-chips-list:empty { display: none; }
.spec-lab-chip { display: inline-flex; align-items: center; gap: 4px; background-color: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); padding: 3px 8px; font-size: 11px; font-family: var(--studio-font-mono); color: var(--studio-accent-emerald-light); }
.spec-lab-chip .chip-remove-btn { background: transparent; border: none; color: var(--studio-text-muted); font-size: 14px; line-height: 1; cursor: pointer; padding: 0 2px; margin-left: 2px; }
.spec-lab-chip .chip-remove-btn:hover { color: var(--studio-accent-rose); }
.spec-lab-intake-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.spec-lab-intake-left-btns { display: flex; align-items: center; gap: 6px; }
#btn-spec-lab-voice,
#btn-spec-lab-attach { min-height: 44px; min-width: 44px; padding: 8px 12px; border-radius: var(--studio-radius-md); background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all var(--studio-transition-fast); }
#btn-spec-lab-voice:hover,
#btn-spec-lab-attach:hover { background-color: var(--studio-bg-card-hover); color: var(--studio-text-primary); border-color: var(--studio-border-highlight); }
#btn-spec-lab-voice.listening { border-color: var(--studio-accent-rose); color: var(--studio-accent-rose); box-shadow: var(--studio-accent-rose-glow); animation: studio-pulse 1.2s infinite; }
#btn-spec-lab-start-scan { min-height: 44px; padding: 8px 14px; border-radius: var(--studio-radius-md); background: linear-gradient( 135deg, #2563eb, #4f46e5); border: 1px solid rgba(59, 130, 246, 0.4); color: #ffffff; font-size: 12px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35); transition: all var(--studio-transition-fast); }
#btn-spec-lab-start-scan:hover { background: linear-gradient( 135deg, #3b82f6, #6366f1); box-shadow: var(--studio-accent-blue-glow); transform: translateY(-1px); }
#btn-spec-lab-start-scan:active { transform: translateY(0); }
#btn-spec-lab-start-scan:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
#spec-lab-grill-stepper { flex-shrink: 0; background-color: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.spec-lab-stepper-header { display: flex; align-items: center; justify-content: space-between; }
.spec-lab-stepper-title-wrap { display: flex; align-items: center; gap: 6px; }
.spec-lab-stepper-tag { font-family: var(--studio-font-mono); font-size: 9.5px; font-weight: 700; color: var(--studio-text-muted); letter-spacing: 0.05em; }
.spec-lab-stepper-title { font-size: 12px; font-weight: 700; color: var(--studio-text-primary); }
.spec-lab-progress-pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--studio-radius-full); background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.35); color: var(--studio-accent-emerald-light); }
.spec-lab-stepper-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; list-style: none; padding: 0; margin: 0; }
.spec-lab-pillar-pill { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; padding: 4px 2px; border-radius: var(--studio-radius-sm); transition: all var(--studio-transition-fast); background: transparent; border: none; min-height: 44px; }
.spec-lab-pillar-pill:hover { background: rgba(255, 255, 255, 0.03); }
.spec-lab-pillar-bar { width: 100%; height: 4px; border-radius: var(--studio-radius-full); background-color: var(--studio-border-subtle); transition: all var(--studio-transition-fast); }
.spec-lab-pillar-label { font-size: 10px; font-weight: 600; color: var(--studio-text-muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.spec-lab-pillar-status { font-size: 9px; color: var(--studio-text-muted); }
.spec-lab-pillar-pill.completed .spec-lab-pillar-bar { background-color: var(--studio-accent-emerald); box-shadow: 0 0 8px var(--studio-accent-emerald); }
.spec-lab-pillar-pill.completed .spec-lab-pillar-label { color: var(--studio-accent-emerald-light); }
.spec-lab-pillar-pill.completed .spec-lab-pillar-status { color: var(--studio-accent-emerald); }
.spec-lab-pillar-pill.active .spec-lab-pillar-bar { background-color: var(--studio-accent-blue); box-shadow: 0 0 10px var(--studio-accent-blue); animation: studio-pulse 1.5s infinite; }
.spec-lab-pillar-pill.active .spec-lab-pillar-label { color: var(--studio-accent-blue-light); font-weight: 700; }
.spec-lab-pillar-pill.active .spec-lab-pillar-status { color: var(--studio-accent-blue-light); font-weight: 700; }
.spec-lab-pillar-pill.pending { opacity: 0.55; }
.spec-lab-pillar-pill.warning .spec-lab-pillar-bar { background-color: var(--studio-accent-amber); }
.spec-lab-pillar-pill.warning .spec-lab-pillar-label { color: var(--studio-accent-amber); }
.spec-lab-step2-banner { flex-shrink: 0; margin: 12px 0 16px 0; padding: 12px 14px; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.35); border-radius: var(--studio-radius-md); display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: all var(--studio-transition-fast); }
.spec-lab-step2-banner.hidden { display: none !important; }
.spec-lab-step2-banner-content { display: flex; align-items: center; gap: 10px; }
.spec-lab-step2-banner-title { font-size: 13px; font-weight: 700; color: #34d399; }
.spec-lab-step2-banner-desc { font-size: 11.5px; color: var(--studio-text-secondary); margin-top: 1px; }
.spec-lab-step2-banner-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: var(--studio-accent-emerald); color: #080c14; border: none; border-radius: var(--studio-radius-sm); font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all var(--studio-transition-fast); box-shadow: 0 0 14px rgba(16, 185, 129, 0.4); min-height: 32px; }
.spec-lab-step2-banner-btn:hover { background: #34d399; box-shadow: 0 0 18px rgba(16, 185, 129, 0.6); transform: translateY(-1px); }
.spec-lab-step2-banner-btn:focus-visible { outline: 2px solid var(--studio-border-focus-ring) !important; outline-offset: 2px !important; box-shadow: var(--studio-focus-glow) !important; }
#spec-lab-question-card { flex-shrink: 0; min-height: 280px; background-color: var(--studio-bg-elevated); border: 2px solid rgba(59, 130, 246, 0.65); border-radius: var(--studio-radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 0 24px -4px rgba(59, 130, 246, 0.25); position: relative; transition: all var(--studio-transition-fast); }
#spec-lab-question-card.resolved { border-color: rgba(16, 185, 129, 0.6); box-shadow: 0 0 20px -3px rgba(16, 185, 129, 0.3); }
#spec-lab-question-card.loading { opacity: 0.6; pointer-events: none; }
.spec-lab-question-top { display: flex; flex-direction: column; gap: 6px; }
.spec-lab-question-meta { display: flex; align-items: center; gap: 8px; }
.spec-lab-pillar-badge { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: var(--studio-radius-sm); background: rgba(59, 130, 246, 0.18); border: 1px solid rgba(59, 130, 246, 0.35); color: var(--studio-accent-blue-light); }
.spec-lab-decision-count { font-family: var(--studio-font-mono); font-size: 10.5px; color: var(--studio-text-muted); }
#spec-lab-question-title { font-size: 13.5px; font-weight: 700; color: #ffffff; line-height: 1.45; margin: 0; }
#spec-lab-question-rationale { font-size: 11.5px; color: var(--studio-text-secondary); background-color: rgba(8, 12, 20, 0.85); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 8px 10px; line-height: 1.4; display: flex; align-items: flex-start; gap: 6px; }
#spec-lab-question-rationale .material-symbols-outlined { color: var(--studio-accent-amber); font-size: 16px; flex-shrink: 0; margin-top: 1px; }
#spec-lab-question-options { display: flex; flex-direction: column; gap: 8px; }
.spec-lab-option-card { display: block; padding: 12px 14px; border-radius: var(--studio-radius-md); background-color: var(--studio-bg-card); border: 1.5px solid var(--studio-border-subtle); cursor: pointer; transition: all var(--studio-transition-fast); min-height: 56px; }
.spec-lab-option-card:hover { background-color: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); }
.spec-lab-option-card.selected { background-color: var(--studio-bg-card-active); border-color: var(--studio-accent-emerald); box-shadow: 0 0 12px rgba(16, 185, 129, 0.25); }
.spec-lab-option-card.recommended { border-color: rgba(16, 185, 129, 0.55); }
.spec-lab-option-card.recommended.selected { border-color: var(--studio-accent-emerald); }
.spec-lab-option-inner { display: flex; align-items: flex-start; gap: 10px; }
.spec-lab-option-radio { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--studio-accent-emerald); cursor: pointer; }
.spec-lab-option-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.spec-lab-option-title-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.spec-lab-option-label { font-size: 12px; font-weight: 700; color: #ffffff; }
.spec-lab-recommended-pill { font-size: 9.5px; font-weight: 700; padding: 1px 6px; border-radius: var(--studio-radius-full); background: rgba(16, 185, 129, 0.18); border: 1px solid rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald-light); display: inline-flex; align-items: center; gap: 2px; }
.spec-lab-option-desc { font-size: 11px; color: var(--studio-text-secondary); line-height: 1.4; margin: 0; }
.spec-lab-custom-wrap { display: flex; flex-direction: column; gap: 4px; }
.spec-lab-custom-label { font-family: var(--studio-font-mono); font-size: 10.5px; color: var(--studio-text-muted); }
#spec-lab-custom-answer { width: 100%; background-color: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 8px 12px; font-size: 12px; color: var(--studio-text-primary); outline: none; transition: all var(--studio-transition-fast); }
#spec-lab-custom-answer:focus-visible { border-color: var(--studio-border-highlight); box-shadow: var(--studio-focus-glow); }
.spec-lab-question-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#btn-spec-lab-apply-answer { flex: 1 1 auto; min-height: 44px; padding: 10px 16px; border-radius: var(--studio-radius-md); background-color: var(--studio-accent-emerald); border: none; color: #080c14; font-size: 12.5px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-shadow: var(--studio-accent-emerald-glow); transition: all var(--studio-transition-fast); }
#btn-spec-lab-apply-answer:hover { background-color: var(--studio-accent-emerald-light); transform: translateY(-1px); }
#btn-spec-lab-apply-answer:active { transform: translateY(0); }
#btn-spec-lab-autocomplete { min-height: 44px; padding: 10px 14px; border-radius: var(--studio-radius-md); background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; transition: all var(--studio-transition-fast); }
#btn-spec-lab-autocomplete:hover { background-color: var(--studio-bg-card-hover); color: #ffffff; border-color: var(--studio-border-highlight); }
.spec-lab-telemetry-footer { padding: 10px 16px; background-color: var(--studio-bg-elevated); border-top: 1px solid var(--studio-border-subtle); display: flex; align-items: center; justify-content: space-between; font-size: 11px; flex-shrink: 0; }
.spec-lab-telemetry-engine { display: inline-flex; align-items: center; gap: 6px; font-family: var(--studio-font-mono); color: var(--studio-accent-emerald-light); }
.spec-lab-telemetry-metrics { font-family: var(--studio-font-mono); color: var(--studio-text-muted); }
#spec-lab-right-pane { grid-column: span 7 / span 7; background-color: var(--studio-bg-root); display: flex; flex-direction: column; height: 100%; overflow: hidden; min-width: 0; min-height: 0; }
.spec-lab-subtabs-bar { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; height: 44px; min-height: 44px; background-color: var(--studio-bg-surface); border-bottom: 1px solid var(--studio-border-subtle); flex-shrink: 0; }
.spec-lab-subtabs-group { display: flex; align-items: center; gap: 16px; height: 100%; }
.spec-lab-subtab { height: 100%; background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--studio-text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; transition: all var(--studio-transition-fast); }
.spec-lab-subtab:hover { color: var(--studio-text-primary); }
.spec-lab-subtab.active { color: var(--studio-accent-blue-light); border-bottom-color: var(--studio-accent-blue); }
.spec-lab-counter-tag { font-family: var(--studio-font-mono); font-size: 9.5px; font-weight: 700; padding: 1px 6px; border-radius: var(--studio-radius-full); background: rgba(59, 130, 246, 0.2); color: var(--studio-accent-blue-light); }
.spec-lab-status-tag { font-size: 9.5px; font-weight: 700; padding: 1px 6px; border-radius: var(--studio-radius-full); background: rgba(16, 185, 129, 0.15); color: var(--studio-accent-emerald-light); }
.spec-lab-sync-status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--studio-font-mono); font-size: 11px; color: var(--studio-text-secondary); }
.spec-lab-sync-dot { width: 6px; height: 6px; border-radius: 50%; background-color: var(--studio-accent-emerald); box-shadow: 0 0 6px var(--studio-accent-emerald); }
.spec-lab-controls-strip { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; background-color: rgba(15, 22, 36, 0.85); border-bottom: 1px solid var(--studio-border-subtle); flex-shrink: 0; gap: 12px; flex-wrap: wrap; }
.spec-lab-editor-segmented { display: inline-flex; align-items: center; background-color: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 2px; gap: 2px; }
.spec-lab-mode-btn { padding: 4px 10px; border-radius: var(--studio-radius-sm); font-size: 11.5px; font-weight: 600; color: var(--studio-text-secondary); background: transparent; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: all var(--studio-transition-fast); min-height: 32px; }
.spec-lab-mode-btn:hover { color: var(--studio-text-primary); }
.spec-lab-mode-btn.active { background-color: var(--studio-bg-card); color: #ffffff; border: 1px solid var(--studio-border-subtle); }
.spec-lab-metrics-strip { display: flex; align-items: center; gap: 14px; }
#spec-lab-readiness-badge { display: inline-flex; align-items: center; gap: 8px; background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); padding: 4px 12px; }
.spec-lab-radial-ring { position: relative; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.spec-lab-radial-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.spec-lab-radial-ring .ring-bg { stroke: var(--studio-border-subtle); }
.spec-lab-radial-ring .ring-fill { stroke: var(--studio-accent-emerald); transition: stroke-dasharray 0.4s ease; }
.spec-lab-radial-ring .ring-text { position: absolute; font-size: 8px; font-weight: 800; color: #ffffff; text-align: center; }
.ring-labels { display: flex; flex-direction: column; line-height: 1.15; }
.ring-primary-label { font-size: 11px; font-weight: 700; color: var(--studio-accent-emerald-light); }
.ring-sub-label { font-size: 9px; color: var(--studio-text-muted); }
#spec-lab-char-counter { display: flex; flex-direction: column; gap: 3px; width: 140px; }
.spec-lab-meter-top { display: flex; justify-content: space-between; font-size: 10px; color: var(--studio-text-secondary); }
.spec-lab-meter-val { font-family: var(--studio-font-mono); color: var(--studio-accent-emerald-light); }
.spec-lab-meter-track { width: 100%; height: 6px; background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); overflow: hidden; }
.spec-lab-meter-bar { height: 100%; border-radius: var(--studio-radius-full); background-color: var(--studio-accent-emerald); transition: width 0.25s ease, background-color 0.25s ease; }
.spec-lab-meter-bar.warning { background-color: var(--studio-accent-amber); }
.spec-lab-meter-bar.danger { background-color: var(--studio-accent-rose); }
.spec-lab-panes-scroll-body { flex: 1 1 auto; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
#spec-lab-editor-pane,
#spec-lab-constitution-pane,
#spec-lab-audit-pane { display: flex; flex-direction: column; gap: 14px; }
#spec-lab-constitution-pane.hidden,
#spec-lab-audit-pane.hidden,
#spec-lab-raw-pane.hidden { display: none !important; }
.spec-lab-visual-cards-container { display: flex; flex-direction: column; gap: 14px; }
.spec-lab-section-card { background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); transition: border-color var(--studio-transition-fast); }
.spec-lab-section-card:hover { border-color: rgba(59, 130, 246, 0.4); }
.spec-lab-section-card.updated { animation: studio-pulse 1s; border-color: var(--studio-accent-emerald); }
.spec-lab-section-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.spec-lab-section-title-group { display: flex; align-items: center; gap: 8px; }
.spec-lab-req-tag { font-family: var(--studio-font-mono); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: var(--studio-radius-sm); background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-accent-blue-light); }
.spec-lab-section-heading { font-size: 13px; font-weight: 700; color: #ffffff; }
.spec-lab-badge-pill { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: var(--studio-radius-sm); background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: var(--studio-accent-emerald-light); }
.spec-lab-section-desc { font-size: 12px; color: var(--studio-text-secondary); line-height: 1.5; }
.spec-lab-gherkin-box { background-color: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 10px 12px; font-family: var(--studio-font-mono); font-size: 11.5px; line-height: 1.55; color: var(--studio-text-primary); display: flex; flex-direction: column; gap: 4px; }
.spec-lab-gherkin-header { font-family: var(--studio-font-sans); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--studio-text-muted); display: inline-flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.spec-lab-gherkin-header .material-symbols-outlined { color: var(--studio-accent-emerald); font-size: 14px; }
.spec-lab-gherkin-kw-given { color: var(--studio-accent-blue-light); font-weight: 700; }
.spec-lab-gherkin-kw-when { color: var(--studio-accent-amber); font-weight: 700; }
.spec-lab-gherkin-kw-then { color: var(--studio-accent-emerald-light); font-weight: 700; }
#spec-lab-raw-textarea { width: 100%; min-height: 480px; background-color: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 14px 16px; font-family: var(--studio-font-mono); font-size: 12px; line-height: 1.6; color: var(--studio-text-primary); outline: none; resize: vertical; transition: border-color var(--studio-transition-fast); }
#spec-lab-raw-textarea:focus-visible { border-color: var(--studio-border-highlight); box-shadow: var(--studio-focus-glow); }
.spec-lab-constitution-card { background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.spec-lab-const-title { font-size: 13.5px; font-weight: 700; color: #ffffff; display: inline-flex; align-items: center; gap: 8px; }
.spec-lab-const-title .material-symbols-outlined { color: var(--studio-accent-amber); }
.spec-lab-const-desc { font-size: 12px; color: var(--studio-text-secondary); }
.spec-lab-const-list { list-style: disc; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--studio-text-secondary); line-height: 1.5; }
.spec-lab-const-list strong { color: var(--studio-text-primary); }
.spec-lab-const-list code { font-family: var(--studio-font-mono); font-size: 11px; background-color: rgba(255, 255, 255, 0.05); padding: 1px 4px; border-radius: 3px; color: var(--studio-accent-blue-light); }
.spec-lab-audit-card { background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.spec-lab-audit-header { display: flex; align-items: center; justify-content: space-between; }
.spec-lab-audit-title { font-size: 13.5px; font-weight: 700; color: #ffffff; display: inline-flex; align-items: center; gap: 8px; }
.spec-lab-audit-title .material-symbols-outlined { color: var(--studio-accent-emerald); }
.spec-lab-audit-badge { font-family: var(--studio-font-mono); font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: var(--studio-radius-full); background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald-light); }
.spec-lab-audit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.spec-lab-audit-dim-card { background-color: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.spec-lab-audit-dim-title { font-size: 12px; font-weight: 700; color: var(--studio-accent-emerald-light); }
.spec-lab-audit-dim-sub { font-size: 11px; color: var(--studio-text-muted); }
.spec-lab-audit-gaps { background-color: rgba(244, 63, 94, 0.08); border: 1px solid rgba(244, 63, 94, 0.3); border-radius: var(--studio-radius-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.spec-lab-audit-gaps.hidden { display: none !important; }
.spec-lab-gaps-title { font-size: 12px; font-weight: 700; color: var(--studio-accent-rose); }
.spec-lab-gaps-list { list-style: disc; padding-left: 18px; font-size: 11.5px; color: var(--studio-text-secondary); display: flex; flex-direction: column; gap: 4px; }
.spec-lab-reviewer-card { background-color: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; transition: border-color var(--studio-transition-fast), box-shadow var(--studio-transition-fast); }
.spec-lab-reviewer-card:hover { border-color: var(--studio-border-highlight); }
.spec-lab-reviewer-card.signed-off { border-color: rgba(16, 185, 129, 0.35); background: linear-gradient( 180deg, rgba(16, 185, 129, 0.04) 0%, var(--studio-bg-root) 100%); }
.spec-lab-reviewer-card.needs-revision { border-color: rgba(245, 158, 11, 0.35); background: linear-gradient( 180deg, rgba(245, 158, 11, 0.04) 0%, var(--studio-bg-root) 100%); }
.spec-lab-reviewer-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.spec-lab-reviewer-role-group { display: flex; align-items: center; gap: 6px; }
.spec-lab-reviewer-agent-pill { font-family: var(--studio-font-mono); font-size: 10.5px; font-weight: 700; padding: 1.5px 6px; border-radius: 4px; background-color: rgba(59, 130, 246, 0.15); color: var(--studio-accent-blue-light); border: 1px solid rgba(59, 130, 246, 0.3); }
.spec-lab-reviewer-name { font-size: 12px; font-weight: 700; color: #ffffff; }
.spec-lab-reviewer-status-badge { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: var(--studio-radius-full); }
.spec-lab-reviewer-status-badge.signed-off { background-color: rgba(16, 185, 129, 0.2); color: var(--studio-accent-emerald-light); border: 1px solid rgba(16, 185, 129, 0.4); }
.spec-lab-reviewer-status-badge.needs-revision { background-color: rgba(245, 158, 11, 0.2); color: var(--studio-accent-amber); border: 1px solid rgba(245, 158, 11, 0.4); }
.spec-lab-reviewer-status-badge.pending { background-color: rgba(148, 163, 184, 0.15); color: var(--studio-text-muted); border: 1px solid rgba(148, 163, 184, 0.3); }
.spec-lab-reviewer-rationale-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-family: var(--studio-font-mono); font-weight: 700; padding: 2px 7px; border-radius: var(--studio-radius-full); margin-top: 4px; width: fit-content; }
.spec-lab-reviewer-rationale-badge.signed-off { background: rgba(16, 185, 129, 0.15); color: var(--studio-accent-emerald-light); border: 1px solid rgba(16, 185, 129, 0.35); }
.spec-lab-reviewer-rationale-badge.needs-revision { background: rgba(245, 158, 11, 0.15); color: var(--studio-accent-amber); border: 1px solid rgba(245, 158, 11, 0.35); }
.spec-lab-reviewer-thoughts { font-size: 11px; color: var(--studio-text-secondary); background-color: var(--studio-bg-surface); border-left: 2px solid var(--studio-border-highlight); padding: 6px 10px; border-radius: 0 var(--studio-radius-sm) var(--studio-radius-sm) 0; margin-top: 6px; line-height: 1.4; font-style: italic; }
.spec-lab-reviewer-findings { list-style: disc; padding-left: 16px; font-size: 11px; color: var(--studio-text-secondary); display: flex; flex-direction: column; gap: 3px; }
.spec-lab-reviewer-fix-btn { margin-top: auto; font-size: 11px; font-weight: 600; padding: 6px 10px; border-radius: var(--studio-radius-sm); background: linear-gradient( 135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%); border: 1px solid rgba(59, 130, 246, 0.4); color: #ffffff; display: inline-flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; transition: all var(--studio-transition-fast); }
.spec-lab-reviewer-fix-btn:hover { background: linear-gradient( 135deg, rgba(59, 130, 246, 0.35) 0%, rgba(139, 92, 246, 0.35) 100%); border-color: rgba(59, 130, 246, 0.7); box-shadow: 0 0 10px rgba(59, 130, 246, 0.3); }
#spec-lab-stitch-pane { display: flex; flex-direction: column; height: 100%; overflow: hidden; background-color: var(--studio-bg-root); }
#spec-lab-stitch-pane.hidden { display: none !important; }
#spec-lab-stitch-toolbar.spec-lab-stitch-toolbar,
.spec-lab-stitch-toolbar { padding: 10px 14px; background-color: var(--studio-bg-surface); border-bottom: 1px solid var(--studio-border-subtle); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; overflow-x: visible; overflow-y: visible; gap: 8px 10px; flex-shrink: 0; box-sizing: border-box; width: 100%; max-width: 100%; }
.spec-lab-stitch-toolbar-left,
#spec-lab-stitch-toolbar > div { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap !important; flex: 0 1 auto; min-width: 0; max-width: 100%; box-sizing: border-box; }
#spec-lab-stitch-toolbar .studio-btn-sm { max-width: 100%; }
#btn-spec-lab-sync-stitch { min-height: 34px; padding: 6px 12px; border-radius: var(--studio-radius-md); background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-primary); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all var(--studio-transition-fast); }
#btn-spec-lab-sync-stitch:hover { background-color: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); color: var(--studio-accent-blue-light); }
.spec-lab-stitch-vibe-wrap { display: flex; align-items: center; gap: 6px; background-color: var(--studio-bg-root); padding: 4px 10px; border-radius: var(--studio-radius-md); border: 1px solid var(--studio-border-subtle); max-width: 100%; min-width: 0; box-sizing: border-box; }
.spec-lab-stitch-vibe-label { font-size: 11px; color: var(--studio-text-muted); font-family: var(--studio-font-mono); font-weight: 600; }
.spec-lab-stitch-vibe-select { background: transparent; border: none; font-size: 12px; color: var(--studio-text-primary); cursor: pointer; outline: none; max-width: 100%; min-width: 0; }
.spec-lab-btn-sync-to-sdd { min-height: 34px; padding: 6px 12px; border-radius: var(--studio-radius-md); background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald-light); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all var(--studio-transition-fast); }
.spec-lab-btn-sync-to-sdd:hover { background: rgba(16, 185, 129, 0.22); border-color: var(--studio-accent-emerald); box-shadow: 0 0 12px rgba(16, 185, 129, 0.3); }
.spec-lab-sync-metadata { padding: 6px 14px; background-color: var(--studio-bg-card); border-bottom: 1px solid var(--studio-border-subtle); display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; -webkit-overflow-scrolling: touch; box-sizing: border-box; width: 100%; gap: 8px; font-size: 11.5px; flex-shrink: 0; }
.spec-lab-sync-metadata::-webkit-scrollbar { height: 4px; }
.spec-lab-sync-metadata::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.4); }
.spec-lab-sync-metadata::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.4); border-radius: 2px; }
.spec-lab-sync-metadata-left { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; flex-shrink: 0; white-space: nowrap; }
.spec-lab-sync-metadata-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; white-space: nowrap; }
.spec-sync-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; transition: color var(--studio-transition-fast); }
.spec-sync-badge.synced { color: #34d399; }
.spec-sync-badge.dirty { color: var(--studio-accent-amber); }
.spec-sync-badge.synthesizing { color: var(--studio-accent-blue-light); }
.spec-sync-badge.unbound { color: var(--studio-text-muted); }
.spec-lab-sync-dot-live { width: 8px; height: 8px; border-radius: 50%; background-color: var(--studio-accent-emerald); box-shadow: 0 0 10px rgba(16, 185, 129, 0.7); flex-shrink: 0; }
.spec-lab-sync-dot-dirty { width: 8px; height: 8px; border-radius: 50%; background-color: var(--studio-accent-amber); box-shadow: var(--studio-accent-amber-glow); animation: studio-pulse 1.8s infinite; flex-shrink: 0; }
.spec-lab-sync-dot-synthesizing { width: 8px; height: 8px; border-radius: 50%; background-color: var(--studio-accent-blue); box-shadow: 0 0 10px rgba(59, 130, 246, 0.7); animation: studio-pulse 1s infinite; flex-shrink: 0; }
.spec-lab-sync-dot-unbound { width: 8px; height: 8px; border-radius: 50%; background-color: var(--studio-text-muted); flex-shrink: 0; }
.spec-lab-sync-binding-text { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spec-lab-sync-counter-tag { padding: 2px 7px; border-radius: var(--studio-radius-sm); background: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); font-family: var(--studio-font-mono); font-size: 10.5px; white-space: nowrap; }
.spec-lab-sync-refresh-btn,
#btn-spec-lab-sync-refresh,
#btn-spec-lab-sync-refresh-cta { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.4); border-radius: var(--studio-radius-sm); color: #fbbf24; font-size: 11.5px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast); min-height: 28px; }
.spec-lab-sync-refresh-btn:hover,
#btn-spec-lab-sync-refresh:hover,
#btn-spec-lab-sync-refresh-cta:hover { background: rgba(245, 158, 11, 0.28); border-color: #f59e0b; box-shadow: 0 0 12px rgba(245, 158, 11, 0.35); color: #ffffff; }
.spec-lab-sync-refresh-btn:focus-visible,
#btn-spec-lab-sync-refresh:focus-visible,
#btn-spec-lab-sync-refresh-cta:focus-visible { outline: 2px solid var(--studio-border-focus-ring) !important; outline-offset: 2px !important; box-shadow: var(--studio-focus-glow) !important; }
.spec-lab-sync-refresh-btn.hidden,
#btn-spec-lab-sync-refresh.hidden,
#btn-spec-lab-sync-refresh-cta.hidden { display: none !important; }
.spec-lab-stitch-nav-bar { padding: 8px 14px; background-color: var(--studio-bg-elevated); border-bottom: 1px solid var(--studio-border-subtle); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0; overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap; scrollbar-width: thin; -webkit-overflow-scrolling: touch; box-sizing: border-box; width: 100%; }
.spec-lab-stitch-nav-bar::-webkit-scrollbar { height: 4px; }
.spec-lab-stitch-nav-bar::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.4); }
.spec-lab-stitch-nav-bar::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.4); border-radius: 2px; }
.spec-lab-stitch-screen-tabs { display: flex; align-items: center; gap: 8px; overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap; scrollbar-width: thin; -webkit-overflow-scrolling: touch; flex-shrink: 0; }
.spec-stitch-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--studio-radius-md); background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast); white-space: nowrap; user-select: none; flex-shrink: 0; }
.spec-stitch-tab:hover { background-color: var(--studio-bg-card-hover); color: var(--studio-text-primary); border-color: var(--studio-border-highlight); }
.spec-stitch-tab.active { background: rgba(139, 92, 246, 0.15); border-color: var(--studio-accent-violet); color: #ffffff; box-shadow: 0 0 12px rgba(139, 92, 246, 0.35); font-weight: 700; }
.spec-stitch-tab-number { width: 18px; height: 18px; border-radius: 50%; background: var(--studio-bg-surface); color: var(--studio-text-secondary); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; font-family: var(--studio-font-mono); }
.spec-stitch-tab.active .spec-stitch-tab-number { background: var(--studio-accent-violet); color: #ffffff; }
.spec-stitch-tab-title { font-size: 12px; }
.spec-stitch-tab-req-badge { font-size: 10px; padding: 1px 6px; border-radius: 9999px; background: rgba(59, 130, 246, 0.15); color: var(--studio-accent-blue-light); border: 1px solid rgba(59, 130, 246, 0.3); font-family: var(--studio-font-mono); font-weight: 700; }
.spec-lab-stitch-nav-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
#btn-spec-lab-stitch-fullscreen { min-width: 32px; min-height: 32px; padding: 6px; border-radius: var(--studio-radius-sm); background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all var(--studio-transition-fast); }
#btn-spec-lab-stitch-fullscreen:hover { background-color: var(--studio-bg-card-hover); color: var(--studio-text-primary); border-color: var(--studio-border-highlight); }
.spec-lab-stitch-stage { flex: 1 1 0%; min-height: 420px; position: relative; background-color: var(--studio-bg-root); overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 12px; }
.spec-lab-stitch-loading { position: absolute; inset: 0; background-color: rgba(11, 15, 25, 0.85); backdrop-filter: blur(4px); z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.spec-lab-loading-spinner { width: 24px; height: 24px; border: 2px solid var(--studio-accent-emerald); border-top-color: transparent; border-radius: 50%; animation: studio-spin 0.8s linear infinite; }
.spec-lab-loading-text { font-size: 12px; color: var(--studio-text-secondary); font-family: var(--studio-font-mono); }
.spec-lab-stitch-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; color: var(--studio-text-secondary); max-width: 400px; padding: 24px; }
#spec-lab-stitch-preview-iframe { width: 100%; height: 100%; min-height: 400px; border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); background-color: #ffffff; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35); transition: opacity var(--studio-transition-fast); }
#spec-lab-stitch-preview-iframe.hidden { display: none !important; }
.spec-lab-stitch-refine-bar { padding: 12px 16px; background-color: var(--studio-bg-surface); border-top: 1px solid var(--studio-border-subtle); display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.spec-lab-refine-header { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--studio-text-muted); }
.spec-lab-refine-title { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.spec-lab-refine-hint { font-family: var(--studio-font-mono); }
.spec-lab-refine-input-row { display: flex; align-items: center; gap: 8px; }
.spec-lab-refine-input { flex: 1; min-height: 38px; background-color: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 8px 12px; font-size: 12px; color: var(--studio-text-primary); transition: border-color var(--studio-transition-fast); outline: none; }
.spec-lab-refine-input:focus { border-color: var(--studio-accent-violet); box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25); }
.spec-lab-btn-refine { min-height: 38px; padding: 8px 16px; border-radius: var(--studio-radius-md); background: linear-gradient( 135deg, #7c3aed, #8b5cf6); border: none; color: #ffffff; font-size: 12px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: all var(--studio-transition-fast); }
.spec-lab-btn-refine:hover { background: linear-gradient( 135deg, #8b5cf6, #a78bfa); transform: translateY(-1px); box-shadow: 0 0 16px rgba(139, 92, 246, 0.45); }
.spec-lab-quick-chips-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.spec-stitch-quick-chip { padding: 4px 10px; border-radius: 9999px; background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); font-size: 11px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast); white-space: nowrap; }
.spec-stitch-quick-chip:hover { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald-light); transform: translateY(-1px); }
.spec-lab-save-stitch-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; font-size: 11px; font-weight: 600; line-height: 1.25; color: var(--studio-text-primary); margin-right: 0; flex: 0 1 185px; min-width: 0; max-width: 100%; }
.spec-lab-save-stitch-checkbox { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--studio-accent-emerald); cursor: pointer; }
.spec-lab-save-stitch-toggle span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.spec-lab-save-stitch-toggle .material-symbols-outlined { flex-shrink: 0; }
#spec-lab-agent-activity-drawer { background-color: var(--studio-bg-surface); border-top: 1px solid var(--studio-border-subtle); display: flex; flex-direction: column; transition: max-height 0.28s cubic-bezier(0.16, 1, 0.3, 1); overflow: hidden; flex-shrink: 0; z-index: 18; }
#spec-lab-agent-activity-drawer.collapsed { max-height: 42px; }
#spec-lab-agent-activity-drawer:not(.collapsed) { max-height: 260px; }
.spec-activity-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; background-color: var(--studio-bg-elevated); cursor: pointer; min-height: 42px; user-select: none; }
.spec-activity-title-group { display: flex; align-items: center; gap: 8px; }
.spec-activity-title { font-size: 12px; font-weight: 600; color: var(--studio-text-primary); }
.spec-activity-count-badge { font-family: var(--studio-font-mono); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: var(--studio-radius-full); background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.spec-activity-toggle-btn { display: inline-flex; align-items: center; gap: 4px; background: transparent; border: 1px solid var(--studio-border-muted); border-radius: var(--studio-radius-sm); color: var(--studio-text-secondary); font-size: 11px; font-weight: 600; padding: 4px 10px; cursor: pointer; min-height: 28px; transition: all var(--studio-transition-fast); }
.spec-activity-toggle-btn:hover { background-color: var(--studio-bg-card); color: var(--studio-text-primary); }
.spec-activity-toggle-btn:focus-visible { outline: 2px solid var(--studio-border-focus-ring) !important; outline-offset: 2px !important; }
.spec-activity-toggle-btn .toggle-chevron { transition: transform 0.2s ease; font-size: 16px; }
#spec-lab-agent-activity-drawer.collapsed .toggle-chevron { transform: rotate(180deg); }
.spec-activity-feed { padding: 10px 16px; overflow-y: auto; max-height: 218px; display: flex; flex-direction: column; gap: 8px; background-color: var(--studio-bg-root); }
.spec-activity-feed[hidden] { display: none !important; }
.spec-activity-item { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border-radius: var(--studio-radius-sm); background-color: var(--studio-bg-card); border-left: 3px solid var(--studio-border-subtle); border-top: 1px solid var(--studio-border-muted); border-right: 1px solid var(--studio-border-muted); border-bottom: 1px solid var(--studio-border-muted); }
.spec-activity-item[data-agent="@analyst"] { border-left-color: var(--studio-agent-analyst); }
.spec-activity-item[data-agent="@solution-architect"] { border-left-color: var(--studio-agent-architect); }
.spec-activity-item[data-agent="@qa"] { border-left-color: var(--studio-agent-qa); }
.spec-activity-item[data-agent="@ui-designer"] { border-left-color: var(--studio-agent-ui); }
.spec-activity-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11px; }
.spec-activity-agent-info { display: flex; align-items: center; gap: 6px; }
.spec-activity-agent-pill { font-weight: 700; font-family: var(--studio-font-mono); font-size: 10.5px; color: var(--studio-text-primary); }
.spec-activity-mode-badge { font-size: 9.5px; font-family: var(--studio-font-mono); font-weight: 700; padding: 1px 5px; border-radius: var(--studio-radius-full); }
.spec-activity-mode-badge.live { background: rgba(16, 185, 129, 0.2); color: var(--studio-accent-emerald-light); border: 1px solid rgba(16, 185, 129, 0.4); }
.spec-activity-mode-badge.fallback { background: rgba(148, 163, 184, 0.15); color: var(--studio-text-muted); border: 1px solid rgba(148, 163, 184, 0.3); }
.spec-activity-time { font-size: 10px; color: var(--studio-text-muted); font-family: var(--studio-font-mono); }
.spec-activity-action { font-size: 11.5px; color: var(--studio-text-primary); line-height: 1.4; }
.spec-activity-thoughts { font-size: 10.5px; font-family: var(--studio-font-mono); color: var(--studio-text-secondary); background-color: var(--studio-bg-elevated); padding: 6px 8px; border-radius: var(--studio-radius-sm); line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
#spec-lab-footer-bar { padding: 10px 16px; min-height: 60px; height: auto; min-width: 0; max-width: 100%; box-sizing: border-box; background-color: var(--studio-bg-surface); border-top: 1px solid var(--studio-border-subtle); display: flex; flex-wrap: wrap; align-items: center; align-items: safe center; justify-content: space-between; gap: 8px 12px; flex-shrink: 0; box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3); z-index: 20; }
.spec-lab-footer-left { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; max-width: 100%; }
#btn-save-sdd-draft,
#btn-export-sdd-md,
#btn-run-sdd-audit { min-height: 44px; min-width: 44px; padding: 8px 12px; border-radius: var(--studio-radius-md); background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-primary); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; transition: all var(--studio-transition-fast); }
#btn-save-sdd-draft:hover,
#btn-export-sdd-md:hover,
#btn-run-sdd-audit:hover { background-color: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); }
#btn-run-sdd-audit { color: var(--studio-accent-emerald-light); }
.spec-lab-footer-right { display: flex; flex-wrap: wrap; align-items: center; align-items: safe center; justify-content: flex-end; gap: 8px; flex: 1 1 auto; min-width: 0; max-width: 100%; }
.spec-lab-footer-status { text-align: right; display: flex; flex-direction: column; gap: 2px; flex: 0 1 155px; min-width: min(120px, 100%); max-width: 100%; line-height: 1.25; }
.spec-lab-footer-status-title { font-family: var(--studio-font-mono); font-size: 11px; font-weight: 700; color: var(--studio-accent-emerald-light); }
.spec-lab-footer-status-sub { font-size: 10px; color: var(--studio-text-muted); }
#btn-approve-sdd-handoff { min-height: 44px; padding: 9px 14px; border-radius: var(--studio-radius-lg); background: linear-gradient( 135deg, #059669, #10b981); border: none; color: #080c14; font-size: 12.5px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto; max-width: 100%; white-space: nowrap; box-sizing: border-box; box-shadow: var(--studio-accent-emerald-glow); transition: all var(--studio-transition-fast); }
#btn-approve-sdd-handoff:hover:not(:disabled) { background: linear-gradient( 135deg, #10b981, #34d399); transform: translateY(-2px); box-shadow: 0 0 24px rgba(16, 185, 129, 0.55); }
#btn-approve-sdd-handoff:disabled { opacity: 0.45; filter: grayscale(0.8); cursor: not-allowed; box-shadow: none; pointer-events: none; }
@keyframes studio-shimmer {
  0% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}
@keyframes studio-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes studio-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
#studio-spec-lab-workspace button:focus-visible,
#studio-spec-lab-workspace input:focus-visible,
#studio-spec-lab-workspace textarea:focus-visible,
#studio-spec-lab-workspace select:focus-visible { outline: 2px solid var(--studio-border-focus-ring) !important; outline-offset: 2px !important; box-shadow: var(--studio-focus-glow) !important; }
@media (max-width: 900px) {
  #studio-spec-lab-workspace.spec-lab-workspace-grid { grid-template-columns: 1fr; overflow-y: auto; height: auto; }
  #spec-lab-processing-banner,
  #spec-lab-header,
  #spec-lab-agent-strip,
  #spec-lab-left-pane,
  #spec-lab-right-pane { grid-column: span 1 / span 1; min-width: 0; }
  #spec-lab-left-pane,
  #spec-lab-right-pane { height: auto; overflow: visible; }
  .spec-lab-stepper-grid { grid-template-columns: repeat(3, 1fr); }
  .spec-lab-audit-grid { grid-template-columns: 1fr; }
  .spec-lab-footer-status { display: none; }
  #spec-lab-footer-bar { flex-direction: column-reverse; align-items: stretch; }
  .spec-lab-footer-left,
  .spec-lab-footer-right { width: 100%; justify-content: space-between; }
  .spec-lab-save-stitch-toggle { flex: 1 1 100%; max-width: 100%; }
  #btn-approve-sdd-handoff { width: 100%; justify-content: center; white-space: normal; text-align: center; }
}
.spec-lab-custom-input-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spec-lab-custom-input-row #spec-lab-custom-answer { flex: 1 1 220px; min-width: 0; }
#spec-lab-custom-mode-group { display: inline-flex; align-items: center; flex-shrink: 0; background-color: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 2px; gap: 2px; }
.spec-lab-custom-mode-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 28px; padding: 4px 10px; border-radius: var(--studio-radius-sm); border: 1px solid transparent; background: transparent; color: #cbd5e1; font-family: var(--studio-font-sans); font-size: 11px; font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer; transition: background-color var(--studio-transition-fast), color var(--studio-transition-fast), border-color var(--studio-transition-fast), box-shadow var(--studio-transition-fast); }
.spec-lab-custom-mode-btn:hover:not(:disabled) { color: #f8fafc; background-color: rgba(34, 49, 77, 0.72); border-color: rgba(59, 130, 246, 0.35); }
.spec-lab-custom-mode-btn.active,
.spec-lab-custom-mode-btn[aria-pressed=true],
.spec-lab-custom-mode-btn[aria-checked=true] { background-color: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.52); color: #6ee7b7; box-shadow: 0 0 10px rgba(16, 185, 129, 0.18); }
.spec-lab-custom-mode-btn[data-custom-mode=replace].active,
.spec-lab-custom-mode-btn[data-mode=replace].active,
.spec-lab-custom-mode-btn[data-custom-mode=replace][aria-pressed=true],
.spec-lab-custom-mode-btn[data-mode=replace][aria-pressed=true],
.spec-lab-custom-mode-btn[data-custom-mode=replace][aria-checked=true],
.spec-lab-custom-mode-btn[data-mode=replace][aria-checked=true] { background-color: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.55); color: #fcd34d; box-shadow: 0 0 10px rgba(245, 158, 11, 0.18); }
.spec-lab-custom-mode-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.spec-lab-custom-mode-btn:focus-visible { outline: 2px solid var(--studio-border-focus-ring) !important; outline-offset: 2px !important; box-shadow: var(--studio-focus-glow) !important; }
@media (pointer: coarse) {
  .spec-lab-custom-mode-btn { min-height: 44px; padding: 6px 12px; }
}
.spec-lab-option-badges { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.spec-support-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--studio-radius-full); border: 1px solid rgba(148, 163, 184, 0.35); background-color: rgba(148, 163, 184, 0.14); color: #e2e8f0; font-family: var(--studio-font-mono); font-size: 10px; font-weight: 700; line-height: 1.35; letter-spacing: 0.02em; white-space: nowrap; flex-shrink: 0; }
.spec-support-pill .material-symbols-outlined { font-size: 12px; line-height: 1; }
.spec-support-pill--auto { background-color: rgba(16, 185, 129, 0.16); border-color: rgba(16, 185, 129, 0.5); color: #6ee7b7; }
.spec-support-pill--sdd { background-color: rgba(245, 158, 11, 0.16); border-color: rgba(245, 158, 11, 0.5); color: #fcd34d; }
.spec-support-pill--custom { background: linear-gradient( 135deg, rgba(139, 92, 246, 0.24), rgba(245, 158, 11, 0.18)); border-color: rgba(167, 139, 250, 0.58); color: #ddd6fe; }
.spec-lab-capability-advisories { background: linear-gradient( 180deg, rgba(245, 158, 11, 0.09) 0%, rgba(15, 22, 36, 0.96) 100%); border: 1px solid rgba(245, 158, 11, 0.38); border-radius: var(--studio-radius-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.spec-lab-capability-advisories.hidden { display: none !important; }
.spec-lab-capability-advisories.is-aligned,
.spec-lab-capability-advisories[data-status=aligned] { background: linear-gradient( 180deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 22, 36, 0.96) 100%); border-color: rgba(16, 185, 129, 0.38); }
.spec-lab-capability-advisories-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.spec-lab-capability-advisories-title { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: #fcd34d; margin: 0; }
.spec-lab-capability-advisories.is-aligned .spec-lab-capability-advisories-title,
.spec-lab-capability-advisories[data-status=aligned] .spec-lab-capability-advisories-title { color: #6ee7b7; }
.spec-lab-capability-advisories-sub { font-size: 11.5px; color: #cbd5e1; line-height: 1.45; margin: 0; }
.spec-lab-advisory-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--studio-radius-md); background-color: rgba(8, 12, 20, 0.86); border: 1px solid rgba(245, 158, 11, 0.28); border-left: 3px solid var(--studio-accent-amber); color: #e2e8f0; font-size: 12px; line-height: 1.45; }
.spec-lab-advisory-item--custom { border-color: rgba(167, 139, 250, 0.34); border-left-color: var(--studio-accent-violet-light); }
.spec-lab-advisory-item--auto { border-color: rgba(16, 185, 129, 0.3); border-left-color: var(--studio-accent-emerald); }
.spec-lab-footer-advisory-pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 28px; padding: 4px 10px; border-radius: var(--studio-radius-full); background-color: rgba(245, 158, 11, 0.14); border: 1px solid rgba(245, 158, 11, 0.42); color: #fcd34d; font-family: var(--studio-font-mono); font-size: 11px; font-weight: 600; line-height: 1.25; white-space: nowrap; flex: 0 0 auto; max-width: 100%; box-sizing: border-box; transition: all var(--studio-transition-fast); }
button.spec-lab-footer-advisory-pill { min-height: 44px; min-width: 44px; padding: 6px 10px; cursor: pointer; }
button.spec-lab-footer-advisory-pill:hover { background-color: rgba(245, 158, 11, 0.22); border-color: rgba(245, 158, 11, 0.7); color: #fef3c7; }
.spec-lab-footer-advisory-pill.is-aligned,
.spec-lab-footer-advisory-pill--aligned { background-color: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.42); color: #6ee7b7; }
.spec-lab-footer-advisory-pill.hidden { display: none !important; }
.spec-lab-footer-advisory-pill:focus-visible { outline: 2px solid var(--studio-border-focus-ring) !important; outline-offset: 2px !important; box-shadow: var(--studio-focus-glow) !important; }
#btn-spec-capabilities-config { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 6px 12px; border-radius: var(--studio-radius-md); background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: #e2e8f0; font-family: var(--studio-font-sans); font-size: 11.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer; flex-shrink: 0; transition: background-color var(--studio-transition-fast), border-color var(--studio-transition-fast), color var(--studio-transition-fast), box-shadow var(--studio-transition-fast); }
#btn-spec-capabilities-config .material-symbols-outlined { font-size: 16px; color: var(--studio-accent-blue-light); }
#btn-spec-capabilities-config:hover:not(:disabled) { background-color: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); color: #ffffff; box-shadow: 0 0 12px rgba(59, 130, 246, 0.22); }
#btn-spec-capabilities-config:focus-visible { outline: 2px solid var(--studio-border-focus-ring) !important; outline-offset: 2px !important; box-shadow: var(--studio-focus-glow) !important; }
.spec-cap-modal-backdrop:not(dialog) { position: fixed; inset: 0; z-index: 1350; background: rgba(6, 10, 19, 0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 20px; overscroll-behavior: contain; transition: opacity var(--studio-transition-normal); }
dialog#spec-lab-capabilities-modal { border: none; background: transparent; padding: 0; margin: 0; max-width: none; max-height: none; width: 100%; height: 100%; color: var(--studio-text-primary); }
dialog#spec-lab-capabilities-modal[open] { display: flex; align-items: center; justify-content: center; inset: 0; padding: 20px; }
dialog#spec-lab-capabilities-modal:modal { overscroll-behavior: contain; }
dialog#spec-lab-capabilities-modal::backdrop { background: rgba(6, 10, 19, 0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); overflow: hidden; overscroll-behavior: contain; }
#spec-lab-capabilities-modal.hidden,
.spec-cap-modal-backdrop.hidden { display: none !important; opacity: 0; pointer-events: none; }
.spec-cap-modal-dialog { width: min(100%, 760px); max-height: 88vh; background-color: var(--studio-bg-surface); border: 1px solid rgba(59, 130, 246, 0.38); border-radius: var(--studio-radius-xl); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.86), 0 0 32px rgba(59, 130, 246, 0.16); display: flex; flex-direction: column; overflow: hidden; color: var(--studio-text-primary); }
.spec-cap-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px 14px; background-color: var(--studio-bg-elevated); border-bottom: 1px solid var(--studio-border-subtle); flex-shrink: 0; }
.spec-cap-modal-title { margin: 0; font-size: 16px; font-weight: 700; color: #f8fafc; display: flex; align-items: center; gap: 8px; }
.spec-cap-modal-subtitle { margin: 4px 0 0; font-size: 12px; color: #cbd5e1; line-height: 1.45; }
.spec-cap-modal-close { min-width: 44px; min-height: 44px; border-radius: var(--studio-radius-full); background-color: rgba(255, 255, 255, 0.06); border: 1px solid var(--studio-border-subtle); color: #e2e8f0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: all var(--studio-transition-fast); }
.spec-cap-modal-close:hover { background-color: rgba(255, 255, 255, 0.14); border-color: var(--studio-border-highlight); color: #ffffff; }
.spec-cap-modal-body { padding: 16px 22px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; }
.spec-cap-group { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: var(--studio-radius-md); background-color: rgba(15, 22, 36, 0.92); border: 1px solid var(--studio-border-subtle); }
.spec-cap-group--auto { border-color: rgba(16, 185, 129, 0.38); border-left: 3px solid var(--studio-accent-emerald); background: linear-gradient( 180deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 22, 36, 0.95) 100%); }
.spec-cap-group--sdd { border-color: rgba(245, 158, 11, 0.38); border-left: 3px solid var(--studio-accent-amber); background: linear-gradient( 180deg, rgba(245, 158, 11, 0.08) 0%, rgba(15, 22, 36, 0.95) 100%); }
.spec-cap-group-header { display: flex; flex-direction: column; gap: 4px; }
.spec-cap-group-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.spec-cap-group-title { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.35; color: #f8fafc; }
.spec-cap-group--auto .spec-cap-group-title { color: #6ee7b7; }
.spec-cap-group--sdd .spec-cap-group-title { color: #fcd34d; }
.spec-cap-group-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; padding: 2px 9px; border-radius: var(--studio-radius-full); background-color: rgba(148, 163, 184, 0.18); border: 1px solid rgba(148, 163, 184, 0.42); color: #f1f5f9; font-family: var(--studio-font-mono); font-size: 11px; font-weight: 700; line-height: 1.3; flex-shrink: 0; }
.spec-cap-group--auto .spec-cap-group-count { background-color: rgba(16, 185, 129, 0.2); border-color: rgba(16, 185, 129, 0.55); color: #6ee7b7; }
.spec-cap-group--sdd .spec-cap-group-count { background-color: rgba(245, 158, 11, 0.2); border-color: rgba(245, 158, 11, 0.55); color: #fcd34d; }
.spec-cap-group-subtitle { margin: 0; font-size: 11.5px; color: #cbd5e1; line-height: 1.45; }
.spec-cap-group-rows { display: flex; flex-direction: column; gap: 8px; }
.spec-cap-group-empty { margin: 0; padding: 10px 12px; border-radius: var(--studio-radius-sm); border: 1px dashed var(--studio-border-subtle); font-size: 11.5px; color: #cbd5e1; text-align: center; }
.spec-cap-toggle-label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 4px; font-size: 12px; color: #e2e8f0; white-space: nowrap; cursor: pointer; }
.spec-cap-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: var(--studio-radius-md); background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); transition: border-color var(--studio-transition-fast), background-color var(--studio-transition-fast); }
.spec-cap-row:hover { background-color: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); }
.spec-cap-row-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.spec-cap-row-title { font-size: 13px; font-weight: 700; color: #f8fafc; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spec-cap-row-desc { font-size: 11.5px; color: #cbd5e1; line-height: 1.45; margin: 0; }
.spec-cap-row-controls { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.spec-cap-row-controls button,
.spec-cap-row-controls select,
.spec-cap-row-controls label { min-height: 44px; min-width: 44px; }
.spec-cap-row-controls select { padding: 6px 10px; border-radius: var(--studio-radius-sm); background-color: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); color: #f1f5f9; font-family: var(--studio-font-sans); font-size: 12px; cursor: pointer; }
.spec-cap-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: var(--studio-radius-full); background-color: rgba(148, 163, 184, 0.16); border: 1px solid rgba(148, 163, 184, 0.4); color: #e2e8f0; font-family: var(--studio-font-mono); font-size: 10.5px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.spec-cap-badge--auto,
.spec-cap-badge.is-auto { background-color: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.5); color: #6ee7b7; }
.spec-cap-badge--sdd,
.spec-cap-badge.is-sdd { background-color: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.5); color: #fcd34d; }
.spec-cap-badge--custom,
.spec-cap-badge.is-custom { background: linear-gradient( 135deg, rgba(139, 92, 246, 0.24), rgba(245, 158, 11, 0.18)); border-color: rgba(167, 139, 250, 0.55); color: #ddd6fe; }
.spec-cap-badge--unsupported,
.spec-cap-badge.is-unsupported { background-color: rgba(244, 63, 94, 0.18); border-color: rgba(244, 63, 94, 0.5); color: #fda4af; }
.spec-cap-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; background-color: var(--studio-bg-elevated); border-top: 1px solid var(--studio-border-subtle); flex-shrink: 0; flex-wrap: wrap; }
.spec-cap-modal-footer-actions { display: inline-flex; align-items: center; gap: 8px; }
.spec-cap-btn-secondary,
.spec-cap-btn-primary { min-height: 44px; min-width: 44px; padding: 8px 16px; border-radius: var(--studio-radius-md); font-family: var(--studio-font-sans); font-size: 12.5px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all var(--studio-transition-fast); }
.spec-cap-btn-secondary { background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: #e2e8f0; }
.spec-cap-btn-secondary:hover { background-color: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); color: #ffffff; }
.spec-cap-btn-primary { background-color: var(--studio-accent-emerald); border: 1px solid transparent; color: #080c14; box-shadow: var(--studio-accent-emerald-glow); }
.spec-cap-btn-primary:hover { background-color: var(--studio-accent-emerald-light); }
#spec-lab-capabilities-modal button:focus-visible,
#spec-lab-capabilities-modal input:focus-visible,
#spec-lab-capabilities-modal select:focus-visible,
#spec-lab-capabilities-modal textarea:focus-visible,
#spec-lab-capabilities-modal [tabindex]:focus-visible { outline: 2px solid var(--studio-border-focus-ring) !important; outline-offset: 2px !important; box-shadow: var(--studio-focus-glow) !important; }
@media (forced-colors: active) {
  .spec-lab-custom-mode-btn:focus-visible,
  .spec-lab-footer-advisory-pill:focus-visible,
  #btn-spec-capabilities-config:focus-visible,
  #spec-lab-capabilities-modal :is(button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid Highlight !important; outline-offset: 2px !important; }
  .spec-lab-custom-mode-btn.active { border-color: Highlight; }
}
@media (max-width: 900px) {
  .spec-lab-custom-input-row { flex-direction: column; align-items: stretch; }
  #spec-lab-custom-mode-group { width: 100%; justify-content: stretch; }
  .spec-lab-custom-mode-btn { flex: 1 1 0; min-height: 44px; }
  .spec-lab-footer-advisory-pill { width: 100%; max-width: 100%; justify-content: center; white-space: normal; text-align: center; }
  .spec-cap-modal-backdrop:not(dialog),
  dialog#spec-lab-capabilities-modal[open] { padding: 12px; align-items: flex-end; }
  .spec-cap-modal-dialog { width: 100%; max-height: 92vh; border-radius: var(--studio-radius-lg); }
  .spec-cap-modal-header,
  .spec-cap-modal-body,
  .spec-cap-modal-footer { padding-left: 16px; padding-right: 16px; }
  .spec-cap-group { padding: 10px 12px; }
  .spec-cap-group-title-row { align-items: flex-start; }
  .spec-cap-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .spec-cap-row-controls { width: 100%; flex-wrap: wrap; justify-content: space-between; }
  .spec-cap-modal-footer-actions { width: 100%; justify-content: stretch; }
  .spec-cap-btn-secondary,
  .spec-cap-btn-primary { flex: 1 1 0; }
}
.spec-lab-voice-handoff-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin-bottom: 10px; border-radius: 8px; background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.4); color: #fde68a; font-size: 12px; }
.spec-lab-voice-handoff-banner.hidden { display: none !important; }
.spec-lab-voice-handoff-copy { flex: 1 1 220px; line-height: 1.4; }
.spec-lab-voice-handoff-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; border-radius: 6px; background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(16, 185, 129, 0.5); color: #a7f3d0; font-size: 12px; font-weight: 600; cursor: pointer; }
.spec-lab-voice-handoff-btn:hover { background: rgba(16, 185, 129, 0.32); }
.spec-lab-provenance-badge { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 9999px; font-size: 10px; font-weight: 600; letter-spacing: 0.02em; border: 1px solid transparent; margin-left: 4px; }
.spec-lab-provenance-badge.provenance-user { background: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.45); color: #a7f3d0; }
.spec-lab-provenance-badge.provenance-auto { background: rgba(59, 130, 246, 0.18); border-color: rgba(59, 130, 246, 0.45); color: #bfdbfe; }
.spec-lab-provenance-badge.hidden { display: none !important; }
.spec-lab-design-arb-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin: 8px 0 10px; border-radius: 8px; background: rgba(15, 23, 42, 0.72); border: 1px solid rgba(56, 189, 248, 0.3); }
.spec-lab-design-arb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; flex: 1 1 260px; }
.spec-lab-design-arb-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 9999px; font-size: 11px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.spec-lab-design-arb-badge.verdict-ready { background: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.45); color: #a7f3d0; }
.spec-lab-design-arb-badge.verdict-conditional { background: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.45); color: #fde68a; }
.spec-lab-design-arb-badge.verdict-blocked { background: rgba(239, 68, 68, 0.18); border-color: rgba(239, 68, 68, 0.45); color: #fecaca; }
.spec-lab-design-arb-badge.verdict-incomplete { background: rgba(59, 130, 246, 0.18); border-color: rgba(59, 130, 246, 0.45); color: #bfdbfe; }
.spec-lab-design-arb-summary { font-size: 12px; line-height: 1.35; color: #cbd5e1; }
.spec-lab-design-arb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.spec-lab-design-arb-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; color: #e2e8f0; background: rgba(30, 41, 59, 0.9); border: 1px solid rgba(148, 163, 184, 0.35); cursor: pointer; white-space: nowrap; }
.spec-lab-design-arb-btn.primary { background: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.45); color: #a7f3d0; }
.spec-lab-design-arb-btn:hover:not(:disabled) { border-color: rgba(56, 189, 248, 0.7); background: rgba(30, 41, 59, 1); }
.spec-lab-design-arb-btn:focus-visible { outline: 2px solid #38bdf8; outline-offset: 2px; }
.spec-lab-design-arb-btn:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 640px) {
  .spec-lab-design-arb-btn { min-height: 44px; }
}
.audit-viewer-drift-banner.hidden { display: none !important; }
.audit-viewer-drift-banner { margin-bottom: 10px; }
.audit-drift-banner-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 7px; font-size: 12px; border: 1px solid rgba(148, 163, 184, 0.35); background: rgba(30, 41, 59, 0.75); color: #e2e8f0; }
.audit-drift-banner-inner.drift-aligned { border-color: rgba(16, 185, 129, 0.45); background: rgba(16, 185, 129, 0.12); }
.audit-drift-banner-inner.drift-detected { border-color: rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.12); }
.audit-drift-pill { padding: 2px 8px; border-radius: 9999px; font-size: 11px; font-weight: 700; background: rgba(15, 23, 42, 0.7); color: #f8fafc; }
.audit-drift-summary { flex: 1 1 200px; }
.audit-drift-meta { font-size: 11px; color: #cbd5e1; }
/* frontend/css/studio/hitl-config.css */
#studio-toast-container { bottom: 72px !important; right: 24px !important; pointer-events: none !important; }
.hitl-gates-modal-backdrop { position: fixed; inset: 0; z-index: 1300; background: rgba(6, 10, 19, 0.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 20px; transition: opacity var(--studio-transition-normal); }
.hitl-gates-modal-backdrop.hidden { display: none !important; opacity: 0; pointer-events: none; }
.hitl-gates-modal-card { width: 100%; max-width: 780px; max-height: 88vh; overflow-y: auto; background: var(--studio-bg-surface); border: 1px solid rgba(16, 185, 129, 0.35); border-radius: var(--studio-radius-xl); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 28px rgba(16, 185, 129, 0.15); padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; margin: 0 !important; }
.hitl-modal-close-btn { width: 34px; height: 34px; min-width: 34px; border-radius: var(--studio-radius-full); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--studio-transition-fast); }
.hitl-modal-close-btn:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; border-color: var(--studio-border-highlight); transform: scale(1.04); }
.hitl-gates-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--studio-border-subtle); margin-top: 4px; }
.hitl-modal-footer-hint { font-size: 11.5px; color: var(--studio-text-muted); }
.hitl-gates-config-card { background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 16px; margin: 14px 0; display: flex; flex-direction: column; gap: 12px; }
.hitl-gates-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hitl-gates-title-wrap { display: flex; align-items: center; gap: 10px; }
.hitl-gates-icon-badge { width: 32px; height: 32px; min-width: 32px; border-radius: var(--studio-radius-md); background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald-light); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 10px rgba(16, 185, 129, 0.25); }
.hitl-gates-title { font-size: 13.5px; font-weight: 700; color: var(--studio-text-primary); margin: 0; }
.hitl-gates-subtitle { font-size: 11px; color: var(--studio-text-secondary); margin: 2px 0 0 0; }
.hitl-count-badge { font-size: 11px; font-weight: 700; color: var(--studio-accent-emerald-light); background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.35); border-radius: var(--studio-radius-full); padding: 3px 10px; font-family: var(--studio-font-mono); white-space: nowrap; }
.hitl-involvement-preference-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); margin-bottom: 10px; }
.hitl-involvement-label { font-size: 11px; font-weight: 600; color: var(--studio-text-secondary); }
.hitl-involvement-buttons { display: inline-flex; gap: 6px; }
.hitl-presets-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hitl-presets-label { font-size: 11px; font-weight: 600; color: var(--studio-text-muted); }
.btn-hitl-preset { font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: var(--studio-radius-sm); background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); cursor: pointer; transition: all var(--studio-transition-fast); display: inline-flex; align-items: center; gap: 4px; }
.btn-hitl-preset:hover { background: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); color: var(--studio-text-primary); }
.btn-hitl-preset.active { background: rgba(16, 185, 129, 0.15); border-color: var(--studio-accent-emerald); color: var(--studio-accent-emerald-light); box-shadow: 0 0 8px rgba(16, 185, 129, 0.25); }
.btn-hitl-toggle-compact { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: var(--studio-radius-sm); background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); cursor: pointer; transition: all var(--studio-transition-fast); }
.btn-hitl-toggle-compact:hover { background: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); color: var(--studio-text-primary); }
.hitl-gates-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; transition: all var(--studio-transition-normal); }
@media (max-width: 1024px) {
  .hitl-gates-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hitl-gates-grid { grid-template-columns: 1fr; }
}
.hitl-gate-card { display: flex; align-items: center; padding: 9px 10px; background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); cursor: pointer; transition: all var(--studio-transition-fast); user-select: none; min-height: 52px; }
.hitl-gate-card:hover { background: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); }
.hitl-gate-card.active { border-color: var(--studio-accent-emerald); background: rgba(16, 185, 129, 0.08); box-shadow: 0 0 8px -2px rgba(16, 185, 129, 0.25); }
.hitl-gate-card-left { display: flex; align-items: flex-start; gap: 8px; width: 100%; min-width: 0; }
.hitl-gate-checkbox { width: 15px; height: 15px; min-width: 15px; margin-top: 2px; accent-color: var(--studio-accent-emerald); cursor: pointer; }
.hitl-gate-info { display: flex; flex-direction: column; gap: 3px; width: 100%; min-width: 0; }
.hitl-gate-top-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-width: 0; }
.hitl-gate-friendly-title { font-size: 11.5px; font-weight: 700; color: var(--studio-text-primary); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hitl-gate-submeta { display: block; font-size: 9.5px; font-family: var(--studio-font-mono); color: var(--studio-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hitl-gate-artifact { font-family: var(--studio-font-mono); font-size: 10px; font-weight: 600; color: var(--studio-accent-blue-light); }
.hitl-gate-meta { font-size: 9.5px; color: var(--studio-text-muted); }
.hitl-gate-pill { font-size: 8.5px; font-weight: 700; text-transform: uppercase; padding: 1px 5px; border-radius: var(--studio-radius-sm); letter-spacing: 0.03em; white-space: nowrap; flex-shrink: 0; }
.hitl-gate-pill.recommended { background: rgba(16, 185, 129, 0.15); color: var(--studio-accent-emerald-light); border: 1px solid rgba(16, 185, 129, 0.35); }
.hitl-gate-pill.optional { background: rgba(100, 116, 139, 0.15); color: var(--studio-text-muted); border: 1px solid rgba(100, 116, 139, 0.35); }
.right-pane-hitl-summary { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); margin-bottom: 10px; font-size: 11.5px; }
.right-pane-hitl-summary-text { display: flex; align-items: center; gap: 6px; color: var(--studio-text-secondary); }
.right-pane-hitl-summary-text strong { color: var(--studio-accent-emerald-light); font-weight: 700; }
.btn-hitl-configure-shortcut { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; font-size: 11px; font-weight: 600; border-radius: var(--studio-radius-sm); background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); cursor: pointer; transition: all var(--studio-transition-fast); }
.btn-hitl-configure-shortcut:hover { background: var(--studio-bg-card-hover); border-color: var(--studio-accent-emerald); color: var(--studio-text-primary); }
@keyframes hitlCardHighlight {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); border-color: var(--studio-accent-emerald); }
  50% { box-shadow: 0 0 16px 4px rgba(16, 185, 129, 0.4); border-color: var(--studio-accent-emerald-light); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); border-color: var(--studio-border-subtle); }
}
.hitl-highlight-pulse { animation: hitlCardHighlight 1.4s ease-out; }
/* frontend/css/studio/hitl-routing-and-pending.css */
.hitl-gate-card { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px; }
.hitl-gate-card-left { display: flex; flex-direction: row; align-items: flex-start; gap: 8px; width: 100%; min-width: 0; min-height: 44px; cursor: pointer; }
.hitl-gate-card:focus-within { border-color: var(--studio-border-focus-ring, #38bdf8); }
.hitl-gate-checkbox:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)); }
.hitl-gate-override-bar { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--studio-border-subtle, #263654); cursor: default; }
.hitl-gate-default-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; min-width: 0; }
.hitl-gate-default-role-chip { display: inline-flex; align-items: center; max-width: 100%; min-height: 24px; padding: 2px 8px; border-radius: var(--studio-radius-full, 9999px); font-size: 11px; font-weight: 600; line-height: 1.3; background: var(--studio-status-info-bg, #082f49); border: 1px solid var(--studio-status-info-border, #38bdf8); color: var(--studio-status-info-fg, #bae6fd); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hitl-gate-default-role-chip.is-fallback { background: var(--studio-status-warn-bg, #2b1d07); border-color: var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); }
.hitl-gate-otp-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 22px; padding: 2px 7px; border-radius: var(--studio-radius-full, 9999px); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; background: var(--studio-status-err-bg, #331018); border: 1px solid var(--studio-status-err-border, #fb7185); color: var(--studio-status-err-fg, #fecdd3); white-space: nowrap; flex-shrink: 0; }
.hitl-gate-override-controls { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; }
.hitl-gate-override-select { width: 100%; min-height: 44px !important; padding: 8px 10px !important; border-radius: var(--studio-radius-sm, 6px); border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-root, #080c14) !important; color: var(--studio-text-primary, #f1f5f9) !important; font-family: var(--studio-font-sans, sans-serif); font-size: 12px !important; line-height: 1.35; box-sizing: border-box; cursor: pointer; transition: border-color var(--studio-transition-fast, 0.15s ease); }
.hitl-gate-override-select:hover:not(:disabled) { border-color: var(--studio-border-highlight, #3b82f6); }
.hitl-gate-override-select:disabled { opacity: 0.6; cursor: not-allowed; }
.hitl-gate-override-select:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)); }
.hitl-gate-override-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.hitl-gate-override-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; max-width: 100%; padding: 2px 4px 2px 10px !important; border-radius: var(--studio-radius-full, 9999px); background: var(--studio-status-ok-bg, #052e2b) !important; border: 1px solid var(--studio-status-ok-border, #10b981) !important; color: var(--studio-status-ok-fg, #6ee7b7) !important; font-size: 11.5px !important; font-weight: 600; box-sizing: border-box; }
.hitl-gate-override-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hitl-gate-override-chip-remove { display: inline-flex !important; align-items: center; justify-content: center; min-width: 44px !important; min-height: 44px !important; margin: -2px -4px -2px 0 !important; padding: 0 !important; border: none; border-radius: var(--studio-radius-full, 9999px); background: transparent; color: inherit; font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; flex-shrink: 0; transition: background-color var(--studio-transition-fast, 0.15s ease), color var(--studio-transition-fast, 0.15s ease); }
.hitl-gate-override-chip-remove:hover { background: rgba(251, 113, 133, 0.22); color: var(--studio-status-err-fg, #fecdd3); }
.hitl-gate-override-chip-remove:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; }
#btn-hitl-pending-trigger { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 6px 12px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, sans-serif); font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; flex-shrink: 0; cursor: pointer; box-sizing: border-box; transition: background-color var(--studio-transition-fast, 0.15s ease), border-color var(--studio-transition-fast, 0.15s ease), box-shadow var(--studio-transition-fast, 0.15s ease); }
#btn-hitl-pending-trigger:hover { background: var(--studio-bg-card-hover, #22314d); border-color: var(--studio-border-highlight, #3b82f6); color: #ffffff; }
#btn-hitl-pending-trigger.has-pending { background: var(--studio-status-warn-bg, #2b1d07); border-color: var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); box-shadow: 0 0 14px -3px rgba(245, 158, 11, 0.45); }
#btn-hitl-pending-trigger.has-pending:hover { background: #3d2809; border-color: #fbbf24; color: #fef3c7; }
#btn-hitl-pending-trigger:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)); }
#btn-hitl-pending-trigger.hidden,
#btn-hitl-pending-trigger[hidden] { display: none !important; }
#hitl-pending-badge-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--studio-radius-full, 9999px); background: var(--studio-accent-amber, #f59e0b); color: var(--studio-text-inverse, #080c14); font-family: var(--studio-font-mono, monospace); font-size: 11px; font-weight: 800; line-height: 1; flex-shrink: 0; }
#hitl-pending-badge-count.hidden,
#hitl-pending-badge-count[hidden] { display: none !important; }
#hitl-pending-unread-dot,
[data-hitl-unread-dot] { width: 8px; height: 8px; min-width: 8px; border-radius: var(--studio-radius-full, 9999px); background: var(--studio-accent-amber, #f59e0b); box-shadow: 0 0 8px rgba(245, 158, 11, 0.75); flex-shrink: 0; }
#hitl-pending-unread-dot.hidden,
#hitl-pending-unread-dot[hidden],
[data-hitl-unread-dot].hidden,
[data-hitl-unread-dot][hidden] { display: none !important; }
#hitl-pending-drawer-backdrop,
.hitl-pending-drawer-backdrop { position: fixed; inset: 0; z-index: 1090; background: var(--studio-bg-overlay, rgba(8, 12, 20, 0.88)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#hitl-pending-drawer-backdrop.hidden,
#hitl-pending-drawer-backdrop[hidden],
.hitl-pending-drawer-backdrop.hidden,
.hitl-pending-drawer-backdrop[hidden],
#hitl-pending-drawer.hidden,
#hitl-pending-drawer[hidden],
.hitl-pending-drawer.hidden,
.hitl-pending-drawer[hidden] { display: none !important; }
#hitl-pending-drawer,
.hitl-pending-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1100; width: min(480px, 100vw); max-width: 100vw; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--studio-bg-surface, #0f1624); color: var(--studio-text-primary, #f1f5f9); border-left: 1px solid var(--studio-border-subtle, #263654); box-shadow: -18px 0 48px rgba(0, 0, 0, 0.78); font-family: var(--studio-font-sans, sans-serif); box-sizing: border-box; outline: none; overscroll-behavior: contain; animation: hitlDrawerSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes hitlDrawerSlideIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
#hitl-pending-drawer *,
#hitl-pending-drawer *::before,
#hitl-pending-drawer *::after { box-sizing: border-box; }
#hitl-pending-drawer .hitl-pending-drawer-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; background: var(--studio-bg-root, #080c14); border-bottom: 1px solid var(--studio-border-subtle, #263654); flex-shrink: 0; }
#hitl-pending-drawer .hitl-pending-drawer-title-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
#hitl-pending-drawer .hitl-pending-drawer-title,
#hitl-pending-drawer-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--studio-text-primary, #f1f5f9); }
#hitl-pending-drawer .hitl-pending-drawer-count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 8px; border-radius: var(--studio-radius-full, 9999px); background: var(--studio-status-warn-bg, #2b1d07); border: 1px solid var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); font-family: var(--studio-font-mono, monospace); font-size: 11.5px; font-weight: 700; }
#hitl-pending-drawer .hitl-pending-drawer-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
#hitl-pending-drawer .hitl-pending-icon-btn,
#btn-hitl-pending-close { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 44px; min-height: 44px; padding: 6px 12px; border-radius: var(--studio-radius-md, 10px); border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-elevated, #162032); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, sans-serif); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background-color var(--studio-transition-fast, 0.15s ease), border-color var(--studio-transition-fast, 0.15s ease); }
#hitl-pending-drawer .hitl-pending-icon-btn:hover,
#btn-hitl-pending-close:hover { background: var(--studio-bg-card-hover, #22314d); border-color: var(--studio-border-highlight, #3b82f6); color: #ffffff; }
#hitl-pending-drawer .hitl-pending-icon-btn:focus-visible,
#btn-hitl-pending-close:focus-visible,
#hitl-pending-drawer .hitl-pending-btn:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)); }
#hitl-pending-drawer-body,
#hitl-pending-drawer .hitl-pending-drawer-body { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
#hitl-pending-drawer .hitl-pending-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
#hitl-pending-drawer .hitl-pending-card { background: var(--studio-bg-card, #1b273d); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-lg, 14px); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; transition: border-color var(--studio-transition-fast, 0.15s ease), background-color var(--studio-transition-fast, 0.15s ease); }
#hitl-pending-drawer .hitl-pending-card:hover { border-color: var(--studio-border-highlight, #3b82f6); background: var(--studio-bg-card-hover, #22314d); }
#hitl-pending-drawer .hitl-pending-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
#hitl-pending-drawer .hitl-pending-card-project { font-size: 12px; font-weight: 600; color: #cbd5e1; margin-bottom: 3px; }
#hitl-pending-drawer .hitl-pending-card-artifact { font-family: var(--studio-font-mono, monospace); font-size: 14px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); overflow-wrap: anywhere; }
#hitl-pending-drawer .hitl-pending-card-stage { font-size: 12.5px; color: #cbd5e1; line-height: 1.4; }
#hitl-pending-drawer .hitl-pending-card-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#hitl-pending-drawer .hitl-pending-pill { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 3px 9px; border-radius: var(--studio-radius-full, 9999px); font-size: 11px; font-weight: 700; line-height: 1.2; background: var(--studio-status-muted-bg, #1e293b); border: 1px solid var(--studio-status-muted-border, #475569); color: var(--studio-status-muted-fg, #cbd5e1); white-space: nowrap; }
#hitl-pending-drawer .hitl-pending-pill-role { background: var(--studio-status-info-bg, #082f49); border-color: var(--studio-status-info-border, #38bdf8); color: var(--studio-status-info-fg, #bae6fd); }
#hitl-pending-drawer .hitl-pending-pill-otp { background: #2e1065; border-color: var(--studio-accent-violet-light, #a78bfa); color: #ede9fe; }
#hitl-pending-drawer .hitl-pending-pill-warning,
.hitl-pending-pill-warning { background: var(--studio-status-warn-bg, #2b1d07); border-color: var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); }
#hitl-pending-drawer .hitl-pending-delivery-note,
.hitl-pending-delivery-note { font-size: 12px; line-height: 1.45; color: var(--studio-status-warn-fg, #fde68a); background: var(--studio-status-warn-bg, #2b1d07); border: 1px solid var(--studio-status-warn-border, #f59e0b); border-radius: var(--studio-radius-sm, 6px); padding: 8px 10px; overflow-wrap: anywhere; }
#hitl-pending-drawer .hitl-pending-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: #cbd5e1; }
#hitl-pending-drawer .hitl-pending-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; }
#hitl-pending-drawer .hitl-pending-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 14px; border-radius: var(--studio-radius-md, 10px); font-family: var(--studio-font-sans, sans-serif); font-size: 12.5px; font-weight: 700; cursor: pointer; border: 1px solid transparent; transition: filter var(--studio-transition-fast, 0.15s ease), background-color var(--studio-transition-fast, 0.15s ease), border-color var(--studio-transition-fast, 0.15s ease), opacity var(--studio-transition-fast, 0.15s ease); }
#hitl-pending-drawer .hitl-pending-btn:disabled { opacity: 0.58; cursor: not-allowed; }
#hitl-pending-drawer .hitl-pending-btn-primary { background: linear-gradient( 135deg, #f59e0b, #fbbf24); color: var(--studio-text-inverse, #080c14); }
#hitl-pending-drawer .hitl-pending-btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
#hitl-pending-drawer .hitl-pending-btn-secondary { background: var(--studio-bg-elevated, #162032); border-color: var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); }
#hitl-pending-drawer .hitl-pending-btn-secondary:hover:not(:disabled) { background: var(--studio-bg-card-hover, #22314d); border-color: var(--studio-border-highlight, #3b82f6); }
#hitl-pending-drawer .hitl-pending-resend-feedback { font-size: 12px; line-height: 1.4; border-radius: var(--studio-radius-sm, 6px); padding: 8px 10px; }
#hitl-pending-drawer .hitl-pending-resend-feedback.ok { background: var(--studio-status-ok-bg, #052e2b); border: 1px solid var(--studio-status-ok-border, #10b981); color: var(--studio-status-ok-fg, #6ee7b7); }
#hitl-pending-drawer .hitl-pending-resend-feedback.warn { background: var(--studio-status-warn-bg, #2b1d07); border: 1px solid var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); }
#hitl-pending-drawer .hitl-pending-resend-feedback.err { background: var(--studio-status-err-bg, #331018); border: 1px solid var(--studio-status-err-border, #fb7185); color: var(--studio-status-err-fg, #fecdd3); }
#hitl-pending-drawer .hitl-pending-empty,
#hitl-pending-drawer .hitl-pending-loading,
#hitl-pending-drawer .hitl-pending-error { padding: 28px 18px; text-align: center; border-radius: var(--studio-radius-lg, 14px); border: 1px dashed var(--studio-border-subtle, #263654); background: var(--studio-bg-elevated, #162032); color: #cbd5e1; font-size: 13.5px; line-height: 1.5; }
#hitl-pending-drawer .hitl-pending-error { border-color: var(--studio-status-err-border, #fb7185); background: var(--studio-status-err-bg, #331018); color: var(--studio-status-err-fg, #fecdd3); display: flex; flex-direction: column; align-items: center; gap: 12px; }
#hitl-pending-drawer-footer,
#hitl-pending-drawer .hitl-pending-drawer-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-root, #080c14); font-size: 12px; color: #cbd5e1; flex-shrink: 0; }
#hitl-pending-footer-status,
#hitl-pending-drawer .hitl-pending-footer-status { color: #cbd5e1; }
#hitl-pending-footer-status.is-paused,
#hitl-pending-drawer .hitl-pending-footer-status.is-paused { color: var(--studio-status-warn-fg, #fde68a); font-weight: 600; }
#studio-hitl-routing-modal { position: fixed; inset: 0; z-index: 1050; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--studio-bg-overlay, rgba(8, 12, 20, 0.88)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); overscroll-behavior: contain; }
#studio-hitl-routing-modal.hidden,
#studio-hitl-routing-modal[hidden],
dialog#studio-hitl-routing-modal:not([open]) { display: none !important; }
dialog#studio-hitl-routing-modal[open] { display: flex; flex-direction: column; width: min(1080px, calc(100vw - 32px)); max-width: 100%; max-height: 90vh; max-height: 90dvh; margin: auto; padding: 0; overflow: hidden; border-radius: var(--studio-radius-xl, 18px); border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-surface, #0f1624); color: var(--studio-text-primary, #f1f5f9); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.82); }
dialog#studio-hitl-routing-modal::backdrop { background: var(--studio-bg-overlay, rgba(8, 12, 20, 0.88)); backdrop-filter: blur(8px); }
#studio-hitl-routing-modal .studio-modal-dialog,
#studio-hitl-routing-modal .hitl-routing-modal-dialog { width: 100%; max-width: 1080px; max-height: 90vh; max-height: 90dvh; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--studio-radius-xl, 18px); border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-surface, #0f1624); color: var(--studio-text-primary, #f1f5f9); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.82); box-sizing: border-box; }
#studio-hitl-routing-modal .studio-modal-header,
#studio-hitl-routing-modal .hitl-routing-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; background: var(--studio-bg-root, #080c14); border-bottom: 1px solid var(--studio-border-subtle, #263654); flex-shrink: 0; }
#studio-hitl-routing-modal .studio-modal-title,
#studio-hitl-routing-modal .hitl-routing-modal-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); }
#studio-hitl-routing-modal .studio-icon-btn,
#studio-hitl-routing-modal .hitl-routing-modal-close,
#btn-close-hitl-routing-modal { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: var(--studio-radius-md, 10px); border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-elevated, #162032); color: var(--studio-text-primary, #f1f5f9); cursor: pointer; flex-shrink: 0; transition: background-color var(--studio-transition-fast, 0.15s ease), border-color var(--studio-transition-fast, 0.15s ease); }
#studio-hitl-routing-modal .studio-icon-btn:hover,
#studio-hitl-routing-modal .hitl-routing-modal-close:hover,
#btn-close-hitl-routing-modal:hover { background: var(--studio-bg-card-hover, #22314d); border-color: var(--studio-border-highlight, #3b82f6); color: #ffffff; }
#studio-hitl-routing-modal .studio-icon-btn:focus-visible,
#studio-hitl-routing-modal .hitl-routing-modal-close:focus-visible,
#btn-close-hitl-routing-modal:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)); }
#studio-hitl-routing-modal .studio-modal-body,
#studio-hitl-routing-modal .hitl-routing-modal-body { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 20px 22px; }
#studio-hitl-routing-modal .studio-modal-footer,
#studio-hitl-routing-modal .hitl-routing-modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 22px; background: var(--studio-bg-root, #080c14); border-top: 1px solid var(--studio-border-subtle, #263654); flex-shrink: 0; }
.hitl-routing-matrix[data-hitl-routing-matrix],
.hitl-routing-matrix { display: flex; flex-direction: column; gap: 20px; color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, sans-serif); }
.hitl-routing-matrix *,
.hitl-routing-matrix *::before,
.hitl-routing-matrix *::after { box-sizing: border-box; }
.hitl-routing-matrix .hitl-matrix-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-lg, 14px); }
.hitl-routing-matrix .hitl-matrix-title { margin: 0; font-size: 16.5px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); }
.hitl-routing-matrix .hitl-matrix-subtitle { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: #cbd5e1; }
.hitl-routing-matrix .hitl-matrix-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hitl-routing-matrix .hitl-org-pill { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border-radius: var(--studio-radius-full, 9999px); font-family: var(--studio-font-mono, monospace); font-size: 12px; font-weight: 600; background: var(--studio-status-info-bg, #082f49); border: 1px solid var(--studio-status-info-border, #38bdf8); color: var(--studio-status-info-fg, #bae6fd); }
.hitl-routing-matrix .hitl-readonly-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-status-warn-bg, #2b1d07); border: 1px solid var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); font-size: 13px; font-weight: 600; }
.hitl-routing-matrix .hitl-alert-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: var(--studio-radius-md, 10px); font-size: 13px; line-height: 1.45; }
.hitl-routing-matrix .hitl-alert-banner.is-error { background: var(--studio-status-err-bg, #331018); border: 1px solid var(--studio-status-err-border, #fb7185); color: var(--studio-status-err-fg, #fecdd3); }
.hitl-routing-matrix .hitl-alert-banner.is-success { background: var(--studio-status-ok-bg, #052e2b); border: 1px solid var(--studio-status-ok-border, #10b981); color: var(--studio-status-ok-fg, #6ee7b7); }
.hitl-routing-matrix .hitl-section { display: flex; flex-direction: column; gap: 12px; }
.hitl-routing-matrix .hitl-section-heading { margin: 0; font-size: 14.5px; font-weight: 700; letter-spacing: 0.01em; color: var(--studio-text-primary, #f1f5f9); }
.hitl-routing-matrix .hitl-roles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.hitl-routing-matrix .hitl-role-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--studio-bg-card, #1b273d); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-lg, 14px); min-width: 0; }
.hitl-routing-matrix .hitl-role-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.hitl-routing-matrix .hitl-role-name { margin: 0; font-size: 15px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); }
.hitl-routing-matrix .hitl-role-key { font-family: var(--studio-font-mono, monospace); font-size: 11.5px; color: #cbd5e1; margin-top: 2px; }
.hitl-routing-matrix .hitl-role-desc { margin: 0; font-size: 12.5px; line-height: 1.5; color: #cbd5e1; }
.hitl-routing-matrix .hitl-chips-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; align-items: center; }
.hitl-routing-matrix .hitl-member-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 100%; padding: 4px 10px 4px 12px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); font-size: 12.5px; font-weight: 500; }
.hitl-routing-matrix .hitl-chip-remove { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: -4px -10px -4px 2px; border: none; border-radius: var(--studio-radius-sm, 6px); background: transparent; color: #cbd5e1; font-size: 17px; font-weight: 700; cursor: pointer; transition: background-color var(--studio-transition-fast, 0.15s ease), color var(--studio-transition-fast, 0.15s ease); }
.hitl-routing-matrix .hitl-chip-remove:hover:not(:disabled) { background: rgba(251, 113, 133, 0.2); color: var(--studio-status-err-fg, #fecdd3); }
.hitl-routing-matrix .hitl-role-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; }
.hitl-routing-matrix .hitl-select { flex: 1 1 180px; min-height: 44px; padding: 8px 12px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-root, #080c14); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, sans-serif); font-size: 13px; }
.hitl-routing-matrix .hitl-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 16px; border-radius: var(--studio-radius-md, 10px); border: 1px solid var(--studio-accent-blue, #3b82f6); background: var(--studio-accent-blue-container, #1d4ed8); color: #ffffff; font-family: var(--studio-font-sans, sans-serif); font-size: 13px; font-weight: 700; cursor: pointer; transition: background-color var(--studio-transition-fast, 0.15s ease), border-color var(--studio-transition-fast, 0.15s ease); }
.hitl-routing-matrix .hitl-btn:hover:not(:disabled) { background: #2563eb; border-color: var(--studio-accent-blue-light, #60a5fa); }
.hitl-routing-matrix .hitl-btn-secondary { border-color: var(--studio-border-subtle, #263654); background: var(--studio-bg-card, #1b273d); color: var(--studio-text-primary, #f1f5f9); }
.hitl-routing-matrix .hitl-btn-secondary:hover:not(:disabled) { background: var(--studio-bg-card-hover, #22314d); border-color: var(--studio-border-highlight, #3b82f6); }
.hitl-routing-matrix .hitl-btn:disabled,
.hitl-routing-matrix .hitl-select:disabled,
.hitl-routing-matrix .hitl-chip-remove:disabled,
.hitl-routing-matrix .hitl-otp-checkbox:disabled { opacity: 0.55; cursor: not-allowed; }
.hitl-routing-matrix .hitl-btn:focus-visible,
.hitl-routing-matrix .hitl-select:focus-visible,
.hitl-routing-matrix .hitl-chip-remove:focus-visible,
.hitl-routing-matrix .hitl-otp-checkbox:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)); }
.hitl-routing-matrix .hitl-table-wrap { overflow-x: auto; background: var(--studio-bg-root, #080c14); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-lg, 14px); }
.hitl-routing-matrix .hitl-gate-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hitl-routing-matrix .hitl-gate-table th,
.hitl-routing-matrix .hitl-gate-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--studio-border-subtle, #263654); vertical-align: middle; }
.hitl-routing-matrix .hitl-gate-table tbody tr:last-child td { border-bottom: none; }
.hitl-routing-matrix .hitl-gate-table tbody tr:hover { background: rgba(27, 39, 61, 0.45); }
.hitl-routing-matrix .hitl-gate-table th { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #cbd5e1; background: var(--studio-bg-elevated, #162032); }
.hitl-routing-matrix .hitl-gate-code { font-family: var(--studio-font-mono, monospace); font-size: 12.5px; font-weight: 600; color: var(--studio-text-primary, #f1f5f9); }
.hitl-routing-matrix .hitl-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--studio-radius-full, 9999px); font-size: 11px; font-weight: 700; margin-left: 6px; }
.hitl-routing-matrix .hitl-badge-risk { background: var(--studio-status-warn-bg, #2b1d07); border: 1px solid var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); }
.hitl-routing-matrix .hitl-badge-custom { background: var(--studio-status-info-bg, #082f49); border: 1px solid var(--studio-status-info-border, #38bdf8); color: var(--studio-status-info-fg, #bae6fd); }
.hitl-routing-matrix .hitl-otp-switch-label { display: inline-flex; align-items: center; gap: 10px; min-width: 44px; min-height: 44px; padding: 4px 10px; border-radius: var(--studio-radius-sm, 6px); color: var(--studio-text-primary, #f1f5f9); cursor: pointer; }
.hitl-routing-matrix .hitl-otp-checkbox { width: 20px; height: 20px; accent-color: var(--studio-accent-blue, #3b82f6); cursor: pointer; }
.hitl-routing-matrix .hitl-muted { font-size: 12px; color: #cbd5e1; }
.hitl-routing-matrix .hitl-empty-state,
.hitl-routing-matrix .hitl-loading-state { padding: 24px; border-radius: var(--studio-radius-lg, 14px); background: var(--studio-bg-elevated, #162032); border: 1px dashed var(--studio-border-subtle, #263654); color: #cbd5e1; font-size: 13.5px; text-align: center; }
@media (max-width: 640px) {
  #hitl-pending-drawer,
  .hitl-pending-drawer { width: 100vw; border-left: none; }
  #hitl-pending-drawer .hitl-pending-drawer-header,
  #hitl-pending-drawer-body,
  #hitl-pending-drawer .hitl-pending-drawer-body,
  #hitl-pending-drawer-footer,
  #hitl-pending-drawer .hitl-pending-drawer-footer { padding-left: 14px; padding-right: 14px; }
  #hitl-pending-drawer .hitl-pending-card-actions { flex-direction: column; align-items: stretch; }
  #hitl-pending-drawer .hitl-pending-btn { width: 100%; }
  #studio-hitl-routing-modal { padding: 8px; }
  #studio-hitl-routing-modal .studio-modal-header,
  #studio-hitl-routing-modal .hitl-routing-modal-header,
  #studio-hitl-routing-modal .studio-modal-body,
  #studio-hitl-routing-modal .hitl-routing-modal-body,
  #studio-hitl-routing-modal .studio-modal-footer,
  #studio-hitl-routing-modal .hitl-routing-modal-footer { padding-left: 14px; padding-right: 14px; }
  .hitl-routing-matrix .hitl-roles-grid { grid-template-columns: 1fr; }
  .hitl-routing-matrix .hitl-role-controls { flex-direction: column; align-items: stretch; }
  .hitl-routing-matrix .hitl-select,
  .hitl-routing-matrix .hitl-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #hitl-pending-drawer,
  .hitl-pending-drawer { animation: none; }
  .hitl-gate-override-select,
  .hitl-gate-override-chip-remove,
  #btn-hitl-pending-trigger,
  #hitl-pending-drawer .hitl-pending-icon-btn,
  #btn-hitl-pending-close,
  #hitl-pending-drawer .hitl-pending-card,
  #hitl-pending-drawer .hitl-pending-btn,
  #studio-hitl-routing-modal .studio-icon-btn,
  #studio-hitl-routing-modal .hitl-routing-modal-close,
  #btn-close-hitl-routing-modal,
  .hitl-routing-matrix .hitl-chip-remove,
  .hitl-routing-matrix .hitl-btn { transition: none; }
}
/* frontend/css/studio/hitl-review.css */
.hitl-pending-banner,
#studio-hitl-pending-banner { background: linear-gradient( 90deg, rgba(245, 158, 11, 0.16) 0%, rgba(15, 22, 36, 0.96) 100%); border-bottom: 1px solid rgba(245, 158, 11, 0.5); padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 45; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); flex-shrink: 0; transition: all var(--studio-transition-normal); }
.hitl-pending-banner.hidden,
#studio-hitl-pending-banner.hidden { display: none !important; }
.hitl-banner-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hitl-banner-pulse { width: 10px; height: 10px; min-width: 10px; border-radius: 50%; background: var(--studio-accent-amber); box-shadow: 0 0 10px var(--studio-accent-amber); animation: studio-pulse 1.5s infinite; }
.hitl-banner-icon { color: var(--studio-accent-amber); font-size: 20px !important; }
.hitl-banner-text-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hitl-banner-title { font-size: 12.5px; font-weight: 700; color: var(--studio-text-primary); }
.hitl-banner-subtitle { font-size: 11.5px; color: var(--studio-text-secondary); }
.hitl-banner-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-hitl-banner-action { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient( 135deg, #f59e0b, #fbbf24); color: #080c14; font-weight: 700; font-size: 12px; padding: 6px 14px; border-radius: var(--studio-radius-md); border: none; cursor: pointer; box-shadow: 0 0 12px rgba(245, 158, 11, 0.35); transition: all var(--studio-transition-fast); min-height: 36px; }
.btn-hitl-banner-action:hover { filter: brightness(1.1); transform: translateY(-1px); }
.hitl-review-overlay { position: fixed; inset: 0; background: var(--studio-bg-overlay); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.hitl-review-overlay.hidden { display: none !important; }
.hitl-review-dialog { background-color: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-xl); box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--studio-border-subtle); width: 100%; max-width: 960px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; padding: 0; gap: 0; }
.hitl-review-header { padding: 16px 20px; background: var(--studio-bg-surface); border-bottom: 1px solid var(--studio-border-subtle); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.hitl-header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hitl-status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--studio-radius-full); background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.4); color: var(--studio-accent-amber); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.hitl-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hitl-artifact-name-pill { font-family: var(--studio-font-mono); font-size: 13px; font-weight: 700; color: var(--studio-accent-blue-light); background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.4); padding: 2px 8px; border-radius: var(--studio-radius-sm); }
.hitl-revision-pill { font-family: var(--studio-font-mono); font-size: 11px; font-weight: 700; color: var(--studio-accent-emerald-light); background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); padding: 2px 8px; border-radius: var(--studio-radius-sm); }
.hitl-header-meta { margin-top: 2px; }
.hitl-modal-subtitle { font-size: 11.5px; color: var(--studio-text-secondary); }
.hitl-agent-name { color: var(--studio-accent-emerald-light); font-weight: 600; }
.hitl-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-hitl-dismiss { min-height: 36px; padding: 6px 12px; font-size: 12px; display: inline-flex; align-items: center; gap: 5px; }
.hitl-revision-success-banner { background: rgba(16, 185, 129, 0.12); border-bottom: 1px solid rgba(16, 185, 129, 0.35); color: var(--studio-accent-emerald-light); padding: 8px 20px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.hitl-revision-success-banner.hidden { display: none !important; }
.hitl-view-tabs-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 20px; background: var(--studio-bg-elevated); border-bottom: 1px solid var(--studio-border-subtle); flex-shrink: 0; }
.hitl-view-tabs { display: flex; align-items: center; gap: 4px; }
.hitl-view-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--studio-radius-md); font-size: 12px; font-weight: 600; color: var(--studio-text-secondary); background: transparent; border: 1px solid transparent; cursor: pointer; transition: all var(--studio-transition-fast); min-height: 32px; }
.hitl-view-tab:hover { color: var(--studio-text-primary); background: var(--studio-bg-card-hover); }
.hitl-view-tab.active { color: var(--studio-accent-emerald-light); background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.35); }
.hitl-view-tab.hidden { display: none !important; }
.hitl-tabs-actions { display: flex; align-items: center; gap: 6px; }
.hitl-review-body { flex: 1; overflow-y: auto; padding: 20px; min-height: 280px; max-height: 50vh; background: var(--studio-bg-root); position: relative; }
.hitl-tab-pane { display: block; }
.hitl-tab-pane.hidden { display: none !important; }
.hitl-rendered-markdown { font-size: 13.5px; line-height: 1.65; color: var(--studio-text-primary); }
.hitl-rendered-markdown h1,
.hitl-rendered-markdown h2,
.hitl-rendered-markdown h3,
.hitl-rendered-markdown h4 { color: var(--studio-text-primary); margin-top: 18px; margin-bottom: 8px; font-weight: 700; }
.hitl-rendered-markdown h1 { font-size: 20px; border-bottom: 1px solid var(--studio-border-subtle); padding-bottom: 6px; }
.hitl-rendered-markdown h2 { font-size: 16px; border-bottom: 1px solid var(--studio-border-muted); padding-bottom: 4px; }
.hitl-rendered-markdown h3 { font-size: 14px; }
.hitl-rendered-markdown p { margin-bottom: 10px; }
.hitl-rendered-markdown ul,
.hitl-rendered-markdown ol { margin: 8px 0 12px 24px; }
.hitl-rendered-markdown li { margin-bottom: 4px; }
.hitl-rendered-markdown code { font-family: var(--studio-font-mono); font-size: 12px; background: rgba(255, 255, 255, 0.08); padding: 2px 6px; border-radius: var(--studio-radius-sm); color: var(--studio-accent-blue-light); }
.hitl-rendered-markdown pre { background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 12px; overflow-x: auto; margin: 10px 0; }
.hitl-rendered-markdown pre code { background: transparent; padding: 0; color: var(--studio-text-primary); }
.hitl-rendered-markdown table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12.5px; }
.hitl-rendered-markdown th,
.hitl-rendered-markdown td { padding: 8px 12px; border: 1px solid var(--studio-border-subtle); text-align: left; }
.hitl-rendered-markdown th { background: var(--studio-bg-elevated); font-weight: 700; color: var(--studio-text-primary); }
.hitl-rendered-markdown tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
.hitl-rendered-markdown blockquote { border-left: 3px solid var(--studio-accent-blue); background: rgba(59, 130, 246, 0.08); padding: 8px 14px; margin: 10px 0; border-radius: 0 var(--studio-radius-sm) var(--studio-radius-sm) 0; color: var(--studio-text-secondary); }
.hitl-raw-source { font-family: var(--studio-font-mono); font-size: 12px; line-height: 1.55; color: var(--studio-text-secondary); background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 14px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.hitl-preview-frame-wrap { width: 100%; height: 440px; background: #ffffff; border-radius: var(--studio-radius-md); overflow: hidden; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5); }
.hitl-preview-frame-wrap iframe { width: 100%; height: 100%; border: none; }
.hitl-loading-overlay { position: absolute; inset: 0; background: rgba(8, 12, 20, 0.88); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 35; }
.hitl-loading-overlay.hidden { display: none !important; }
.hitl-loading-card { background: var(--studio-bg-surface); border: 1px solid var(--studio-border-highlight); border-radius: var(--studio-radius-lg); padding: 24px; text-align: center; max-width: 420px; box-shadow: 0 16px 32px rgba(0, 0, 0, 0.7); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hitl-loading-spinner { width: 32px; height: 32px; border: 3px solid rgba(16, 185, 129, 0.2); border-top-color: var(--studio-accent-emerald); border-radius: 50%; animation: studio-spin 0.8s linear infinite; }
.hitl-loading-title { font-size: 15px; font-weight: 700; color: var(--studio-text-primary); margin: 0; }
.hitl-loading-text { font-size: 12.5px; color: var(--studio-text-secondary); margin: 0; }
.hitl-remediation-composer { padding: 14px 20px; background: var(--studio-bg-surface); border-top: 1px solid var(--studio-border-subtle); flex-shrink: 0; }
.hitl-composer-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.hitl-composer-label { font-size: 12px; font-weight: 700; color: var(--studio-accent-amber); }
.hitl-composer-hint { font-size: 11px; color: var(--studio-text-muted); }
.hitl-composer-input-row { display: flex; gap: 10px; align-items: stretch; }
.hitl-feedback-textarea { flex: 1; min-height: 52px; max-height: 120px; background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 8px 12px; color: var(--studio-text-primary); font-family: var(--studio-font-sans); font-size: 12.5px; resize: vertical; outline: none; transition: border-color var(--studio-transition-fast); }
.hitl-feedback-textarea:focus { border-color: var(--studio-accent-blue); box-shadow: var(--studio-focus-glow); }
.btn-hitl-remediate { min-height: 44px; padding: 8px 16px; background: var(--studio-bg-elevated); border: 1px solid rgba(245, 158, 11, 0.4); color: var(--studio-accent-amber); font-weight: 600; font-size: 12.5px; border-radius: var(--studio-radius-md); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: all var(--studio-transition-fast); }
.btn-hitl-remediate:hover { background: rgba(245, 158, 11, 0.15); border-color: var(--studio-accent-amber); }
.hitl-review-footer { padding: 14px 20px; background: var(--studio-bg-surface); border-top: 1px solid var(--studio-border-subtle); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.hitl-footer-hint { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--studio-text-secondary); }
.btn-hitl-approve { min-height: 44px; padding: 10px 22px; background: linear-gradient( 135deg, #10b981, #059669); color: #002113; font-weight: 700; font-size: 13.5px; border: none; border-radius: var(--studio-radius-md); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; box-shadow: var(--studio-accent-emerald-glow); transition: all var(--studio-transition-fast); white-space: nowrap; }
.btn-hitl-approve:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-hitl-approve:disabled,
.btn-hitl-remediate:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-hitl-preset:focus-visible,
.hitl-gate-card:focus-visible,
.hitl-view-tab:focus-visible,
.btn-hitl-banner-action:focus-visible,
.btn-hitl-remediate:focus-visible,
.btn-hitl-approve:focus-visible,
.btn-hitl-dismiss:focus-visible { outline: 2px solid var(--studio-border-focus-ring) !important; outline-offset: 2px !important; box-shadow: var(--studio-focus-glow) !important; }
@media (max-width: 767px) {
  .hitl-review-dialog { max-width: 100%; max-height: 95vh; border-radius: var(--studio-radius-lg); }
  .hitl-composer-input-row { flex-direction: column; }
  .hitl-review-footer { flex-direction: column-reverse; gap: 8px; }
  .btn-hitl-approve,
  .btn-hitl-remediate { width: 100%; justify-content: center; }
  .hitl-gates-grid { grid-template-columns: 1fr; }
}
/* frontend/css/studio/slash-palette.css */
.slash-telemetry-cluster { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; padding-bottom: 7px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); background: transparent; border-top: none; border-left: none; border-right: none; border-radius: 0; width: 100%; box-sizing: border-box; }
.telemetry-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: var(--studio-radius-full); font-size: 10px; font-weight: 700; height: 20px; line-height: 1; white-space: nowrap; }
.telemetry-pill .pill-icon { font-size: 12px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.telemetry-pill.cmd-pill { background: rgba(139, 92, 246, 0.18); border: 1px solid rgba(139, 92, 246, 0.45); color: #c4b5fd; font-family: var(--studio-font-mono); }
.telemetry-pill.cmd-pill code { font-family: inherit; font-size: inherit; }
.telemetry-pill.skill-pill { background: rgba(59, 130, 246, 0.18); border: 1px solid rgba(59, 130, 246, 0.45); color: #93c5fd; }
.telemetry-pill.agent-pill { background: rgba(16, 185, 129, 0.18); border: 1px solid rgba(16, 185, 129, 0.45); color: #6ee7b7; }
.telemetry-pill.lock-pill { background: rgba(100, 116, 139, 0.18); border: 1px solid rgba(100, 116, 139, 0.45); color: #cbd5e1; }
.studio-slash-popover { position: absolute; z-index: 2147483640; background: var(--studio-bg-surface); border: 1px solid var(--studio-border-highlight); border-radius: var(--studio-radius-lg); box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.75), 0 0 20px rgba(59, 130, 246, 0.25); max-height: 380px; backdrop-filter: blur(16px); display: flex; flex-direction: column; overflow: hidden; width: 440px; max-width: calc(100vw - 32px); box-sizing: border-box; transition: opacity var(--studio-transition-fast), transform var(--studio-transition-fast); }
.popover-header { padding: 10px 14px; background: var(--studio-bg-elevated); border-bottom: 1px solid var(--studio-border-subtle); display: flex; flex-direction: column; gap: 8px; }
.popover-header-top { display: flex; align-items: center; justify-content: space-between; }
.popover-title { font-size: 11.5px; font-weight: 700; color: var(--studio-text-secondary); display: flex; align-items: center; gap: 6px; }
.popover-kbd-hint { font-size: 10.5px; color: var(--studio-text-muted); display: flex; align-items: center; gap: 6px; }
.studio-slash-popover kbd { background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: 4px; padding: 1px 5px; font-size: 10px; font-family: var(--studio-font-mono); color: var(--studio-text-primary); }
.category-chips-row { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.cat-chip { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--studio-border-muted); color: var(--studio-text-secondary); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--studio-radius-full); cursor: pointer; display: flex; align-items: center; gap: 5px; transition: all var(--studio-transition-fast); white-space: nowrap; }
.cat-chip:hover { background: var(--studio-bg-card-hover); color: var(--studio-text-primary); }
.cat-chip.active { background: var(--studio-accent-blue-container); border-color: var(--studio-border-highlight); color: #fff; }
.cat-chip.skill-chip.active { background: rgba(139, 92, 246, 0.3); border-color: var(--studio-accent-violet); color: #e9ddff; }
.cat-chip.action-chip.active { background: rgba(59, 130, 246, 0.3); border-color: var(--studio-accent-blue); color: #bfdbfe; }
.cat-chip.agent-chip.active { background: rgba(16, 185, 129, 0.3); border-color: var(--studio-accent-emerald); color: #a7f3d0; }
.popover-listbox { list-style: none; overflow-y: auto; max-height: 280px; padding: 6px; display: flex; flex-direction: column; gap: 2px; margin: 0; }
.slash-command-item,
.command-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: var(--studio-radius-md); cursor: pointer; transition: all var(--studio-transition-fast); border-left: 3px solid transparent; min-height: 38px; text-decoration: none; color: inherit; outline: none; }
.slash-command-item:hover,
.slash-command-item.selected,
.slash-command-item:focus,
.command-item:hover,
.command-item.selected,
.command-item:focus { background: var(--studio-bg-card-hover); border-left-color: var(--studio-border-highlight); outline: none; }
.slash-command-item.selected,
.command-item.selected { background: var(--studio-bg-card-active); }
.slash-command-item:focus-visible,
.command-item:focus-visible { outline: 2px solid var(--studio-border-focus-ring); outline-offset: 2px; box-shadow: var(--studio-focus-glow); }
@media (max-width: 768px), (pointer: coarse) {
  .slash-command-item,
  .command-item { min-height: 44px; padding: 10px 12px; }
  .studio-slash-popover { width: 100%; left: 0; right: 0; border-radius: var(--studio-radius-md); }
}
.cmd-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.cmd-icon-wrap { width: 26px; height: 26px; border-radius: var(--studio-radius-sm); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.cmd-icon-wrap.skill { background: rgba(139, 92, 246, 0.18); color: var(--studio-accent-violet-light); }
.cmd-icon-wrap.action { background: rgba(59, 130, 246, 0.18); color: var(--studio-accent-blue-light); }
.cmd-icon-wrap.agent { background: rgba(16, 185, 129, 0.18); color: var(--studio-accent-emerald-light); }
.cmd-details { display: flex; flex-direction: column; min-width: 0; }
.cmd-title-row { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: nowrap; }
.cmd-name { font-family: var(--studio-font-mono); font-size: 12.5px; font-weight: 700; color: var(--studio-text-primary); white-space: nowrap; flex-shrink: 0; }
.cmd-title-badge { font-size: 10.5px; font-weight: 600; color: var(--studio-text-secondary); background: rgba(255, 255, 255, 0.06); padding: 1px 6px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.08); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; flex-shrink: 1; }
.cmd-category-tag { font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; white-space: nowrap; flex-shrink: 0; }
.tag-skill { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.4); }
.tag-action { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.4); }
.tag-agent { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
.cmd-desc { font-size: 11.5px; color: var(--studio-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.instant-run-pill { font-size: 10px; font-weight: 700; color: var(--studio-accent-emerald-light); background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.35); border-radius: var(--studio-radius-full); padding: 1px 7px; }
.modifier-hint-pill { font-size: 10px; font-weight: 700; color: var(--studio-accent-amber); background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.35); border-radius: var(--studio-radius-full); padding: 1px 7px; }
.cmd-enter-tag { font-size: 10.5px; color: var(--studio-text-muted); opacity: 0; transition: opacity var(--studio-transition-fast); }
.slash-command-item.selected .cmd-enter-tag,
.command-item.selected .cmd-enter-tag { opacity: 1; }
.popover-footer,
.slash-modifier-hint { padding: 8px 12px; background: var(--studio-bg-card); border-top: 1px solid var(--studio-border-subtle); font-size: 11px; display: flex; align-items: center; justify-content: space-between; }
.slash-modifier-hint { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.35); color: var(--studio-accent-amber); border-radius: var(--studio-radius-md); margin: 4px; }
.modifier-notice { display: flex; align-items: center; gap: 5px; color: var(--studio-accent-amber); font-weight: 600; }
.slash-suggestion-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; background: rgba(244, 63, 94, 0.15); border: 1px solid rgba(244, 63, 94, 0.4); color: #fecdd3; border-radius: var(--studio-radius-full); font-size: 11px; font-weight: 700; cursor: pointer; transition: all var(--studio-transition-fast); margin-left: 6px; }
.slash-suggestion-chip:hover { background: rgba(244, 63, 94, 0.25); border-color: var(--studio-accent-rose); color: #fff; }
.slash-empty-state { padding: 20px 16px; text-align: center; color: var(--studio-text-secondary); font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
/* frontend/css/studio/print.css */
@media print {
  body { background: #ffffff !important; color: #000000 !important; overflow: visible !important; }
  #studio-topbar,
  #studio-console-aside,
  #studio-agent-drawer,
  #btn-expand-console,
  #btn-expand-drawer,
  #studio-canvas-pane,
  #studio-new-app-view,
  #studio-preview-modal,
  #studio-spec-lab-workspace,
  .exec-header-actions { display: none !important; }
  #studio-executive-workspace { display: block !important; padding: 0 !important; background: #ffffff !important; color: #000000 !important; height: auto !important; overflow: visible !important; }
  .exec-kpi-card,
  .exec-narrative-card,
  .exec-chart-card,
  .exec-deliverable-item { background: #ffffff !important; border: 1px solid #cccccc !important; color: #000000 !important; box-shadow: none !important; break-inside: avoid; page-break-inside: avoid; }
  .exec-kpi-value,
  .narrative-title,
  .chart-card-title,
  .exec-title-group h2 { color: #000000 !important; }
  .exec-kpi-sub,
  .narrative-highlight-item,
  .narrative-story-label { color: #047857 !important; }
  .exec-kpi-label,
  .narrative-body,
  .narrative-story-text,
  .narrative-highlight-value,
  .exec-title-group p { color: #333333 !important; }
  .narrative-highlight-label { color: #000000 !important; }
  .narrative-story-beat { background: #f8fafc !important; border-left-color: #047857 !important; }
  svg text { fill: #000000 !important; }
}
/* frontend/css/studio/stitch-studio-canvas.css */
.stitch-studio-dialog { position: fixed; inset: 0; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: none; background: var(--studio-bg-root); color: var(--studio-text-primary); font-family: var(--studio-font-sans); z-index: 150; display: flex; flex-direction: column; overflow: hidden; }
.stitch-studio-dialog:not([open]) { display: none; }
.stitch-studio-dialog::backdrop { background: rgba(8, 12, 20, 0.88); backdrop-filter: blur(8px); }
.stitch-studio-container { display: flex; flex-direction: column; width: 100%; height: 100%; overflow: hidden; position: relative; }
.stitch-studio-header { min-height: 60px; height: auto; display: flex; align-items: center; justify-content: space-between; padding: 6px 20px; border-bottom: 1px solid var(--studio-border-subtle); background: var(--studio-bg-surface); flex-shrink: 0; gap: 16px; z-index: 10; overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap; scrollbar-width: thin; -webkit-overflow-scrolling: touch; width: 100%; box-sizing: border-box; }
.stitch-studio-header::-webkit-scrollbar { height: 6px; }
.stitch-studio-header::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.6); }
.stitch-studio-header::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.5); border-radius: 3px; }
.stitch-studio-header::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.8); }
.stitch-studio-header-left,
.stitch-studio-header-center,
.stitch-studio-header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; white-space: nowrap; }
.stitch-brand-icon,
.stitch-studio-title-row,
.stitch-studio-heading,
.stitch-context-badge,
#stitch-studio-prd-alignment-banner,
.stitch-pinned-counter,
.stitch-segmented-control,
.stitch-seg-btn,
.stitch-header-divider,
.stitch-zoom-group,
.stitch-zoom-label,
.stitch-icon-btn-sm,
.stitch-remote-sync-group,
.stitch-btn-secondary,
.stitch-btn-primary-launch,
#btn-close-stitch-studio { flex-shrink: 0; white-space: nowrap; }
.stitch-brand-icon { width: 32px; height: 32px; border-radius: var(--studio-radius-md); background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.35); display: flex; align-items: center; justify-content: center; }
.stitch-studio-title-row { display: flex; align-items: center; gap: 8px; }
.stitch-studio-heading { font-size: 14px; font-weight: 800; color: var(--studio-text-primary); margin: 0; letter-spacing: -0.01em; }
.stitch-context-badge { font-size: 10.5px; padding: 2px 8px; border-radius: var(--studio-radius-full); background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.35); color: var(--studio-accent-blue-light); font-weight: 600; }
.stitch-pinned-counter { font-size: 11px; color: var(--studio-accent-emerald-light); font-weight: 600; display: block; margin-top: 2px; }
.stitch-segmented-control { display: inline-flex; align-items: center; background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 2px; gap: 2px; }
.stitch-seg-btn { background: none; border: none; color: var(--studio-text-secondary); font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: var(--studio-radius-sm); cursor: pointer; transition: all 0.15s ease; display: inline-flex; align-items: center; gap: 4px; }
.stitch-seg-btn:hover { background: var(--studio-bg-card); color: var(--studio-text-primary); }
.stitch-seg-btn.active { background: var(--studio-bg-card); color: var(--studio-accent-blue-light); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.stitch-header-divider { width: 1px; height: 24px; background: var(--studio-border-subtle); margin: 0 4px; }
.stitch-zoom-group { display: flex; align-items: center; gap: 4px; background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 2px 6px; }
.stitch-zoom-label { font-size: 11px; font-weight: 600; color: var(--studio-text-primary); min-width: 38px; text-align: center; }
.stitch-icon-btn-sm { background: none; border: none; color: var(--studio-text-secondary); width: 24px; height: 24px; border-radius: var(--studio-radius-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.15s ease; }
.stitch-icon-btn-sm:hover { background: var(--studio-bg-card); color: var(--studio-text-primary); }
.stitch-btn-primary-launch { background: linear-gradient( 135deg, #0ea5e9, #10b981); border: none; border-radius: var(--studio-radius-md); color: #fff; font-size: 11.5px; font-weight: 700; padding: 6px 14px; cursor: pointer; display: flex; align-items: center; gap: 6px; box-shadow: var(--studio-accent-emerald-glow); transition: filter 0.15s ease, transform 0.15s ease; white-space: nowrap; }
.stitch-btn-primary-launch:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-open-stitch-studio-prominent { background: linear-gradient( 135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.15)); border: 1px solid rgba(16, 185, 129, 0.4); border-radius: var(--studio-radius-md); color: var(--studio-accent-emerald-light); font-size: 11.5px; font-weight: 700; padding: 5px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s ease; box-shadow: 0 0 12px -2px rgba(16, 185, 129, 0.25); white-space: nowrap; }
.btn-open-stitch-studio-prominent:hover { border-color: var(--studio-accent-emerald); background: linear-gradient( 135deg, rgba(16, 185, 129, 0.25), rgba(59, 130, 246, 0.25)); transform: translateY(-1px); }
.stitch-studio-body { flex: 1; min-height: 0; height: auto; display: flex; position: relative; overflow: hidden; }
.stitch-panoramic-canvas,
.stitch-studio-panoramic-canvas { flex: 1; overflow-x: auto; overflow-y: auto; padding: 16px 24px 110px 24px; position: relative; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; background: var(--studio-bg-root); background-image: radial-gradient(rgba(140, 144, 159, 0.12) 1px, transparent 1px); background-size: 24px 24px; scroll-behavior: smooth; }
.stitch-screens-track { display: flex; gap: 24px; min-width: max-content; align-items: flex-start; transition: transform 0.2s ease; transform-origin: top left; }
.stitch-screen-frame-card,
.stitch-studio-screen-card { border-radius: var(--studio-radius-lg); background: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--studio-shadow-lg); transition: all 0.2s ease; flex-shrink: 0; height: 720px; }
.stitch-screen-frame-card.selected-for-edit,
.stitch-studio-screen-card.selected-for-edit { border-color: var(--studio-border-highlight); box-shadow: 0 0 0 2px var(--studio-border-highlight), 0 0 24px rgba(59, 130, 246, 0.3); }
.stitch-screen-frame-card.viewport-mobile,
.stitch-studio-screen-card.viewport-mobile { width: 360px; height: 720px; }
.stitch-screen-frame-card.viewport-tablet,
.stitch-studio-screen-card.viewport-tablet { width: 768px; height: 820px; }
.stitch-screen-frame-card.viewport-desktop,
.stitch-studio-screen-card.viewport-desktop { width: clamp(680px, 50vw, 1020px); height: 740px; }
.stitch-screen-card-header { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--studio-border-subtle); background: var(--studio-bg-elevated); flex-shrink: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; -webkit-overflow-scrolling: touch; gap: 8px; flex-wrap: nowrap; box-sizing: border-box; }
.stitch-screen-card-header::-webkit-scrollbar { height: 4px; }
.stitch-screen-card-header::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.4); }
.stitch-screen-card-header::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.4); border-radius: 2px; }
.screen-card-title-group { display: flex; align-items: center; gap: 8px; overflow: hidden; flex-shrink: 0; }
.screen-card-index { font-size: 11px; font-weight: 800; color: var(--studio-accent-emerald-light); flex-shrink: 0; }
.screen-card-title { font-size: 11.5px; font-weight: 700; color: var(--studio-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; flex-shrink: 0; }
.screen-card-badge { font-size: 9.5px; padding: 1px 6px; border-radius: var(--studio-radius-full); background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.35); color: var(--studio-accent-blue-light); text-transform: uppercase; font-weight: 600; flex-shrink: 0; white-space: nowrap; }
.stitch-screen-card-actions { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; border-bottom: 1px solid var(--studio-border-subtle); background: var(--studio-bg-surface); flex-shrink: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; -webkit-overflow-scrolling: touch; gap: 8px; flex-wrap: nowrap; box-sizing: border-box; }
.stitch-screen-card-actions::-webkit-scrollbar { height: 4px; }
.stitch-screen-card-actions::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.4); }
.stitch-screen-card-actions::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.4); border-radius: 2px; }
.screen-pin-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--studio-text-secondary); cursor: pointer; user-select: none; flex-shrink: 0; white-space: nowrap; }
.screen-pin-label:hover { color: var(--studio-text-primary); }
.screen-pin-checkbox { accent-color: var(--studio-accent-emerald); width: 14px; height: 14px; cursor: pointer; flex-shrink: 0; }
.screen-card-btn-group { display: flex; align-items: center; gap: 4px; flex-shrink: 0; white-space: nowrap; }
.btn-screen-action { background: none; border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-sm); color: var(--studio-text-secondary); font-size: 10.5px; font-weight: 600; padding: 3px 8px; display: flex; align-items: center; gap: 4px; cursor: pointer; transition: all 0.15s ease; flex-shrink: 0; white-space: nowrap; }
.btn-screen-action:hover { background: var(--studio-bg-card); color: var(--studio-text-primary); border-color: var(--studio-border-highlight); }
.btn-screen-action.active { background: rgba(59, 130, 246, 0.2); border-color: var(--studio-accent-blue); color: var(--studio-accent-blue-light); }
.stitch-screen-card-body { flex: 1; position: relative; background: #000; overflow: hidden; }
.stitch-screen-card-iframe { width: 100%; height: 100%; border: none; display: block; }
.stitch-screen-card-code { width: 100%; height: 100%; border: none; background: #080c14; color: #a6accd; padding: 12px; font-family: var(--studio-font-mono); font-size: 11px; line-height: 1.5; overflow: auto; white-space: pre; display: none; }
.stitch-screen-card-loading { position: absolute; inset: 0; background: rgba(8, 12, 20, 0.85); backdrop-filter: blur(4px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--studio-accent-emerald-light); font-size: 12px; font-weight: 600; z-index: 10; }
/* frontend/css/studio/stitch-studio-drawers.css */
.stitch-side-drawer,
.stitch-studio-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 440px; max-width: 90vw; background: var(--studio-bg-surface); border-left: 1px solid var(--studio-border-subtle); z-index: 160; overflow-y: auto; box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5); transform: translateX(100%); transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column; }
.stitch-side-drawer:not(.hidden),
.stitch-studio-drawer.stitch-drawer-open { transform: translateX(0); }
.drawer-header { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--studio-border-subtle); flex-shrink: 0; }
.drawer-title { font-size: 13.5px; font-weight: 800; color: var(--studio-text-primary); margin: 0; }
.drawer-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.drawer-label { font-size: 11.5px; font-weight: 700; color: var(--studio-text-primary); display: block; }
.drawer-sublabel { font-size: 11px; font-weight: 600; color: var(--studio-text-secondary); display: block; margin-bottom: 6px; }
.drawer-textarea { width: 100%; background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 10px 12px; color: var(--studio-text-primary); font-size: 12px; line-height: 1.5; resize: vertical; outline: none; transition: border-color 0.15s ease; }
.drawer-textarea:focus { border-color: var(--studio-border-highlight); }
.drawer-select { width: 100%; background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 8px 10px; color: var(--studio-text-primary); font-size: 11.5px; outline: none; }
.drawer-chips-cluster { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer-chip { background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); color: var(--studio-text-secondary); font-size: 11px; font-weight: 600; padding: 4px 10px; cursor: pointer; transition: all 0.15s ease; }
.drawer-chip:hover { background: var(--studio-bg-card); border-color: var(--studio-accent-emerald); color: var(--studio-accent-emerald-light); }
.drawer-pills-row { display: flex; gap: 6px; }
.drawer-pill { flex: 1; background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); color: var(--studio-text-secondary); font-size: 11px; font-weight: 700; padding: 6px 0; text-align: center; cursor: pointer; transition: all 0.15s ease; }
.drawer-pill.active,
.drawer-pill:hover { background: var(--studio-bg-card); color: var(--studio-text-primary); }
.drawer-pill.active { border-color: var(--studio-accent-violet); color: var(--studio-accent-violet-light); }
.drawer-aspect-chip { background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); color: var(--studio-text-secondary); font-size: 11px; font-weight: 600; padding: 4px 12px; cursor: pointer; transition: all 0.15s ease; }
.drawer-aspect-chip.active { background: rgba(139, 92, 246, 0.2); border-color: var(--studio-accent-violet); color: var(--studio-accent-violet-light); }
.drawer-primary-btn { background: linear-gradient( 135deg, #0ea5e9, #10b981); border: none; border-radius: var(--studio-radius-md); color: #fff; font-size: 12px; font-weight: 700; padding: 10px 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: filter 0.15s ease; }
.drawer-primary-btn:hover { filter: brightness(1.1); }
.drawer-action-btn { background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); color: var(--studio-text-primary); font-size: 11.5px; font-weight: 700; padding: 8px 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.15s ease; }
.drawer-action-btn:hover { border-color: var(--studio-accent-emerald); color: var(--studio-accent-emerald-light); }
.drawer-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drawer-palette-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.palette-card { background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: all 0.15s ease; text-align: left; }
.palette-card:hover { border-color: var(--studio-accent-blue); }
.palette-card.active { border-color: var(--studio-accent-emerald); background: var(--studio-bg-card); }
.palette-name { font-size: 11px; font-weight: 700; color: var(--studio-text-primary); }
.palette-swatches { display: flex; gap: 6px; }
.palette-swatches span { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.drawer-code-editor { width: 100%; background: #080c14; border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 10px; color: #a6accd; font-family: var(--studio-font-mono); font-size: 11px; line-height: 1.5; resize: vertical; outline: none; }
.variants-results-grid { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.variant-result-item { background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.stitch-floating-edit-bar,
.stitch-studio-edit-bar { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); width: min(840px, 92vw); background: rgba(15, 22, 36, 0.94); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-xl); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(59, 130, 246, 0.15); z-index: 155; padding: 12px 18px; backdrop-filter: blur(16px); display: flex; flex-direction: column; gap: 8px; }
.stitch-edit-bar-tip { font-size: 10.5px; color: var(--studio-text-muted); display: flex; align-items: center; gap: 4px; }
.stitch-edit-bar-container { display: flex; align-items: center; gap: 10px; width: 100%; }
.stitch-edit-scope-tag { flex-shrink: 0; }
.stitch-target-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: var(--studio-radius-full); background: rgba(59, 130, 246, 0.18); border: 1px solid rgba(59, 130, 246, 0.4); color: var(--studio-accent-blue-light); white-space: nowrap; }
.stitch-edit-input-wrapper { display: flex; align-items: center; gap: 8px; flex: 1; background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); padding: 4px 6px 4px 14px; transition: border-color 0.15s ease; }
.stitch-edit-input-wrapper:focus-within { border-color: var(--studio-border-highlight); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25); }
.stitch-edit-input { flex: 1; background: none; border: none; color: var(--studio-text-primary); font-size: 12px; outline: none; }
.stitch-btn-apply-edit { background: linear-gradient( 135deg, #0ea5e9, #10b981); border: none; border-radius: var(--studio-radius-md); color: #fff; font-size: 11.5px; font-weight: 700; padding: 6px 14px; cursor: pointer; display: flex; align-items: center; gap: 6px; white-space: nowrap; transition: filter 0.15s ease; }
.stitch-btn-apply-edit:hover { filter: brightness(1.1); }
.stitch-edit-chips-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.edit-quick-chip { background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-full); color: var(--studio-text-secondary); font-size: 10.5px; font-weight: 600; padding: 2px 10px; cursor: pointer; transition: all 0.15s ease; }
.edit-quick-chip:hover { background: rgba(59, 130, 246, 0.15); border-color: var(--studio-accent-blue); color: var(--studio-accent-blue-light); }
.stitch-studio-dialog button:focus-visible,
.stitch-studio-dialog input:focus-visible,
.stitch-studio-dialog textarea:focus-visible,
.stitch-studio-dialog select:focus-visible { outline: 2px solid #38bdf8 !important; outline-offset: 2px; }
#btn-launch-stitch-screen,
.btn-stitch-launch { min-height: 44px; min-width: 44px; padding: 10px 20px; font-size: 13px; font-weight: 700; color: #ffffff; background: linear-gradient( 135deg, #0ea5e9 0%, #10b981 100%); border: 1px solid rgba(56, 189, 248, 0.4); border-radius: var(--studio-radius-md); box-shadow: 0 4px 16px -2px rgba(16, 185, 129, 0.4), 0 0 20px -4px rgba(14, 165, 233, 0.3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all var(--studio-transition-normal); white-space: nowrap; letter-spacing: -0.01em; }
#btn-launch-stitch-screen:hover,
.btn-stitch-launch:hover { filter: brightness(1.12); transform: translateY(-1.5px) scale(1.01); box-shadow: 0 6px 22px -2px rgba(16, 185, 129, 0.5), 0 0 26px -3px rgba(14, 165, 233, 0.4); border-color: rgba(56, 189, 248, 0.8); }
#btn-launch-stitch-screen:active,
.btn-stitch-launch:active { transform: translateY(0) scale(0.98); filter: brightness(0.96); }
#btn-launch-stitch-screen:focus-visible,
.btn-stitch-launch:focus-visible { outline: 2px solid var(--studio-border-focus-ring) !important; outline-offset: 2px !important; box-shadow: var(--studio-focus-glow), 0 0 20px -3px rgba(16, 185, 129, 0.5) !important; }
#btn-launch-stitch-screen:disabled,
.btn-stitch-launch:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.5); transform: none; box-shadow: none; }
#stitch-studio-prd-drawer.stitch-prd-drawer { width: min(580px, 94vw); background: var(--studio-bg-surface); border-left: 1px solid var(--studio-border-subtle); box-shadow: -8px 0 32px rgba(0, 0, 0, 0.6); z-index: 40; }
#stitch-studio-full-prd-input { font-family: var(--studio-font-mono, "JetBrains Mono", monospace); font-size: 12px; line-height: 1.55; background: var(--studio-bg-root); color: var(--studio-text-primary); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); padding: 12px 14px; resize: vertical; min-height: 280px; max-height: calc(100vh - 330px); overflow-y: auto; tab-size: 2; transition: border-color var(--studio-transition-fast), box-shadow var(--studio-transition-fast); }
#stitch-studio-full-prd-input:focus-visible { border-color: var(--studio-border-focus-ring); outline: 2px solid var(--studio-border-focus-ring) !important; outline-offset: 1px; box-shadow: var(--studio-focus-glow); }
#stitch-studio-full-prd-input::placeholder { color: var(--studio-text-muted); opacity: 0.75; }
.stitch-prd-char-counter { font-size: 11px; font-weight: 600; color: var(--studio-text-secondary); }
#stitch-studio-model-select { background: var(--studio-bg-card); color: var(--studio-text-primary); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-sm); padding: 8px 12px; font-size: 12px; font-weight: 500; width: 100%; cursor: pointer; transition: border-color var(--studio-transition-fast); }
#stitch-studio-model-select:focus-visible { border-color: var(--studio-border-focus-ring); outline: 2px solid var(--studio-border-focus-ring) !important; box-shadow: var(--studio-focus-glow); }
#stitch-design-options-grid,
.vibe-grid,
.stitch-variant-pills-row,
#stitch-options-section-title,
#stitch-options-section-subtitle,
#btn-generate-4-stitch-options,
#stitch-options-empty-state { display: none !important; }
/* frontend/css/studio/audit-trail.css */
.btn-audit-trail-trigger { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; min-height: 32px; border-radius: var(--studio-radius-md); font-size: 12px; font-weight: 600; color: var(--studio-text-primary); background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: pointer; transition: all var(--studio-transition-normal); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
.btn-audit-trail-trigger:hover { background: rgba(16, 185, 129, 0.22); border-color: var(--studio-accent-emerald); box-shadow: 0 0 14px rgba(16, 185, 129, 0.35); transform: translateY(-1px); }
.btn-audit-trail-banner { padding: 5px 12px; font-size: 11.5px; background: rgba(59, 130, 246, 0.15); border-color: rgba(96, 165, 250, 0.4); color: #e0f2fe; }
.btn-audit-trail-banner:hover { background: rgba(59, 130, 246, 0.25); border-color: var(--studio-accent-blue); box-shadow: 0 0 14px rgba(59, 130, 246, 0.35); }
@keyframes auditGlowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); border-color: rgba(16, 185, 129, 0.5); }
  50% { box-shadow: 0 0 14px 2px rgba(16, 185, 129, 0.7); border-color: var(--studio-accent-emerald-light); }
}
.btn-audit-trail-trigger.audit-ready-pulse { animation: auditGlowPulse 2.4s infinite ease-in-out; border-color: var(--studio-accent-emerald); }
.audit-trail-dialog { max-width: 1360px; width: 95vw; height: 92vh; max-height: 92vh; background: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-xl); box-shadow: 0 28px 56px -12px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--studio-border-subtle); display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.audit-trail-header { padding: 14px 22px; background: var(--studio-bg-surface); border-bottom: 1px solid var(--studio-border-subtle); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-shrink: 0; }
.audit-header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.audit-shield-badge { width: 38px; height: 38px; border-radius: var(--studio-radius-md); background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.audit-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.audit-modal-subtitle { font-size: 11.5px; color: var(--studio-text-secondary); margin-top: 2px; }
.audit-modal-subtitle strong { color: var(--studio-text-primary); font-weight: 600; }
.audit-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.audit-version-select-wrapper { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--studio-text-secondary); }
.audit-version-label { font-size: 11.5px; font-weight: 600; color: var(--studio-text-muted); }
.audit-version-select { background: var(--studio-bg-card); color: var(--studio-text-primary); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-sm); padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; outline: none; }
.audit-version-select:focus-visible { border-color: var(--studio-accent-blue); box-shadow: var(--studio-focus-glow); }
.btn-view-audit-report { min-height: 34px; padding: 6px 12px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.audit-trail-kpi-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 12px 22px; background: var(--studio-bg-root); border-bottom: 1px solid var(--studio-border-subtle); flex-shrink: 0; }
.audit-kpi-card { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--studio-radius-md); background: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); min-width: 0; transition: border-color var(--studio-transition-fast); }
.audit-kpi-card:hover { border-color: var(--studio-border-highlight); }
.audit-kpi-icon { width: 36px; height: 36px; border-radius: var(--studio-radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.audit-kpi-icon.total-icon { background: rgba(96, 165, 250, 0.15); color: var(--studio-accent-blue-light); border: 1px solid rgba(96, 165, 250, 0.3); }
.audit-kpi-icon.hitl-icon { background: rgba(16, 185, 129, 0.15); color: var(--studio-accent-emerald); border: 1px solid rgba(16, 185, 129, 0.35); }
.audit-kpi-icon.auto-icon { background: rgba(245, 158, 11, 0.15); color: var(--studio-accent-amber); border: 1px solid rgba(245, 158, 11, 0.35); }
.audit-kpi-icon.approver-icon { background: rgba(139, 92, 246, 0.15); color: var(--studio-accent-violet-light); border: 1px solid rgba(139, 92, 246, 0.3); }
.audit-kpi-content { min-width: 0; overflow: hidden; }
.audit-kpi-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--studio-text-muted); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.audit-kpi-val { font-size: 13px; font-weight: 700; color: var(--studio-text-primary); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; margin-top: 2px; }
.audit-kpi-val.text-emerald { color: var(--studio-accent-emerald-light); }
.audit-kpi-val.text-amber { color: var(--studio-accent-amber); }
.audit-kpi-val.approver-val { display: flex; flex-direction: column; gap: 1px; }
.audit-kpi-email { display: block; font-size: 11px; font-weight: 400; color: var(--studio-text-secondary); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.audit-trail-workspace-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; flex: 1; min-height: 0; overflow: hidden; }
.audit-trail-ledger-pane { border-right: 1px solid var(--studio-border-subtle); display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--studio-bg-surface); }
.audit-ledger-header { padding: 10px 18px; border-bottom: 1px solid var(--studio-border-subtle); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(15, 22, 36, 0.65); flex-shrink: 0; }
.audit-ledger-title-group { display: flex; align-items: center; gap: 8px; }
.audit-section-heading { font-size: 12.5px; font-weight: 700; color: var(--studio-text-primary); margin: 0; }
.audit-filter-pills { display: flex; align-items: center; gap: 4px; }
.audit-filter-pill { background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); border-radius: var(--studio-radius-full); padding: 3px 9px; font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.audit-filter-pill:hover { color: var(--studio-text-primary); border-color: var(--studio-accent-blue); }
.audit-filter-pill.active { background: rgba(59, 130, 246, 0.2); border-color: var(--studio-accent-blue); color: var(--studio-accent-blue-light); }
.audit-table-scroll-container { flex: 1; overflow-y: auto; overflow-x: auto; min-height: 0; }
.audit-trail-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.audit-trail-table thead { position: sticky; top: 0; background: var(--studio-bg-elevated); z-index: 2; }
.audit-trail-table th { padding: 9px 14px; text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--studio-text-muted); font-weight: 700; border-bottom: 1px solid var(--studio-border-subtle); white-space: nowrap; }
.audit-trail-table td { padding: 9px 14px; border-bottom: 1px solid rgba(38, 54, 84, 0.35); vertical-align: middle; color: var(--studio-text-primary); }
.audit-trail-table tbody tr { transition: background var(--studio-transition-fast); }
.audit-trail-table tbody tr:hover td { background: rgba(34, 49, 77, 0.35); }
.audit-trail-table tbody tr.selected td { background: rgba(59, 130, 246, 0.12); border-bottom-color: rgba(59, 130, 246, 0.3); }
.audit-artifact-name { font-weight: 700; color: var(--studio-text-primary); display: block; font-family: var(--studio-font-mono); font-size: 11.5px; }
.audit-artifact-stage { font-size: 10.5px; color: var(--studio-text-secondary); margin-top: 1px; display: block; }
.audit-version-tag { font-family: var(--studio-font-mono); font-size: 11px; font-weight: 600; color: var(--studio-text-secondary); display: block; }
.audit-sha-badge { font-family: var(--studio-font-mono); font-size: 10px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-muted); display: inline-block; margin-top: 2px; }
.audit-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: var(--studio-radius-full); font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.audit-badge-hitl { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald-light); }
.audit-badge-auto { background: rgba(245, 158, 11, 0.14); border: 1px solid rgba(245, 158, 11, 0.4); color: var(--studio-accent-amber); }
.audit-approver-name { font-weight: 600; color: var(--studio-text-primary); display: block; font-size: 11.5px; }
.audit-approver-email { font-size: 10.5px; color: var(--studio-text-secondary); display: block; }
.audit-timestamp-text { font-size: 11px; color: var(--studio-text-secondary); white-space: nowrap; }
.btn-inspect-audit-artifact { padding: 4px 10px; font-size: 11px; font-weight: 600; border-radius: var(--studio-radius-sm); border: 1px solid var(--studio-border-subtle); background: var(--studio-bg-card); color: var(--studio-text-secondary); cursor: pointer; transition: all 0.15s ease; white-space: nowrap; }
.btn-inspect-audit-artifact:hover { background: var(--studio-bg-card-hover); border-color: var(--studio-accent-blue); color: var(--studio-accent-blue-light); }
.audit-trail-artifact-viewer { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--studio-bg-surface); }
.audit-viewer-topbar { padding: 9px 18px; border-bottom: 1px solid var(--studio-border-subtle); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(15, 22, 36, 0.7); flex-shrink: 0; }
.audit-viewer-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.audit-viewer-title { font-weight: 700; font-size: 13px; color: var(--studio-text-primary); font-family: var(--studio-font-mono); }
.audit-viewer-pill { padding: 2px 7px; border-radius: var(--studio-radius-full); font-size: 10.5px; font-weight: 600; background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); font-family: var(--studio-font-mono); }
.audit-viewer-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.audit-view-mode-toggle { display: inline-flex; background: var(--studio-bg-card); border-radius: var(--studio-radius-sm); padding: 2px; border: 1px solid var(--studio-border-subtle); }
.audit-mode-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; font-size: 11px; font-weight: 600; border: none; background: transparent; color: var(--studio-text-secondary); border-radius: 4px; cursor: pointer; transition: all 0.12s ease; }
.audit-mode-btn.active { background: var(--studio-bg-elevated); color: var(--studio-accent-blue-light); }
.audit-viewer-provenance-meta { padding: 6px 18px; background: rgba(8, 12, 20, 0.6); border-bottom: 1px solid var(--studio-border-subtle); font-size: 11px; color: var(--studio-text-muted); display: flex; align-items: center; gap: 6px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-artifact-content-body { flex: 1; overflow-y: auto; overflow-x: auto; padding: 16px 20px; font-size: 13px; line-height: 1.6; color: var(--studio-text-primary); background: var(--studio-bg-root); min-height: 0; }
.audit-raw-pre { margin: 0; font-family: var(--studio-font-mono); font-size: 11.5px; white-space: pre-wrap; word-break: break-word; color: #cbd5e1; }
.audit-trail-comments-section { border-top: 1px solid var(--studio-border-subtle); background: var(--studio-bg-surface); padding: 12px 22px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; max-height: 250px; }
.audit-comments-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.audit-comments-heading-left { display: flex; align-items: center; gap: 8px; }
.audit-comments-count-badge { padding: 2px 7px; border-radius: var(--studio-radius-full); font-size: 10.5px; font-weight: 700; background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.35); color: var(--studio-accent-emerald-light); }
.audit-comments-retention-note { font-size: 11px; color: var(--studio-text-muted); font-style: italic; }
.audit-comment-composer { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.audit-composer-controls { display: flex; align-items: center; gap: 8px; }
.audit-comment-artifact-select { background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-primary); border-radius: var(--studio-radius-sm); padding: 5px 10px; font-size: 11.5px; font-weight: 500; min-width: 250px; outline: none; }
.audit-comment-artifact-select:focus-visible { border-color: var(--studio-accent-blue); box-shadow: var(--studio-focus-glow); }
.btn-save-audit-comment { min-height: 30px; padding: 5px 12px; font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.audit-comment-textarea { background: var(--studio-bg-root); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-sm); color: var(--studio-text-primary); padding: 7px 10px; font-size: 12px; font-family: var(--studio-font-sans); resize: none; width: 100%; transition: border-color 0.15s ease; outline: none; }
.audit-comment-textarea:focus-visible { border-color: var(--studio-accent-blue); box-shadow: var(--studio-focus-glow); }
.audit-trail-comments-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 85px; padding-right: 4px; }
.audit-comment-card { padding: 6px 10px; border-radius: var(--studio-radius-sm); background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; }
.audit-comment-meta { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; color: var(--studio-text-secondary); }
.audit-comment-author { font-weight: 700; color: var(--studio-text-primary); }
.audit-comment-tag { padding: 1px 5px; border-radius: 4px; background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); color: var(--studio-accent-blue-light); font-size: 9.5px; font-weight: 600; font-family: var(--studio-font-mono); }
.audit-comment-body { color: var(--studio-text-primary); font-size: 11.5px; line-height: 1.4; word-break: break-word; }
@media (max-width: 1080px) {
  .audit-trail-kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .audit-trail-workspace-grid { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .audit-trail-ledger-pane { border-right: none; border-bottom: 1px solid var(--studio-border-subtle); }
}
@media (max-width: 640px) {
  .audit-trail-kpi-strip { grid-template-columns: 1fr; }
  .audit-header-actions { flex-wrap: wrap; }
  .audit-composer-controls { flex-direction: column; align-items: stretch; }
}
.arb-dossier-verdict-badge,
#arb-dossier-verdict-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--studio-radius-full); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: all var(--studio-transition-fast); }
.arb-dossier-verdict-badge.verdict-ready,
#arb-dossier-verdict-badge.verdict-ready { background: rgba(16, 185, 129, 0.18); border: 1px solid rgba(16, 185, 129, 0.45); color: var(--studio-accent-emerald-light); box-shadow: 0 0 12px rgba(16, 185, 129, 0.25); }
.arb-dossier-verdict-badge.verdict-conditional,
#arb-dossier-verdict-badge.verdict-conditional { background: rgba(245, 158, 11, 0.18); border: 1px solid rgba(245, 158, 11, 0.45); color: var(--studio-accent-amber); box-shadow: 0 0 12px rgba(245, 158, 11, 0.25); }
.arb-dossier-verdict-badge.verdict-blocked,
#arb-dossier-verdict-badge.verdict-blocked { background: rgba(239, 68, 68, 0.18); border: 1px solid rgba(239, 68, 68, 0.45); color: #fca5a5; box-shadow: 0 0 12px rgba(239, 68, 68, 0.25); }
.arb-dossier-verdict-badge.verdict-incomplete,
#arb-dossier-verdict-badge.verdict-incomplete { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.4); color: var(--studio-accent-blue-light); }
#btn-view-arb-dossier,
#btn-download-arb-dossier-md,
#btn-print-arb-dossier-pdf,
#btn-export-exec-arb-dossier { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; min-height: 34px; border-radius: var(--studio-radius-md); font-size: 11.5px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-normal); white-space: nowrap; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#btn-view-arb-dossier { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald-light); }
#btn-view-arb-dossier:hover:not(:disabled) { background: rgba(16, 185, 129, 0.28); border-color: var(--studio-accent-emerald); box-shadow: 0 0 14px rgba(16, 185, 129, 0.35); transform: translateY(-1px); }
#btn-download-arb-dossier-md,
#btn-print-arb-dossier-pdf,
#btn-export-exec-arb-dossier { background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); }
#btn-download-arb-dossier-md:hover:not(:disabled),
#btn-print-arb-dossier-pdf:hover:not(:disabled),
#btn-export-exec-arb-dossier:hover:not(:disabled) { background: var(--studio-bg-card-hover); border-color: var(--studio-accent-blue); color: var(--studio-accent-blue-light); transform: translateY(-1px); }
#btn-view-arb-dossier:focus-visible,
#btn-download-arb-dossier-md:focus-visible,
#btn-print-arb-dossier-pdf:focus-visible,
#btn-export-exec-arb-dossier:focus-visible { outline: none; border-color: var(--studio-accent-blue); box-shadow: var(--studio-focus-glow); }
#btn-view-arb-dossier:disabled,
#btn-download-arb-dossier-md:disabled,
#btn-print-arb-dossier-pdf:disabled,
#btn-export-exec-arb-dossier:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.audit-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
/* frontend/css/studio/revision-and-handoff.css */
.agent-node-card.revision-executed { border-color: rgba(16, 185, 129, 0.65) !important; background: linear-gradient( 135deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0.95) 100%) !important; box-shadow: 0 0 16px rgba(16, 185, 129, 0.2), inset 0 0 12px rgba(16, 185, 129, 0.08) !important; }
.agent-node-card.revision-executed:hover { border-color: #10b981 !important; box-shadow: 0 0 22px rgba(16, 185, 129, 0.35), inset 0 0 14px rgba(16, 185, 129, 0.12) !important; }
.agent-node-card.revision-skipped,
.agent-node-card.studio-node-skipped-revision,
.studio-node.revision-skipped,
.studio-node.studio-node-skipped-revision { opacity: 0.45 !important; filter: grayscale(0.55); border: 1px dashed rgba(100, 116, 139, 0.45) !important; border-color: rgba(100, 116, 139, 0.45) !important; background: rgba(15, 23, 42, 0.6) !important; transition: opacity 0.2s ease, filter 0.2s ease, border-color 0.2s ease; }
.agent-node-card.revision-skipped:hover,
.agent-node-card.studio-node-skipped-revision:hover,
.studio-node.revision-skipped:hover,
.studio-node.studio-node-skipped-revision:hover { opacity: 0.8 !important; filter: grayscale(0.2); border-color: rgba(148, 163, 184, 0.5) !important; }
.agent-node-card.revision-wave-running,
.agent-node-card.is-parallel-wave,
.studio-node.is-parallel-wave { border-color: #38bdf8 !important; box-shadow: 0 0 22px rgba(56, 189, 248, 0.45), inset 0 0 10px rgba(56, 189, 248, 0.2) !important; animation: pulse-revision-wave 1.2s infinite ease-in-out; }
@keyframes pulse-revision-wave {
  0%, 100% { box-shadow: 0 0 12px rgba(56, 189, 248, 0.35); }
  50% { box-shadow: 0 0 24px rgba(56, 189, 248, 0.65), 0 0 4px #38bdf8; }
}
.agent-node-badge.revision-called-badge { background: rgba(16, 185, 129, 0.16) !important; color: #34d399 !important; border: 1px solid rgba(16, 185, 129, 0.35) !important; font-weight: 700; letter-spacing: 0.02em; }
.agent-node-badge.revision-skipped-badge { background: rgba(100, 116, 139, 0.15) !important; color: #94a3b8 !important; border: 1px dashed rgba(100, 116, 139, 0.35) !important; font-weight: 600; letter-spacing: 0.02em; }
.studio-edge-revision-executed { stroke: #cbd5e1 !important; stroke-width: 2.2px !important; stroke-dasharray: none !important; filter: none !important; }
.studio-edge-architect-delegate { stroke: #cbd5e1 !important; stroke-width: 2.2px !important; stroke-dasharray: none !important; filter: none !important; }
.studio-edge-architect-delegate.studio-edge-revision-executed { stroke: #cbd5e1 !important; }
.studio-flow-architect-beam { stroke: #06b6d4 !important; stroke-width: 3.0px !important; filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.7)); animation: studio-beam-pulse 1.6s infinite ease-in-out; }
.studio-edge-revision-skipped { stroke: rgba(100, 116, 139, 0.3) !important; stroke-width: 1.4px !important; stroke-dasharray: 4 4 !important; opacity: 0.6; }
.simple-stage-card.revision-stage-called { border-color: rgba(16, 185, 129, 0.4); }
.simple-stage-card.revision-stage-skipped { opacity: 0.65; border-style: dashed; border-color: rgba(100, 116, 139, 0.3); }
.revision-drawer-callout { margin: 10px 0 14px 0; padding: 10px 12px; border-radius: 8px; font-size: 11.5px; line-height: 1.45; display: flex; align-items: flex-start; gap: 8px; }
.revision-drawer-callout.hub { background: rgba(139, 92, 246, 0.12); border: 1px solid rgba(139, 92, 246, 0.3); color: #e2e8f0; }
.revision-drawer-callout.hub .material-symbols-outlined { color: #c4b5fd; flex-shrink: 0; }
.revision-drawer-callout.executed { background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.3); color: #e2e8f0; }
.revision-drawer-callout.executed .material-symbols-outlined { color: #34d399; flex-shrink: 0; }
.revision-drawer-callout.skipped { background: rgba(100, 116, 139, 0.12); border: 1px dashed rgba(100, 116, 139, 0.35); color: #94a3b8; }
.revision-drawer-callout.skipped .material-symbols-outlined { color: #94a3b8; flex-shrink: 0; }
.btn-execute-revision { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 700; color: #0b0f19; background: linear-gradient( 135deg, #06b6d4, #10b981); border: 1px solid rgba(255, 255, 255, 0.2); cursor: pointer; box-shadow: 0 0 14px rgba(6, 182, 212, 0.4); transition: all var(--studio-transition-fast); animation: revision-pulse-subtle 3s infinite ease-in-out; }
.btn-execute-revision:hover:not(:disabled) { transform: translateY(-1px) scale(1.02); box-shadow: 0 0 20px rgba(16, 185, 129, 0.55); background: linear-gradient( 135deg, #22d3ee, #34d399); }
.btn-execute-revision:disabled { opacity: 0.7; cursor: not-allowed; transform: none; animation: none; }
@keyframes revision-pulse-subtle {
  0%, 100% { box-shadow: 0 0 12px rgba(6, 182, 212, 0.35); }
  50% { box-shadow: 0 0 22px rgba(16, 185, 129, 0.6); }
}
.chat-revision-action-bar { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; align-items: center; gap: 8px; }
.btn-inline-execute-revision { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient( 135deg, rgba(6, 182, 212, 0.2), rgba(16, 185, 129, 0.25)); border: 1px solid rgba(16, 185, 129, 0.5); color: #6ee7b7; font-size: 11.5px; font-weight: 700; padding: 6px 12px; border-radius: 6px; cursor: pointer; transition: all var(--studio-transition-fast); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
.btn-inline-execute-revision:hover { background: linear-gradient( 135deg, rgba(6, 182, 212, 0.35), rgba(16, 185, 129, 0.45)); border-color: #34d399; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35); }
.btn-inline-open-live-app { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient( 135deg, #00a572, #10b981); border: 1px solid rgba(110, 231, 183, 0.55); color: #0b0f19; font-size: 11.5px; font-weight: 700; padding: 6px 12px; border-radius: 6px; cursor: pointer; transition: all var(--studio-transition-fast); box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3); }
.btn-inline-open-live-app:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45); }
.studio-post-build-composer-hint { display: flex; align-items: center; gap: 6px; padding: 5px 10px; margin-bottom: 6px; border-radius: 8px; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.28); color: #6ee7b7; font-size: 11px; font-weight: 600; line-height: 1.35; }
.studio-post-build-composer-hint.hidden,
.studio-post-build-composer-hint[hidden] { display: none !important; }
.studio-AttachBtn { width: 28px; height: 28px; border-radius: var(--studio-radius-sm); background: transparent; border: none; color: var(--studio-text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--studio-transition-fast); }
.studio-AttachBtn:hover { color: var(--studio-text-primary); background-color: var(--studio-bg-elevated); }
.studio-AttachBtn.has-attachments { color: var(--studio-accent-blue-light); background: rgba(59, 130, 246, 0.18); border: 1px solid rgba(59, 130, 246, 0.4); }
.studio-console-attachments-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 10px; margin-bottom: 8px; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(10px); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-md); max-height: 110px; overflow-y: auto; }
.studio-console-attachments-strip.hidden { display: none !important; }
.studio-attachment-chip { display: inline-flex; align-items: center; gap: 6px; background-color: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-sm); padding: 3px 8px 3px 4px; font-size: 11px; color: var(--studio-text-secondary); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.studio-attachment-thumb { width: 22px; height: 22px; object-fit: cover; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.12); flex-shrink: 0; }
.studio-attachment-name { max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: var(--studio-text-primary); }
.studio-attachment-size { font-size: 10px; color: var(--studio-text-muted); }
.studio-attachment-remove { background: transparent; border: none; color: var(--studio-text-muted); cursor: pointer; font-size: 14px; font-weight: 700; line-height: 1; padding: 0 2px; margin-left: 2px; display: flex; align-items: center; justify-content: center; transition: color var(--studio-transition-fast); }
.studio-attachment-remove:hover { color: var(--studio-accent-rose); }
.chat-attachments-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chat-attachment-image-wrap { display: inline-block; border-radius: 8px; overflow: hidden; }
.chat-attachment-image { max-height: 140px; max-width: 100%; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.18); object-fit: cover; display: block; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); transition: transform var(--studio-transition-fast); }
.chat-attachment-image:hover { transform: scale(1.02); }
.chat-attachment-doc { display: inline-flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 6px; padding: 4px 10px; font-size: 11px; color: rgba(255, 255, 255, 0.95); }
.chat-attachment-doc-name { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.chat-attachment-doc-size { font-size: 10px; color: rgba(255, 255, 255, 0.6); }
.telemetry-pill.revision-ready-pill { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.4); color: #fbbf24; }
.telemetry-pill.revision-dispatched-pill { background: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.45); color: #34d399; }
.studio-drop-target { outline: 2px dashed var(--studio-accent-blue); outline-offset: -2px; }
.sdd-locked-chip,
.stitch-locked-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; border-radius: 9999px; padding: 4px 12px; margin-bottom: 6px; transition: all var(--studio-transition-fast); }
.sdd-locked-chip { background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(16, 185, 129, 0.5); color: #34d399; }
.stitch-locked-chip { background: rgba(139, 92, 246, 0.2); border: 1px solid rgba(139, 92, 246, 0.5); color: #c4b5fd; }
.stitch-option-card[data-screen-idx] { transition: all var(--studio-transition-fast); }
.stitch-option-card[data-screen-idx]:hover { border-color: rgba(16, 185, 129, 0.6); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15); }
.stitch-option-card[data-screen-idx].selected { border-color: #10b981 !important; background: rgba(16, 185, 129, 0.08) !important; box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3); }
.studio-revision-job-banner { margin: 8px 10px 6px; }
.studio-revision-job-banner[hidden],
.studio-revision-job-banner.hidden { display: none !important; }
.revision-job-banner-inner { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: rgba(15, 23, 42, 0.92); border: 1px solid rgba(59, 130, 246, 0.42); box-shadow: 0 4px 16px rgba(2, 6, 23, 0.45); color: #e2e8f0; }
.revision-job-banner-inner.is-completed { border-color: rgba(16, 185, 129, 0.55); background: rgba(6, 78, 59, 0.25); }
.revision-job-banner-inner.is-failed,
.revision-job-banner-inner.is-rolled_back { border-color: rgba(244, 63, 94, 0.55); background: rgba(136, 19, 55, 0.22); }
.revision-job-banner-inner.is-cancelled,
.revision-job-banner-inner.is-no_changes { border-color: rgba(148, 163, 184, 0.45); }
.revision-job-banner-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 11px; line-height: 1.3; }
.revision-job-status-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 9999px; font-weight: 700; font-size: 10px; letter-spacing: 0.04em; background: rgba(59, 130, 246, 0.22); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.4); }
.is-completed .revision-job-status-badge { background: rgba(16, 185, 129, 0.22); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.45); }
.is-failed .revision-job-status-badge,
.is-rolled_back .revision-job-status-badge { background: rgba(244, 63, 94, 0.22); color: #fda4af; border-color: rgba(244, 63, 94, 0.45); }
.revision-job-phase { font-weight: 600; color: #f8fafc; }
.revision-job-elapsed { margin-left: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: #94a3b8; }
.revision-job-step { margin: 0; font-size: 12px; line-height: 1.4; color: #cbd5e1; }
.revision-job-actions { display: flex; justify-content: flex-end; gap: 8px; }
.revision-job-cancel-btn { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; background: rgba(244, 63, 94, 0.16); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.4); cursor: pointer; }
.revision-job-cancel-btn:hover:not(:disabled) { background: rgba(244, 63, 94, 0.28); }
.revision-job-cancel-btn:disabled { opacity: 0.55; cursor: not-allowed; }
/* frontend/css/studio/flow-legend-and-edges.css */
.studio-canvas-flow-legend { position: absolute; bottom: 54px; left: 16px; right: 16px; background: var(--studio-legend-bg, rgba(11, 17, 32, 0.90)); backdrop-filter: var(--studio-legend-backdrop, blur(12px)); -webkit-backdrop-filter: var(--studio-legend-backdrop, blur(12px)); border: 1px solid var(--studio-legend-border, rgba(148, 163, 184, 0.22)); border-radius: 10px; padding: 8px 14px; z-index: 15; box-shadow: var(--studio-legend-shadow, 0 4px 20px rgba(0, 0, 0, 0.50)); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; pointer-events: auto; transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), padding 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease; }
.studio-canvas-flow-legend.is-collapsed,
.studio-canvas-flow-legend.collapsed,
.studio-canvas-flow-legend[data-collapsed=true] { right: auto; width: auto; max-width: fit-content; padding: 6px 12px; }
.studio-canvas-flow-legend .legend-header { display: inline-flex; align-items: center; border-right: 1px solid rgba(148, 163, 184, 0.2); padding-right: 10px; }
.studio-canvas-flow-legend.is-collapsed .legend-header,
.studio-canvas-flow-legend.collapsed .legend-header,
.studio-canvas-flow-legend[data-collapsed=true] .legend-header { border-right: none; padding-right: 0; }
.studio-canvas-flow-legend .legend-toggle-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--studio-text-primary, #f8fafc); background: transparent; border: none; outline: none; cursor: pointer; user-select: none; font-family: inherit; margin: 0; padding: 0; line-height: 1; transition: color 0.15s ease; }
.studio-canvas-flow-legend .legend-toggle-btn:hover { color: #38bdf8; }
#studio-canvas-flow-legend-toggle:focus-visible,
.studio-canvas-flow-legend .legend-toggle-btn:focus-visible { outline: 2px solid #38bdf8 !important; outline-offset: 2px !important; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35) !important; border-radius: 4px; }
.studio-canvas-flow-legend .legend-chevron { font-size: 16px; color: var(--studio-text-secondary, #94a3b8); transition: transform 0.2s ease, color 0.15s ease; }
.studio-canvas-flow-legend:not(.is-collapsed):not(.collapsed) .legend-chevron { transform: rotate(180deg); }
.studio-canvas-flow-legend.is-collapsed .legend-items,
.studio-canvas-flow-legend.collapsed .legend-items,
.studio-canvas-flow-legend[data-collapsed=true] .legend-items { display: none !important; }
.studio-canvas-flow-legend .legend-items { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
@media (max-width: 1100px) {
  .studio-canvas-flow-legend { flex-wrap: wrap; gap: 8px; }
}
.studio-canvas-flow-legend .legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: #cbd5e1; }
.studio-canvas-flow-legend .legend-item strong { color: #f1f5f9; }
.studio-canvas-flow-legend .legend-line { width: 22px; height: 3px; border-radius: 2px; display: inline-block; flex-shrink: 0; }
.studio-canvas-flow-legend .legend-line-active { background: #047857; height: 4px; box-shadow: 0 0 4px rgba(4, 120, 87, 0.6); }
.studio-canvas-flow-legend .legend-line-executed-hub { background: #cbd5e1; height: 3px; }
.studio-canvas-flow-legend .legend-line-executed-arch { background: #cbd5e1; height: 3px; }
.studio-canvas-flow-legend .legend-line-standby { background: transparent; border-top: 2px dotted #94a3b8; height: 0; }
.studio-canvas-flow-legend .legend-badge-sample { display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; padding: 1px 6px; border-radius: 9999px; background: #022c22; border: 1px solid #047857; color: #ffffff; line-height: 1.2; }
.studio-edge-active-wave { stroke: #047857 !important; stroke-width: 3.6 !important; stroke-dasharray: none !important; filter: drop-shadow(0 0 4px rgba(4, 120, 87, 0.65)) !important; opacity: 1 !important; }
.studio-edge-completed { stroke: #cbd5e1 !important; stroke-width: 2.2 !important; stroke-dasharray: none !important; filter: none !important; opacity: 0.95 !important; }
.studio-edge-standby { stroke: #94a3b8 !important; stroke-width: 1.4 !important; stroke-dasharray: 2 4 !important; stroke-linecap: round !important; filter: none !important; opacity: 0.50 !important; }
.studio-edge-seq-badge { cursor: pointer; pointer-events: all; transition: transform 0.18s ease; }
.studio-edge-seq-badge:hover { transform: scale(1.18); }
.studio-edge-seq-badge .studio-edge-badge-bg { transition: all 0.2s ease; }
.studio-edge-seq-badge.is-standby .studio-edge-badge-bg { fill: #0b1120; stroke: rgba(148, 163, 184, 0.35); stroke-width: 1px; }
.studio-edge-seq-badge.is-standby .studio-edge-badge-text { fill: #94a3b8; font-size: 9.5px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.studio-edge-seq-badge.is-completed .studio-edge-badge-bg { fill: #1e293b; stroke: #cbd5e1; stroke-width: 1.2px; filter: none; }
.studio-edge-seq-badge.is-completed .studio-edge-badge-text { fill: #f1f5f9; font-size: 10px; font-weight: 800; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.studio-edge-seq-badge.is-active .studio-edge-badge-bg { fill: #022c22; stroke: #047857; stroke-width: 1.5px; filter: drop-shadow(0 0 4px rgba(4, 120, 87, 0.6)); }
.studio-edge-seq-badge.is-active .studio-edge-badge-text { fill: #ffffff; font-size: 10px; font-weight: 900; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.studio-edge-seq-badge.is-active.is-parallel .studio-edge-badge-bg { fill: #022c22; stroke: #047857; stroke-width: 1.5px; filter: drop-shadow(0 0 4px rgba(4, 120, 87, 0.65)); }
.agent-node-seq-pill { display: inline-flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 800; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; padding: 1.5px 6px; border-radius: 9999px; background: #0b1120; border: 1px solid rgba(148, 163, 184, 0.35); color: #94a3b8; letter-spacing: 0.02em; margin-left: 4px; white-space: nowrap; flex-shrink: 0; }
.agent-node-card.completed .agent-node-seq-pill { background: #1e293b; border-color: #cbd5e1; color: #f1f5f9; font-weight: 800; }
.agent-node-card.active .agent-node-seq-pill { background: #022c22; border-color: #047857; color: #ffffff; box-shadow: 0 0 6px rgba(4, 120, 87, 0.6); }
.agent-node-seq-pill.is-parallel { border-width: 1.5px; }
.agent-node-seq-pill.is-skipped { background: rgba(100, 116, 139, 0.12); border-color: rgba(100, 116, 139, 0.25); color: #64748b; }
.agent-node-seq-pill.is-parallel { border-width: 1.5px; }
.agent-node-seq-pill.is-skipped { background: rgba(100, 116, 139, 0.12); border-color: rgba(100, 116, 139, 0.25); color: #64748b; }
/* frontend/css/studio/topbar-tabs-and-engine.css */
.studio-control-plane-link { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--studio-radius-sm, 6px); background: linear-gradient( 135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2)); border: 1px solid rgba(59, 130, 246, 0.45); color: #93c5fd; font-size: 11.5px; font-weight: 700; text-decoration: none; transition: all var(--studio-transition-fast, 0.18s ease); white-space: nowrap; flex-shrink: 0; }
.studio-control-plane-link:hover { background: linear-gradient( 135deg, rgba(59, 130, 246, 0.35), rgba(139, 92, 246, 0.35)); border-color: #60a5fa; color: #ffffff; box-shadow: 0 0 12px rgba(59, 130, 246, 0.45); transform: translateY(-1px); }
.stitch-preview-tab-strip,
.stitch-studio-tab-strip { display: flex; align-items: center; gap: 8px; overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap; padding: 8px 16px; background: var(--studio-bg-surface, #0f172a); border-bottom: 1px solid var(--studio-border-subtle, #1e293b); scrollbar-width: thin; -webkit-overflow-scrolling: touch; width: 100%; max-width: 100vw; box-sizing: border-box; flex-shrink: 0; }
.stitch-preview-tab-strip::-webkit-scrollbar,
.stitch-studio-tab-strip::-webkit-scrollbar { height: 6px; }
.stitch-preview-tab-strip::-webkit-scrollbar-track,
.stitch-studio-tab-strip::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.6); }
.stitch-preview-tab-strip::-webkit-scrollbar-thumb,
.stitch-studio-tab-strip::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.5); border-radius: 3px; }
.stitch-preview-tab-strip::-webkit-scrollbar-thumb:hover,
.stitch-studio-tab-strip::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.8); }
.stitch-preview-tab-strip.hidden,
.stitch-studio-tab-strip.hidden { display: none !important; }
.stitch-preview-tab-btn,
.stitch-studio-tab-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; min-height: 32px; border-radius: var(--studio-radius-md, 8px); background-color: var(--studio-bg-card, #1e293b); border: 1px solid var(--studio-border-subtle, #334155); color: var(--studio-text-secondary, #94a3b8); font-size: 12px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast, 0.18s ease); white-space: nowrap; user-select: none; flex-shrink: 0; }
.stitch-preview-tab-btn:hover,
.stitch-studio-tab-btn:hover { background-color: var(--studio-bg-card-hover, #334155); color: var(--studio-text-primary, #f8fafc); border-color: var(--studio-border-highlight, #64748b); }
.stitch-preview-tab-btn.active,
.stitch-studio-tab-btn.active { background: rgba(16, 185, 129, 0.18); border-color: var(--studio-accent-emerald, #10b981); color: #ffffff; box-shadow: 0 0 12px rgba(16, 185, 129, 0.35); font-weight: 700; }
.stitch-preview-tab-btn:focus-visible,
.stitch-studio-tab-btn:focus-visible { outline: 2px solid var(--studio-accent-emerald, #10b981) !important; outline-offset: 2px !important; }
.stitch-tab-badge { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(148, 163, 184, 0.2); color: var(--studio-text-secondary, #94a3b8); font-size: 10px; font-weight: 700; font-family: var(--studio-font-mono, monospace); }
.stitch-preview-tab-btn.active .stitch-tab-badge,
.stitch-studio-tab-btn.active .stitch-tab-badge { background: var(--studio-accent-emerald, #10b981); color: #0b0f19; }
.header-engine-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 9999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; cursor: default; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); border: 1px solid transparent; user-select: none; font-family: inherit; }
.header-engine-pill:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 2px; }
.header-engine-pill.v4 { background: linear-gradient( 135deg, rgba(6, 182, 212, 0.22), rgba(139, 92, 246, 0.24)); color: #a5f3fc; border: 1px solid rgba(34, 211, 238, 0.55); box-shadow: 0 0 14px rgba(6, 182, 212, 0.3); }
.header-engine-pill.v4:hover { background: linear-gradient( 135deg, rgba(6, 182, 212, 0.34), rgba(139, 92, 246, 0.36)); border-color: rgba(34, 211, 238, 0.78); box-shadow: 0 0 18px rgba(6, 182, 212, 0.45); }
.header-engine-pill.v3 { background: linear-gradient( 135deg, rgba(139, 92, 246, 0.2), rgba(16, 185, 129, 0.16)); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.45); box-shadow: 0 0 12px rgba(16, 185, 129, 0.25); }
.header-engine-pill.v3:hover { background: linear-gradient( 135deg, rgba(139, 92, 246, 0.32), rgba(16, 185, 129, 0.26)); border-color: rgba(16, 185, 129, 0.65); box-shadow: 0 0 16px rgba(16, 185, 129, 0.4); }
.header-engine-pill.v2 { background: linear-gradient( 135deg, rgba(16, 185, 129, 0.16), rgba(139, 92, 246, 0.22)); border-color: rgba(139, 92, 246, 0.45); color: #ede9fe; box-shadow: 0 0 12px rgba(139, 92, 246, 0.25); }
.header-engine-pill.v2:hover { background: linear-gradient( 135deg, rgba(16, 185, 129, 0.25), rgba(139, 92, 246, 0.35)); border-color: rgba(139, 92, 246, 0.65); box-shadow: 0 0 16px rgba(139, 92, 246, 0.4); }
.header-engine-pill.v1 { background: rgba(30, 41, 59, 0.7); border-color: rgba(100, 116, 139, 0.4); color: #94a3b8; box-shadow: none; }
.header-engine-pill.v1:hover { background: rgba(51, 65, 85, 0.8); border-color: rgba(148, 163, 184, 0.5); color: #cbd5e1; }
.engine-selector-card { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.engine-selector-options { display: grid; grid-template-columns: 1fr; gap: 8px; }
.engine-option-card { padding: 10px 12px; border-radius: 8px; background: rgba(30, 41, 59, 0.5); border: 1px solid rgba(148, 163, 184, 0.15); cursor: pointer; min-height: 44px; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); outline: none; user-select: none; }
.engine-option-card:hover { background: rgba(30, 41, 59, 0.85); border-color: rgba(139, 92, 246, 0.35); transform: translateY(-1px); }
.engine-option-card:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 2px; }
.engine-option-card.selected { background: linear-gradient( 135deg, rgba(139, 92, 246, 0.15), rgba(16, 185, 129, 0.08)); border: 1px solid #8b5cf6; box-shadow: 0 0 14px rgba(139, 92, 246, 0.2); }
.engine-option-badge { display: inline-flex; align-items: center; transition: all 0.2s ease; font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 9999px; }
.engine-option-badge.v4 { background: rgba(6, 182, 212, 0.2); color: #67e8f9; border: 1px solid rgba(34, 211, 238, 0.48); }
.engine-option-badge.v3 { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.engine-option-badge.v2 { background: rgba(16, 185, 129, 0.16); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); }
.engine-option-badge.v1 { background: rgba(100, 116, 139, 0.22); color: #cbd5e1; border: 1px solid rgba(100, 116, 139, 0.35); }
.studio-public-preview-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 8px 18px; background: linear-gradient( 90deg, rgba(30, 41, 59, 0.96), rgba(49, 46, 129, 0.92)); border-bottom: 1px solid rgba(139, 92, 246, 0.38); color: #f8fafc; font-size: 13px; }
.studio-public-preview-banner.hidden,
.studio-public-preview-banner[hidden] { display: none !important; }
.studio-preview-banner-left { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.studio-preview-banner-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 9999px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; background: rgba(16, 185, 129, 0.18); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.45); }
.studio-preview-banner-text { color: #e2e8f0; font-weight: 500; }
.studio-preview-banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.studio-preview-banner-link { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 10px; border-radius: 6px; color: #cbd5e1; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.studio-preview-banner-link:hover { color: #ffffff; }
.studio-preview-banner-signin { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px 14px; border-radius: 8px; border: 1px solid rgba(139, 92, 246, 0.7); background: #6d28d9; color: #ffffff; font-size: 13px; font-weight: 700; cursor: pointer; }
.studio-preview-banner-signin:hover { background: #5b21b6; }
.studio-preview-banner-dismiss { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; min-width: 40px; border-radius: 8px; border: 1px solid rgba(148, 163, 184, 0.35); background: rgba(15, 23, 42, 0.55); color: #e2e8f0; font-size: 18px; line-height: 1; cursor: pointer; }
.studio-preview-banner-dismiss:hover { background: rgba(30, 41, 59, 0.9); }
/* frontend/css/studio/recovery-and-diagnostics.css */
.studio-infra-pill { display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 6px; border-radius: 9999px; font-size: 10px; font-weight: 600; background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(148, 163, 184, 0.25); color: var(--studio-text-secondary, #94a3b8); transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); user-select: none; }
#studio-infra-label { max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-infra-pill.baseline { background: rgba(15, 23, 42, 0.6); border-color: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.studio-infra-pill.spinning-up { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.45); color: #fbbf24; }
.studio-infra-pill.active { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.45); color: #6ee7b7; box-shadow: 0 0 12px rgba(16, 185, 129, 0.15); }
.studio-infra-pill.ramping-down { background: rgba(129, 140, 248, 0.12); border-color: rgba(129, 140, 248, 0.4); color: #c7d2fe; }
.infra-status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; transition: all 0.2s ease; }
.infra-status-dot.baseline { background: #94a3b8; }
.infra-status-dot.spinning-up { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; animation: studio-pulse 1s infinite; }
.infra-status-dot.active { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.7); }
.infra-status-dot.ramping-down { background: #818cf8; box-shadow: 0 0 8px #818cf8; animation: studio-pulse 1.5s infinite; }
.studio-infra-banner { display: flex; align-items: center; gap: 10px; padding: 8px 16px; width: 100%; max-width: 680px; margin: 0 auto 8px auto; border-radius: var(--studio-radius-md, 8px); font-size: 12.5px; font-weight: 600; z-index: 25; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); animation: fadeIn 0.25s ease-in-out; transition: all 0.25s ease; }
.studio-infra-banner.hidden { display: none !important; }
.studio-infra-banner.spinning-up { background: linear-gradient( 90deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.95)); border: 1px solid rgba(245, 158, 11, 0.5); color: #fbbf24; }
.studio-infra-banner.active { background: linear-gradient( 90deg, rgba(16, 185, 129, 0.18), rgba(15, 23, 42, 0.95)); border: 1px solid rgba(16, 185, 129, 0.45); color: #6ee7b7; }
.studio-infra-banner.ramping-down { background: linear-gradient( 90deg, rgba(129, 140, 248, 0.16), rgba(15, 23, 42, 0.95)); border: 1px solid rgba(129, 140, 248, 0.45); color: #c7d2fe; }
.studio-infra-banner.baseline { background: linear-gradient( 90deg, rgba(100, 116, 139, 0.15), rgba(15, 23, 42, 0.95)); border: 1px solid rgba(148, 163, 184, 0.3); color: #cbd5e1; }
.studio-recovery-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; width: 100%; max-width: 720px; margin: 0 auto 10px auto; border-radius: var(--studio-radius-lg, 10px); background: linear-gradient( 90deg, rgba(245, 158, 11, 0.22) 0%, rgba(15, 23, 42, 0.98) 100%); border: 1px solid rgba(245, 158, 11, 0.6); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(245, 158, 11, 0.15); z-index: 30; animation: fadeIn 0.3s ease-in-out; flex-wrap: wrap; }
.studio-recovery-banner.hidden { display: none !important; }
.recovery-banner-content { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 260px; }
.recovery-banner-text strong { display: block; font-size: 13.5px; font-weight: 700; color: #fbbf24; margin-bottom: 2px; }
.recovery-banner-text p { font-size: 12px; line-height: 1.45; color: #e2e8f0; margin: 0; }
.recovery-banner-actions { display: flex; align-items: center; gap: 8px; }
.btn-recovery-resume { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: var(--studio-radius-md, 8px); background: #f59e0b; color: #0f172a; font-size: 12.5px; font-weight: 700; border: none; cursor: pointer; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4); transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); white-space: nowrap; }
.btn-recovery-resume:hover { background: #d97706; box-shadow: 0 4px 14px rgba(245, 158, 11, 0.6); transform: translateY(-1px); }
.btn-recovery-resume:focus-visible { outline: 2px solid #fbbf24; outline-offset: 2px; }
.btn-recovery-resume:active { transform: translateY(0); }
.studio-progress-bar-track { position: relative; width: 100%; height: 3px; background: rgba(38, 54, 84, 0.4); overflow: hidden; z-index: 40; }
.studio-progress-bar-fill { height: 100%; width: 0%; background: linear-gradient( 90deg, #3b82f6, #10b981); transition: width 350ms cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease; box-shadow: 0 0 8px rgba(59, 130, 246, 0.5); }
.studio-progress-bar-fill.error-paused,
.studio-progress-bar-fill.has-error { background: linear-gradient( 90deg, #ef4444, #f59e0b) !important; box-shadow: 0 0 10px rgba(239, 68, 68, 0.6) !important; }
#studio-live-progress-pill.has-error { border-color: rgba(239, 68, 68, 0.7); background: rgba(239, 68, 68, 0.12); }
#studio-single-stage-pill.has-error { border-color: rgba(239, 68, 68, 0.7); background: rgba(239, 68, 68, 0.15); }
#studio-live-progress-pill.has-error .pulse-beacon-ping,
#studio-live-progress-pill.has-error .pulse-beacon-dot { background-color: #ef4444 !important; }
.studio-error-recovery-banner { position: relative; z-index: 30; margin: 10px 14px 12px; padding: 12px 16px; border-radius: var(--studio-radius-lg, 12px); border: 1px solid rgba(239, 68, 68, 0.65); background: linear-gradient( 90deg, rgba(239, 68, 68, 0.20) 0%, rgba(15, 23, 42, 0.98) 100%); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(239, 68, 68, 0.20); backdrop-filter: blur(12px); animation: bannerSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes bannerSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.studio-error-recovery-banner.hidden { display: none !important; }
.error-banner-main-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.error-banner-icon-wrap { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(239, 68, 68, 0.2); border: 1px solid rgba(239, 68, 68, 0.4); color: #ef4444; flex-shrink: 0; }
.error-banner-text-group { flex: 1; min-width: 220px; }
.error-banner-title-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.error-type-badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 9999px; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; background: #ef4444; color: #ffffff; text-transform: uppercase; }
.error-banner-heading { font-size: 13.5px; font-weight: 700; color: #f1f5f9; }
.error-timestamp { font-size: 11px; color: var(--studio-text-muted, #64748b); margin-left: 2px; }
.error-agent-meta { font-size: 11px; color: #cbd5e1; }
.error-banner-summary { font-size: 12px; color: #cbd5e1; line-height: 1.45; margin: 0; }
.error-banner-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-recovery { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; min-width: 36px; padding: 0 14px; border-radius: var(--studio-radius-md, 8px); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); white-space: nowrap; touch-action: manipulation; border: 1px solid transparent; user-select: none; }
.btn-recovery:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; }
.btn-recovery:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-recovery-retry { background: #3b82f6; color: #ffffff; border-color: rgba(59, 130, 246, 0.6); box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35); }
.btn-recovery-retry:hover:not(:disabled) { background: #2563eb; box-shadow: 0 4px 14px rgba(59, 130, 246, 0.5); transform: translateY(-1px); }
.btn-recovery-steer { background: rgba(139, 92, 246, 0.18); color: #ddd6fe; border-color: rgba(139, 92, 246, 0.45); }
.btn-recovery-steer:hover:not(:disabled) { background: rgba(139, 92, 246, 0.3); border-color: rgba(139, 92, 246, 0.7); transform: translateY(-1px); }
.btn-recovery-fallback { background: rgba(16, 185, 129, 0.16); color: #a7f3d0; border-color: rgba(16, 185, 129, 0.4); }
.btn-recovery-fallback:hover:not(:disabled) { background: rgba(16, 185, 129, 0.28); border-color: rgba(16, 185, 129, 0.65); transform: translateY(-1px); }
.btn-recovery-inspect { background: rgba(30, 41, 59, 0.7); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.25); }
.btn-recovery-inspect:hover:not(:disabled) { background: rgba(51, 65, 85, 0.85); border-color: rgba(148, 163, 184, 0.45); transform: translateY(-1px); }
@media (max-width: 768px) {
  .btn-recovery { min-height: 44px; padding: 0 16px; }
}
.error-banner-steer-dock { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(239, 68, 68, 0.25); transition: all 0.25s ease; }
.error-banner-steer-dock.hidden { display: none !important; }
.steer-input-wrap { display: flex; align-items: center; gap: 8px; background: rgba(15, 23, 42, 0.85); border: 1px solid rgba(139, 92, 246, 0.35); border-radius: var(--studio-radius-md, 8px); padding: 4px 6px 4px 10px; transition: border-color 0.2s, box-shadow 0.2s; }
.steer-input-wrap:focus-within { border-color: #8b5cf6; box-shadow: 0 0 12px rgba(139, 92, 246, 0.3); }
.steer-input-wrap.has-validation-error { border-color: #ef4444 !important; box-shadow: 0 0 10px rgba(239, 68, 68, 0.4) !important; }
.steer-input-icon { color: #a78bfa; }
.input-error-steering { flex: 1; background: transparent; border: none; outline: none; color: #f1f5f9; font-size: 12.5px; font-family: inherit; }
.input-error-steering::placeholder { color: #64748b; }
.btn-submit-steer { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 12px; border-radius: 6px; background: linear-gradient( 135deg, #8b5cf6, #6366f1); color: #ffffff; font-size: 11.5px; font-weight: 700; border: none; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; }
.btn-submit-steer:hover { background: linear-gradient( 135deg, #7c3aed, #4f46e5); transform: translateY(-1px); }
.btn-submit-steer:focus-visible { outline: 2px solid #a78bfa; outline-offset: 2px; }
.steer-validation-error { font-size: 11px; color: #f87171; margin-top: 5px; padding-left: 2px; }
.steer-validation-error.hidden { display: none !important; }
.error-banner-log-drawer { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(239, 68, 68, 0.2); }
.error-banner-log-drawer.hidden { display: none !important; }
.log-drawer-header { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 600; color: #94a3b8; margin-bottom: 6px; }
.btn-copy-stack { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; font-size: 10.5px; border-radius: 4px; background: rgba(30, 41, 59, 0.6); border: 1px solid rgba(148, 163, 184, 0.2); color: #cbd5e1; cursor: pointer; transition: all 0.15s ease; }
.btn-copy-stack:hover { background: rgba(51, 65, 85, 0.8); border-color: rgba(148, 163, 184, 0.4); }
.error-stack-trace { max-height: 160px; overflow-y: auto; padding: 8px 10px; border-radius: 6px; background: #080c14; border: 1px solid rgba(239, 68, 68, 0.25); font-family: var(--studio-font-mono, "JetBrains Mono", monospace); font-size: 11px; color: #fca5a5; line-height: 1.4; white-space: pre-wrap; word-break: break-all; }
.agent-node-card.failed,
.studio-node.failed { border: 2px solid #ef4444 !important; background: linear-gradient( 135deg, rgba(239, 68, 68, 0.15), rgba(22, 32, 50, 0.95)) !important; box-shadow: 0 0 20px rgba(239, 68, 68, 0.45) !important; }
.agent-node-card.failed .agent-node-badge,
.studio-node.failed .agent-node-badge { background: #ef4444 !important; color: #ffffff !important; }
.agent-node-card.skipped_fallback,
.studio-node.skipped_fallback { opacity: 0.60 !important; border: 1px dashed rgba(148, 163, 184, 0.35) !important; background: var(--studio-bg-card, #1b273d) !important; }
.agent-node-card.skipped_fallback .agent-node-badge,
.studio-node.skipped_fallback .agent-node-badge { background: rgba(100, 116, 139, 0.25) !important; color: #94a3b8 !important; }
.node-active-tool-pill { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 1px 6px; border-radius: 9999px; background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.35); color: #93c5fd; font-size: 9px; font-family: var(--studio-font-mono, monospace); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-active-tool-pill.hidden { display: none !important; }
.node-tool-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-error-tag { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; padding: 1px 5px; border-radius: 4px; background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.35); color: #fca5a5; font-size: 9px; font-weight: 700; }
.node-error-tag.hidden { display: none !important; }
.drawer-error-diagnostics-card { margin-bottom: 12px; padding: 12px; border-radius: var(--studio-radius-md, 8px); background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.45); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); animation: bannerSlideIn 0.25s ease-out; }
.drawer-error-diagnostics-card.hidden { display: none !important; }
.drawer-error-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.drawer-error-badge-group { display: flex; align-items: center; gap: 5px; }
.drawer-error-badge { font-size: 10px; font-weight: 800; text-transform: uppercase; color: #f87171; letter-spacing: 0.03em; }
.drawer-error-time { font-size: 10px; color: var(--studio-text-muted, #64748b); }
.drawer-error-summary-text { font-size: 12px; color: #f1f5f9; line-height: 1.4; margin-bottom: 8px; }
.drawer-stack-wrap { margin-bottom: 8px; }
.drawer-stack-toolbar { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; color: #94a3b8; margin-bottom: 4px; }
.btn-drawer-copy-error { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; font-size: 10px; border-radius: 4px; background: rgba(30, 41, 59, 0.6); border: 1px solid rgba(148, 163, 184, 0.2); color: #cbd5e1; cursor: pointer; transition: all 0.15s ease; }
.btn-drawer-copy-error:hover { background: rgba(51, 65, 85, 0.85); border-color: rgba(148, 163, 184, 0.4); }
.btn-drawer-copy-error:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); }
.drawer-error-stack-pre { max-height: 180px; overflow-y: auto; padding: 8px 10px; border-radius: 6px; background: #080c14; border: 1px solid rgba(239, 68, 68, 0.25); font-family: var(--studio-font-mono, "JetBrains Mono", monospace); font-size: 10.5px; color: #fca5a5; line-height: 1.4; white-space: pre-wrap; word-break: break-all; }
.drawer-error-actions { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.btn-drawer-action { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 30px; padding: 0 10px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; border: 1px solid rgba(148, 163, 184, 0.25); background: rgba(30, 41, 59, 0.7); color: #f1f5f9; }
.btn-drawer-action:hover { background: rgba(51, 65, 85, 0.9); border-color: rgba(148, 163, 184, 0.45); }
.btn-drawer-action:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); }
#btn-drawer-remedy-retry { background: rgba(59, 130, 246, 0.2); border-color: rgba(59, 130, 246, 0.4); color: #93c5fd; }
#btn-drawer-remedy-retry:hover { background: rgba(59, 130, 246, 0.35); border-color: rgba(59, 130, 246, 0.6); }
#btn-drawer-remedy-fallback { background: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.4); color: #a7f3d0; }
#btn-drawer-remedy-fallback:hover { background: rgba(16, 185, 129, 0.3); border-color: rgba(16, 185, 129, 0.6); }
/* frontend/css/studio/share-modal-shell.css */
.studio-btn-share,
#btn-share-app { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: var(--studio-radius-full, 9999px); background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.35); color: var(--studio-accent-emerald-light, #34d399); font-family: var(--studio-font-sans, inherit); font-size: 11.5px; font-weight: 700; cursor: pointer; letter-spacing: 0.01em; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 0 10px rgba(16, 185, 129, 0.15); user-select: none; white-space: nowrap; }
.studio-btn-share:hover,
#btn-share-app:hover { background: rgba(16, 185, 129, 0.22); border-color: rgba(16, 185, 129, 0.6); color: #6ee7b7; box-shadow: 0 0 16px rgba(16, 185, 129, 0.3); transform: translateY(-1px); }
.studio-btn-share:active,
#btn-share-app:active { transform: translateY(0); }
.studio-btn-share:focus-visible,
#btn-share-app:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8) !important; outline-offset: 2px !important; box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)) !important; }
#share-access-modal.share-access-dialog { border: none; padding: 0; background: transparent; width: 100%; max-width: 680px; color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, sans-serif); position: fixed; inset: 0; margin: auto; z-index: 1000; overflow: visible; }
#share-access-modal.share-access-dialog::backdrop { background: var(--studio-bg-overlay, rgba(8, 12, 20, 0.88)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
#share-access-modal:not([open]):not(.hidden) { display: flex; }
.share-access-modal-container { position: relative; width: 100%; max-width: 680px; background: var(--studio-bg-surface, #0f1624); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-xl, 18px); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 30px rgba(16, 185, 129, 0.1); overflow: hidden; display: flex; flex-direction: column; animation: studioModalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes studioModalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.share-modal-radiance-line { height: 2px; width: 100%; background: linear-gradient( 90deg, transparent, var(--studio-accent-emerald, #10b981), transparent); opacity: 0.85; }
.share-modal-header { padding: 16px 24px; border-bottom: 1px solid var(--studio-border-subtle, #263654); background: rgba(8, 12, 20, 0.6); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.share-modal-header-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.share-modal-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-modal-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); letter-spacing: -0.01em; }
.share-modal-app-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--studio-radius-full, 9999px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); font-size: 11px; font-weight: 600; color: var(--studio-accent-emerald, #10b981); }
.share-modal-app-dot { width: 6px; height: 6px; border-radius: 9999px; background: var(--studio-accent-emerald, #10b981); box-shadow: 0 0 6px var(--studio-accent-emerald, #10b981); }
.share-modal-subtitle { margin: 0; font-size: 12px; color: var(--studio-text-secondary, #94a3b8); line-height: 1.4; }
.btn-close-share-modal { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; min-width: 32px; min-height: 32px; border-radius: var(--studio-radius-sm, 6px); background: transparent; border: 1px solid transparent; color: var(--studio-text-secondary, #94a3b8); cursor: pointer; transition: all 0.15s ease; }
.btn-close-share-modal:hover { background: var(--studio-bg-elevated, #162032); color: var(--studio-text-primary, #f1f5f9); border-color: var(--studio-border-subtle, #263654); }
.btn-close-share-modal:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8) !important; outline-offset: 2px !important; }
.share-modal-body { padding: 20px 24px; max-height: calc(85vh - 140px); overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.share-invite-bar { background: var(--studio-bg-root, #080c14); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-md, 10px); padding: 6px 8px; display: flex; align-items: center; gap: 8px; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.share-invite-bar:focus-within { border-color: var(--studio-accent-emerald, #10b981); box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2); }
.share-invite-input-wrap { position: relative; flex: 1; display: flex; align-items: center; }
.share-invite-icon { position: absolute; left: 8px; color: var(--studio-text-muted, #64748b); display: flex; align-items: center; pointer-events: none; }
.share-invite-email-input { width: 100%; background: transparent; border: none; color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, inherit); font-size: 13px; padding: 8px 10px 8px 34px; outline: none; }
.share-invite-email-input::placeholder { color: var(--studio-text-muted, #64748b); }
.share-invite-divider { width: 1px; height: 24px; background: var(--studio-border-subtle, #263654); flex-shrink: 0; }
.share-invite-select-wrap { position: relative; width: 160px; flex-shrink: 0; }
.share-invite-role-select { width: 100%; appearance: none; background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-sm, 6px); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, inherit); font-size: 12px; font-weight: 600; padding: 7px 28px 7px 10px; cursor: pointer; outline: none; transition: border-color 0.15s ease; }
.share-invite-role-select:focus-visible { border-color: var(--studio-accent-emerald, #10b981); outline: 2px solid var(--studio-border-focus-ring, #38bdf8); }
.share-invite-chevron { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--studio-text-muted, #64748b); pointer-events: none; display: flex; align-items: center; }
.btn-send-invite { background: var(--studio-accent-emerald, #10b981); color: #080c14; border: none; border-radius: var(--studio-radius-sm, 6px); font-family: var(--studio-font-sans, inherit); font-size: 12px; font-weight: 700; padding: 8px 16px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25); transition: all 0.15s ease; user-select: none; }
.btn-send-invite:hover { filter: brightness(1.1); box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4); }
.btn-send-invite:active { transform: scale(0.98); }
.btn-send-invite:disabled { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.5); }
.btn-send-invite:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8) !important; outline-offset: 2px !important; }
.invite-inline-error { background: rgba(244, 63, 94, 0.12); border: 1px solid rgba(244, 63, 94, 0.45); color: #fb7185; font-size: 12px; font-weight: 500; padding: 8px 12px; border-radius: var(--studio-radius-sm, 6px); display: flex; align-items: center; gap: 6px; line-height: 1.4; }
.invite-link-result { background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.35); border-radius: var(--studio-radius-md, 10px); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.invite-link-info { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.invite-link-icon-wrap { width: 32px; height: 32px; border-radius: var(--studio-radius-sm, 6px); background: var(--studio-bg-elevated, #162032); color: var(--studio-accent-emerald, #10b981); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.invite-link-meta { min-width: 0; flex: 1; }
.invite-link-heading { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--studio-text-secondary, #94a3b8); }
.invite-link-url { font-family: var(--studio-font-mono, monospace); font-size: 12px; font-weight: 600; color: var(--studio-accent-emerald-light, #34d399); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: all; margin-top: 2px; }
.invite-link-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.invite-link-expiry { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: var(--studio-radius-full, 9999px); background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.35); color: var(--studio-accent-emerald, #10b981); }
.btn-copy-invite-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--studio-radius-sm, 6px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; min-height: 32px; }
.btn-copy-invite-link:hover { background: var(--studio-bg-card, #1b273d); border-color: var(--studio-border-highlight, #3b82f6); }
.btn-copy-invite-link:active { transform: scale(0.96); }
.btn-copy-invite-link:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8) !important; }
.share-section { display: flex; flex-direction: column; gap: 8px; }
.share-section-header { display: flex; align-items: center; justify-content: space-between; }
.share-section-heading { display: flex; align-items: center; gap: 8px; }
.share-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--studio-text-primary, #f1f5f9); }
.share-section-count { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--studio-radius-full, 9999px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-secondary, #94a3b8); }
.share-section-badge { font-family: var(--studio-font-mono, monospace); font-size: 11px; color: var(--studio-text-muted, #64748b); }
.app-members-list,
.app-invites-list { background: var(--studio-bg-root, #080c14); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-md, 10px); overflow: hidden; display: flex; flex-direction: column; }
/* frontend/css/studio/share-modal-members.css */
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid rgba(38, 54, 84, 0.45); transition: background-color 0.15s ease; }
.member-row:last-child { border-bottom: none; }
.member-row:hover { background: rgba(22, 32, 50, 0.45); }
.member-avatar { width: 32px; height: 32px; min-width: 32px; min-height: 32px; border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #ffffff; flex-shrink: 0; user-select: none; }
.member-avatar.avatar-owner { background: linear-gradient( 135deg, var(--studio-accent-violet, #8b5cf6), var(--studio-accent-blue, #3b82f6)); }
.member-avatar.avatar-admin { background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-accent-blue, #3b82f6); }
.member-avatar.avatar-editor { background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-accent-emerald, #10b981); }
.member-avatar.avatar-viewer { background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-secondary, #94a3b8); }
.member-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.member-name-row { display: flex; align-items: center; gap: 8px; }
.member-name { font-size: 13px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-email { font-size: 11.5px; color: var(--studio-text-secondary, #94a3b8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-badge { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: var(--studio-radius-full, 9999px); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.role-badge-owner { background: rgba(139, 92, 246, 0.2); border: 1px solid rgba(139, 92, 246, 0.45); color: var(--studio-accent-violet-light, #a78bfa); }
.role-badge-admin { background: rgba(59, 130, 246, 0.18); border: 1px solid rgba(59, 130, 246, 0.4); color: #93c5fd; }
.role-badge-editor { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.35); color: #6ee7b7; }
.role-badge-viewer { background: rgba(100, 116, 139, 0.2); border: 1px solid rgba(100, 116, 139, 0.4); color: var(--studio-text-secondary, #94a3b8); }
.member-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.member-role-select { appearance: none; background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-sm, 6px); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, inherit); font-size: 12px; font-weight: 600; padding: 5px 24px 5px 8px; cursor: pointer; outline: none; transition: all 0.15s ease; min-height: 30px; }
.member-role-select:hover { border-color: var(--studio-border-highlight, #3b82f6); }
.member-role-select:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8) !important; border-color: var(--studio-border-focus-ring, #38bdf8); }
.member-role-select-wrap { position: relative; display: inline-flex; align-items: center; }
.member-role-select-wrap .select-arrow { position: absolute; right: 5px; pointer-events: none; color: var(--studio-text-muted, #64748b); display: flex; align-items: center; }
.badge-sole-owner { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--studio-radius-sm, 6px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-secondary, #94a3b8); font-size: 11px; font-weight: 600; user-select: none; }
.badge-sole-owner .material-symbols-outlined { font-size: 13px; color: var(--studio-accent-amber, #f59e0b); }
.btn-remove-member { background: transparent; border: 1px solid transparent; color: rgba(244, 63, 94, 0.8); border-radius: var(--studio-radius-sm, 6px); font-size: 12px; font-weight: 600; padding: 4px 8px; cursor: pointer; transition: all 0.15s ease; min-height: 30px; }
.btn-remove-member:hover { color: var(--studio-accent-rose, #f43f5e); background: rgba(244, 63, 94, 0.12); border-color: rgba(244, 63, 94, 0.3); }
.btn-remove-member:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8) !important; }
.btn-remove-member:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.invite-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid rgba(38, 54, 84, 0.45); transition: background-color 0.15s ease; }
.invite-row:last-child { border-bottom: none; }
.invite-row:hover { background: rgba(22, 32, 50, 0.45); }
.invite-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.invite-email-row { display: flex; align-items: center; gap: 8px; }
.invite-email { font-size: 12.5px; font-weight: 600; color: var(--studio-text-primary, #f1f5f9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invite-timer { display: inline-flex; align-items: center; gap: 4px; font-family: var(--studio-font-mono, monospace); font-size: 11px; color: var(--studio-text-muted, #64748b); }
.invite-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.btn-copy-pending-link { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: var(--studio-radius-sm, 6px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); font-size: 11.5px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; min-height: 30px; }
.btn-copy-pending-link:hover { background: var(--studio-bg-card, #1b273d); border-color: var(--studio-border-highlight, #3b82f6); }
.btn-copy-pending-link:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8) !important; }
.btn-revoke-invite { background: transparent; border: 1px solid transparent; color: var(--studio-text-muted, #64748b); border-radius: var(--studio-radius-sm, 6px); font-size: 12px; font-weight: 600; padding: 4px 8px; cursor: pointer; transition: all 0.15s ease; min-height: 30px; }
.btn-revoke-invite:hover { color: var(--studio-accent-rose, #f43f5e); background: rgba(244, 63, 94, 0.1); }
.btn-revoke-invite:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8) !important; }
.share-skeleton-row { height: 52px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; background: linear-gradient( 90deg, #162032 25%, #1b273d 50%, #162032 75%); background-size: 200% 100%; animation: studioSkeletonShimmer 1.8s infinite linear; }
@keyframes studioSkeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.share-empty-state { padding: 24px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--studio-text-muted, #64748b); font-size: 12px; }
.share-empty-state .material-symbols-outlined { font-size: 24px; color: var(--studio-text-muted, #64748b); opacity: 0.7; }
.share-modal-footer { padding: 12px 24px; background: rgba(8, 12, 20, 0.8); border-top: 1px solid var(--studio-border-subtle, #263654); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.share-modal-footer-note { display: flex; align-items: center; gap: 6px; font-size: 11px; font-family: var(--studio-font-mono, monospace); color: var(--studio-text-secondary, #94a3b8); }
.share-modal-footer-note .text-emerald { color: var(--studio-accent-emerald, #10b981); }
.btn-done-share-modal { padding: 7px 22px; border-radius: var(--studio-radius-sm, 6px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, inherit); font-size: 12px; font-weight: 700; cursor: pointer; transition: all 0.15s ease; min-height: 36px; }
.btn-done-share-modal:hover { background: var(--studio-bg-card, #1b273d); border-color: var(--studio-border-highlight, #3b82f6); }
.btn-done-share-modal:active { transform: scale(0.97); }
.btn-done-share-modal:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8) !important; outline-offset: 2px !important; }
@media (max-width: 768px) {
  #share-access-modal.share-access-dialog { max-width: 100%; margin-bottom: 0; align-items: flex-end; }
  .share-access-modal-container { border-radius: 20px 20px 0 0; max-height: 90vh; padding-bottom: env(safe-area-inset-bottom, 16px); }
  .share-invite-bar { flex-direction: column; align-items: stretch; }
  .share-invite-divider { display: none; }
  .share-invite-select-wrap { width: 100%; }
  .share-invite-role-select { min-height: 44px; font-size: 14px; }
  .btn-send-invite { min-height: 44px; font-size: 14px; }
  .share-invite-email-input { min-height: 40px; font-size: 14px; }
  .btn-close-share-modal { min-width: 44px; min-height: 44px; }
  .btn-copy-invite-link,
  .btn-copy-pending-link,
  .btn-revoke-invite,
  .btn-remove-member,
  .btn-done-share-modal { min-height: 44px; min-width: 44px; }
  .member-role-select { min-height: 44px; font-size: 13px; }
  .invite-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .invite-actions { align-self: flex-end; }
}
/* frontend/css/studio/mermaid-and-toolbars.css */
.studio-mermaid-card { position: relative; background-color: var(--studio-bg-surface, #0f1624); border: 1px solid var(--studio-border-muted, rgba(148, 163, 184, 0.18)); border-radius: var(--studio-radius-lg, 14px); margin: 16px 0; overflow: hidden; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25); display: flex; flex-direction: column; transition: border-color var(--studio-transition-fast, 0.15s ease); }
.studio-mermaid-card:hover { border-color: var(--studio-border-subtle, #263654); }
.studio-mermaid-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background-color: var(--studio-bg-elevated, #162032); border-bottom: 1px solid var(--studio-border-subtle, #263654); min-height: 44px; flex-wrap: wrap; }
.studio-mermaid-title-group { display: flex; align-items: center; gap: 8px; min-width: 0; }
.studio-mermaid-icon { font-size: 18px; color: var(--studio-accent-indigo, #6366f1); flex-shrink: 0; }
.studio-mermaid-title { font-size: 13px; font-weight: 600; color: var(--studio-text-primary, #f1f5f9); white-space: nowrap; letter-spacing: -0.01em; }
.studio-mermaid-type-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--studio-radius-full, 9999px); font-size: 10px; font-weight: 700; font-family: var(--studio-font-mono, monospace); text-transform: uppercase; letter-spacing: 0.05em; background-color: var(--studio-bg-root, #080c14); color: var(--studio-accent-indigo, #6366f1); border: 1px solid rgba(99, 102, 241, 0.3); }
.studio-mermaid-actions { display: flex; align-items: center; gap: 8px; }
.studio-mermaid-status-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--studio-radius-full, 9999px); font-size: 11px; font-weight: 600; background-color: rgba(16, 185, 129, 0.12); color: var(--studio-accent-emerald, #10b981); border: 1px solid rgba(16, 185, 129, 0.3); transition: all var(--studio-transition-fast, 0.15s ease); }
.studio-mermaid-status-badge.status-syntax { background-color: var(--studio-bg-card, #1b273d); color: var(--studio-text-secondary, #94a3b8); border-color: var(--studio-border-subtle, #263654); }
.studio-mermaid-status-badge.status-fallback { background-color: rgba(245, 158, 11, 0.12); color: var(--studio-accent-amber, #f59e0b); border-color: rgba(245, 158, 11, 0.35); }
.studio-mermaid-status-badge.status-hydrating { background-color: rgba(59, 130, 246, 0.12); color: var(--studio-accent-blue, #3b82f6); border-color: rgba(59, 130, 246, 0.35); }
.studio-mermaid-status-badge.status-rendered { background-color: rgba(16, 185, 129, 0.12); color: var(--studio-accent-emerald, #10b981); border: 1px solid rgba(16, 185, 129, 0.3); }
.studio-mermaid-toggle-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; min-width: 100px; padding: 6px 12px; background-color: var(--studio-bg-card, #1b273d); color: var(--studio-text-primary, #f1f5f9); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-sm, 6px); font-size: 11px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all var(--studio-transition-fast, 0.15s ease); user-select: none; }
.studio-mermaid-toggle-btn:hover:not(:disabled) { background-color: var(--studio-bg-card-hover, #22314d); border-color: var(--studio-border-highlight, #3b82f6); color: #ffffff; }
.studio-mermaid-toggle-btn:disabled { opacity: 0.5; cursor: not-allowed; }
#spec-lab-arb-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 12px; }
.spec-lab-arb-filter-pill { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; background-color: var(--studio-bg-card, #1b273d); color: var(--studio-text-secondary, #94a3b8); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-sm, 6px); font-size: 11px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all var(--studio-transition-fast, 0.15s ease); }
.spec-lab-arb-filter-pill:hover { background-color: var(--studio-bg-card-hover, #22314d); color: #ffffff; border-color: var(--studio-border-highlight, #3b82f6); }
.spec-lab-arb-filter-pill.active,
.spec-lab-arb-filter-pill[aria-selected=true] { background-color: rgba(59, 130, 246, 0.22); color: #ffffff; border-color: rgba(59, 130, 246, 0.65); box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25); }
.spec-lab-arb-diagram-item { background-color: var(--studio-bg-root, #0b101b); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-md, 8px); padding: 12px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.spec-lab-arb-diagram-item.hidden { display: none !important; }
.studio-mermaid-viewport { position: relative; min-height: 220px; padding: 24px; background-color: var(--studio-bg-surface, #0f1624); overflow-x: auto; overflow-y: hidden; display: flex; justify-content: center; align-items: center; outline: none; }
.studio-mermaid-viewport .mermaid { width: 100%; display: flex; justify-content: center; align-items: center; }
.studio-mermaid-viewport .mermaid svg { max-width: 100% !important; height: auto !important; display: block; margin: 0 auto; }
.studio-mermaid-code { margin: 0 !important; padding: 16px 20px !important; background-color: var(--studio-bg-code, #1e293b) !important; border: none !important; border-radius: 0 !important; overflow-x: auto; font-family: var(--studio-font-mono, monospace) !important; font-size: 12px !important; line-height: 1.6 !important; color: #e2e8f0 !important; }
.studio-mermaid-code code { font-family: inherit !important; color: inherit !important; background: transparent !important; padding: 0 !important; }
.studio-mermaid-fallback-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background-color: rgba(245, 158, 11, 0.1); border-bottom: 1px solid rgba(245, 158, 11, 0.25); }
.studio-mermaid-fallback-banner[hidden],
.studio-mermaid-viewport[hidden],
.studio-mermaid-code[hidden],
.studio-mermaid-fallback-banner.hidden,
.studio-mermaid-viewport.hidden,
.studio-mermaid-code.hidden { display: none !important; }
.spec-lab-stitch-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: nowrap; overflow-x: auto; }
.spec-lab-stitch-toolbar .studio-btn-sm,
.stitch-studio-header-right button { white-space: nowrap; flex-shrink: 0; }
.studio-mermaid-fallback-content { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--studio-accent-amber, #f59e0b); font-weight: 500; }
.btn-retry-render { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background-color: rgba(245, 158, 11, 0.18); border: 1px solid rgba(245, 158, 11, 0.4); border-radius: var(--studio-radius-sm, 6px); color: #fef3c7; font-size: 11px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast, 0.15s ease); }
.btn-retry-render:hover { background-color: rgba(245, 158, 11, 0.3); border-color: var(--studio-accent-amber, #f59e0b); }
.studio-mermaid-toggle-btn:focus-visible,
.btn-retry-render:focus-visible,
.studio-mermaid-viewport:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8) !important; outline-offset: 2px !important; box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)) !important; }
@media (max-width: 768px) {
  .studio-mermaid-toggle-btn,
  .btn-retry-render { min-height: 44px; min-width: 44px; font-size: 12px; }
  .studio-mermaid-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .studio-mermaid-actions { width: 100%; justify-content: space-between; }
}
/* frontend/css/studio/help-center-explorer.css */
#studio-help-workspace.help-workspace-container { display: none; width: 100vw; height: calc(100vh - 56px); overflow: hidden; background-color: var(--studio-bg-root, #080c14); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, "Inter", sans-serif); position: relative; z-index: 10; box-sizing: border-box; }
#studio-help-workspace.active { display: flex !important; flex-direction: row; }
.help-main-pane { flex: 1; min-width: 0; height: 100%; overflow-y: auto; overflow-x: hidden; padding: 24px 32px 80px; box-sizing: border-box; scroll-behavior: smooth; background: var(--studio-bg-root, #080c14); }
.help-main-pane::-webkit-scrollbar { width: 8px; }
.help-main-pane::-webkit-scrollbar-track { background: rgba(15, 22, 36, 0.6); }
.help-main-pane::-webkit-scrollbar-thumb { background: rgba(38, 54, 84, 0.8); border-radius: 4px; }
.help-main-pane::-webkit-scrollbar-thumb:hover { background: var(--studio-border-highlight, #3b82f6); }
.help-hero-banner { margin-bottom: 24px; background: linear-gradient( 135deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%); border: 1px solid var(--studio-border-subtle, #263654); border-radius: 14px; padding: 24px 28px; position: relative; overflow: hidden; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35); }
.help-hero-banner::after { content: ""; position: absolute; top: -50px; right: -50px; width: 200px; height: 200px; background: radial-gradient( circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%); pointer-events: none; }
.help-hero-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--studio-accent-blue-light, #60a5fa); background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.3); padding: 3px 10px; border-radius: 9999px; margin-bottom: 12px; }
.help-hero-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--studio-text-primary, #f1f5f9); margin: 0 0 8px 0; }
.help-hero-subtitle { font-size: 13.5px; line-height: 1.55; color: var(--studio-text-secondary, #94a3b8); margin: 0; max-width: 860px; }
.help-filter-bar { position: sticky; top: 0; z-index: 20; background: rgba(8, 12, 20, 0.94); backdrop-filter: blur(12px); padding: 12px 0 16px; margin-bottom: 24px; border-bottom: 1px solid rgba(38, 54, 84, 0.5); }
.help-search-container { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.help-search-box-wrapper { flex: 1; position: relative; display: flex; align-items: center; }
.help-search-icon { position: absolute; left: 12px; font-size: 18px; color: var(--studio-text-muted, #64748b); pointer-events: none; }
.help-search-input { width: 100%; padding: 9px 36px 9px 38px; background: var(--studio-bg-surface, #0f1624); border: 1px solid var(--studio-border-subtle, #263654); border-radius: 8px; color: var(--studio-text-primary, #f1f5f9); font-size: 13px; font-family: inherit; transition: all var(--studio-transition-fast, 0.15s ease); box-sizing: border-box; }
.help-search-input:focus { outline: none; border-color: var(--studio-border-focus-ring, #38bdf8); box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)); }
.help-search-clear { position: absolute; right: 10px; background: transparent; border: none; color: var(--studio-text-muted, #64748b); cursor: pointer; padding: 4px; display: none; font-size: 16px; }
.help-search-clear:hover { color: var(--studio-text-primary, #f1f5f9); }
.help-nav-pills-bar { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.help-nav-pills-bar::-webkit-scrollbar { height: 4px; }
.help-nav-pills-bar::-webkit-scrollbar-thumb { background: rgba(38, 54, 84, 0.6); border-radius: 2px; }
.help-nav-pill { padding: 5px 12px; border-radius: 9999px; font-size: 11.5px; font-weight: 600; background: var(--studio-bg-surface, #0f1624); color: var(--studio-text-secondary, #94a3b8); border: 1px solid var(--studio-border-subtle, #263654); cursor: pointer; white-space: nowrap; transition: all var(--studio-transition-fast, 0.15s ease); user-select: none; }
.help-nav-pill:hover { background: var(--studio-bg-card-hover, #22314d); color: var(--studio-text-primary, #f1f5f9); border-color: rgba(59, 130, 246, 0.4); }
.help-nav-pill.active { background: var(--studio-accent-blue-container, #1d4ed8); color: #ffffff; border-color: var(--studio-accent-blue, #3b82f6); box-shadow: 0 0 10px rgba(59, 130, 246, 0.35); }
.help-section-card { background: var(--studio-bg-surface, #0f1624); border: 1px solid var(--studio-border-subtle, #263654); border-radius: 12px; padding: 24px; margin-bottom: 28px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); transition: border-color 0.3s ease, box-shadow 0.3s ease; scroll-margin-top: 130px; }
.help-section-card.highlight-target { animation: helpHighlightPulse 2s ease-out 2; border-color: var(--studio-accent-blue, #3b82f6) !important; }
@keyframes helpHighlightPulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
  50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.25); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
.help-sec-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.help-sec-title-group { display: flex; align-items: center; gap: 10px; }
.help-sec-icon-box { width: 34px; height: 34px; border-radius: 8px; background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.4); display: flex; align-items: center; justify-content: center; color: var(--studio-accent-blue-light, #60a5fa); }
.help-sec-icon-box.emerald { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.4); color: var(--studio-accent-emerald-light, #34d399); }
.help-sec-icon-box.violet { background: rgba(139, 92, 246, 0.15); border-color: rgba(139, 92, 246, 0.4); color: var(--studio-accent-violet-light, #a78bfa); }
.help-sec-icon-box.amber { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.4); color: var(--studio-accent-amber, #f59e0b); }
.help-sec-title { font-size: 18px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); margin: 0; }
.help-sec-badge { font-size: 10.5px; font-weight: 700; text-transform: uppercase; padding: 3px 8px; border-radius: 9999px; background: rgba(148, 163, 184, 0.12); color: var(--studio-text-secondary, #94a3b8); border: 1px solid rgba(148, 163, 184, 0.25); }
.help-jump-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: 6px; background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.4); color: var(--studio-accent-blue-light, #60a5fa); font-size: 12px; font-weight: 600; cursor: pointer; transition: all var(--studio-transition-fast, 0.15s ease); text-decoration: none; }
.help-jump-btn:hover { background: var(--studio-accent-blue, #3b82f6); color: #ffffff; box-shadow: 0 0 12px rgba(59, 130, 246, 0.4); }
.help-diagram-container { background: var(--studio-bg-root, #080c14); border: 1px solid var(--studio-border-subtle, #263654); border-radius: 10px; padding: 16px; margin: 18px 0; position: relative; overflow-x: auto; }
.help-diagram-svg { width: 100%; min-width: 680px; height: auto; display: block; }
.help-callout-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 20px 0 10px; }
.help-callout-card { background: var(--studio-bg-card, #1b273d); border: 1px solid var(--studio-border-subtle, #263654); border-radius: 8px; padding: 16px; position: relative; transition: border-color var(--studio-transition-fast, 0.15s ease); }
.help-callout-card:hover { border-color: rgba(59, 130, 246, 0.4); }
.help-callout-num-badge { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 9999px; background: var(--studio-accent-blue-container, #1d4ed8); color: #ffffff; font-size: 11.5px; font-weight: 700; margin-bottom: 8px; }
.help-callout-title { font-size: 14px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); margin: 0 0 6px 0; }
.help-callout-desc { font-size: 12.5px; line-height: 1.5; color: var(--studio-text-secondary, #94a3b8); margin: 0; }
.help-pillars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 16px 0; }
.help-pillar-card { background: rgba(15, 22, 36, 0.8); border: 1px solid var(--studio-border-subtle, #263654); border-left: 3px solid var(--studio-accent-blue, #3b82f6); border-radius: 8px; padding: 14px; }
.help-pillar-title { font-size: 13.5px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); margin: 0 0 4px 0; display: flex; align-items: center; gap: 6px; }
.help-pillar-desc { font-size: 12px; color: var(--studio-text-secondary, #94a3b8); margin: 0; line-height: 1.45; }
.help-agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 16px 0; }
.help-agent-card { background: var(--studio-bg-card, #1b273d); border: 1px solid var(--studio-border-subtle, #263654); border-radius: 8px; padding: 14px; transition: all var(--studio-transition-fast, 0.15s ease); }
.help-agent-card:hover { border-color: rgba(59, 130, 246, 0.4); transform: translateY(-2px); }
.help-agent-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.help-agent-name { font-family: var(--studio-font-mono, monospace); font-size: 13px; font-weight: 700; color: var(--studio-accent-blue-light, #60a5fa); }
.help-agent-tier { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; }
.help-agent-tier.pro { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.4); }
.help-agent-tier.flash { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.4); }
.help-agent-tier.flash_lite { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
.help-agent-role { font-size: 12px; color: var(--studio-text-secondary, #94a3b8); margin: 0 0 6px 0; line-height: 1.4; }
.help-agent-artifact { font-size: 11px; font-family: var(--studio-font-mono, monospace); color: var(--studio-text-muted, #64748b); margin: 0; }
.help-slash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 16px 0; }
.help-slash-card { background: rgba(15, 22, 36, 0.8); border: 1px solid var(--studio-border-subtle, #263654); border-radius: 8px; padding: 12px 14px; }
.help-slash-cmd { font-family: var(--studio-font-mono, monospace); font-size: 13px; font-weight: 700; color: var(--studio-accent-emerald-light, #34d399); margin: 0 0 4px 0; }
.help-slash-desc { font-size: 12px; color: var(--studio-text-secondary, #94a3b8); margin: 0; line-height: 1.4; }
.help-glossary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin: 16px 0; }
.help-glossary-card { background: var(--studio-bg-card, #1b273d); border: 1px solid var(--studio-border-subtle, #263654); border-radius: 8px; padding: 14px; transition: all var(--studio-transition-fast, 0.15s ease); }
.help-glossary-card:hover { border-color: rgba(59, 130, 246, 0.4); }
.help-glossary-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.help-glossary-term { font-size: 13.5px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); margin: 0; }
.help-glossary-cat { font-size: 10px; font-weight: 600; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: rgba(59, 130, 246, 0.12); color: var(--studio-accent-blue-light, #60a5fa); border: 1px solid rgba(59, 130, 246, 0.3); }
.help-glossary-def { font-size: 12px; line-height: 1.45; color: var(--studio-text-secondary, #94a3b8); margin: 0; }
.help-playbook-item { background: var(--studio-bg-card, #1b273d); border: 1px solid var(--studio-border-subtle, #263654); border-radius: 8px; margin-bottom: 12px; overflow: hidden; transition: border-color var(--studio-transition-fast, 0.15s ease); }
.help-playbook-item[open] { border-color: rgba(59, 130, 246, 0.5); }
.help-playbook-summary { padding: 14px 18px; font-size: 14px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); cursor: pointer; display: flex; align-items: center; justify-content: space-between; user-select: none; background: var(--studio-bg-surface, #0f1624); }
.help-playbook-summary::-webkit-details-marker { display: none; }
.help-playbook-summary::after { content: "▾"; font-size: 16px; color: var(--studio-text-muted, #64748b); transition: transform 0.2s ease; }
.help-playbook-item[open] .help-playbook-summary::after { transform: rotate(180deg); }
.help-playbook-body { padding: 16px 20px; font-size: 13px; line-height: 1.6; color: var(--studio-text-secondary, #94a3b8); border-top: 1px solid rgba(38, 54, 84, 0.5); }
.help-playbook-step { margin-bottom: 12px; }
.help-playbook-step strong { color: var(--studio-text-primary, #f1f5f9); }
/* frontend/css/studio/help-center-chat.css */
.help-chat-panel { width: 410px; min-width: 380px; max-width: 440px; height: 100%; display: flex; flex-direction: column; background: var(--studio-bg-surface, #0f1624); border-left: 1px solid var(--studio-border-subtle, #263654); box-sizing: border-box; position: relative; overflow: hidden; }
.help-chat-header { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--studio-border-subtle, #263654); background: rgba(15, 22, 36, 0.95); gap: 8px; }
.help-chat-title-group { display: flex; flex-direction: column; gap: 2px; }
.help-chat-title { font-size: 14px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); margin: 0; display: flex; align-items: center; gap: 6px; }
.help-guardrail-badge { font-size: 10.5px; font-weight: 600; color: var(--studio-accent-emerald-light, #34d399); display: inline-flex; align-items: center; gap: 4px; }
.help-chat-clear-btn { background: transparent; border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-muted, #64748b); border-radius: 6px; padding: 4px 8px; font-size: 11px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 4px; transition: all var(--studio-transition-fast, 0.15s ease); }
.help-chat-clear-btn:hover { background: rgba(244, 63, 94, 0.15); border-color: rgba(244, 63, 94, 0.4); color: var(--studio-accent-rose, #f43f5e); }
.help-scope-notice { padding: 8px 14px; background: rgba(14, 165, 233, 0.08); border-bottom: 1px solid rgba(14, 165, 233, 0.2); font-size: 11px; line-height: 1.4; color: #7dd3fc; display: flex; align-items: flex-start; gap: 6px; }
.help-chat-suggestions { padding: 10px 14px 6px; display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid rgba(38, 54, 84, 0.35); background: rgba(8, 12, 20, 0.3); }
.help-suggestion-chip { padding: 4px 9px; border-radius: 9999px; font-size: 11px; background: rgba(30, 41, 59, 0.7); color: var(--studio-text-secondary, #94a3b8); border: 1px solid var(--studio-border-subtle, #263654); cursor: pointer; transition: all var(--studio-transition-fast, 0.15s ease); text-align: left; line-height: 1.25; }
.help-suggestion-chip:hover { background: rgba(59, 130, 246, 0.2); color: #ffffff; border-color: rgba(59, 130, 246, 0.5); }
.help-chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; }
.help-chat-messages::-webkit-scrollbar { width: 6px; }
.help-chat-messages::-webkit-scrollbar-thumb { background: rgba(38, 54, 84, 0.6); border-radius: 3px; }
.help-chat-bubble { max-width: 92%; padding: 12px 14px; border-radius: 10px; font-size: 12.5px; line-height: 1.5; box-sizing: border-box; word-break: break-word; }
.help-chat-bubble.user { align-self: flex-end; background: linear-gradient( 135deg, #1d4ed8 0%, #2563eb 100%); color: #ffffff; border-bottom-right-radius: 2px; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3); }
.help-chat-bubble.assistant { align-self: flex-start; background: var(--studio-bg-card, #1b273d); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); border-bottom-left-radius: 2px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
.help-chat-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--studio-accent-emerald-light, #34d399); background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.3); padding: 2px 6px; border-radius: 4px; margin-bottom: 6px; }
.help-chat-content p { margin: 0 0 8px 0; }
.help-chat-content p:last-child { margin-bottom: 0; }
.help-chat-content code { font-family: var(--studio-font-mono, monospace); font-size: 11.5px; background: rgba(8, 12, 20, 0.6); padding: 1px 4px; border-radius: 3px; border: 1px solid rgba(38, 54, 84, 0.6); }
.help-chat-content ul,
.help-chat-content ol { margin: 4px 0 8px 18px; padding: 0; }
.help-chat-content li { margin-bottom: 4px; }
.help-citations-group { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(38, 54, 84, 0.4); display: flex; flex-direction: column; gap: 4px; }
.help-citations-label { font-size: 10.5px; font-weight: 700; color: var(--studio-text-muted, #64748b); text-transform: uppercase; }
.help-citation-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.3); color: var(--studio-accent-blue-light, #60a5fa); cursor: pointer; transition: all var(--studio-transition-fast, 0.15s ease); align-self: flex-start; text-decoration: none; }
.help-citation-pill:hover { background: rgba(59, 130, 246, 0.25); border-color: var(--studio-accent-blue, #3b82f6); color: #ffffff; }
.help-followups-container { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.help-followup-pill { padding: 3px 8px; border-radius: 9999px; font-size: 11px; background: rgba(15, 22, 36, 0.8); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-secondary, #94a3b8); cursor: pointer; transition: all var(--studio-transition-fast, 0.15s ease); }
.help-followup-pill:hover { background: rgba(59, 130, 246, 0.2); color: #ffffff; border-color: rgba(59, 130, 246, 0.4); }
.help-chat-bubble.blocked-alert { align-self: flex-start; border-radius: 10px; padding: 14px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); }
.help-chat-bubble.blocked-alert[data-guardrail-status=blocked_unsafe_or_injection] { background: rgba(244, 63, 94, 0.08); border: 1px solid rgba(244, 63, 94, 0.4); }
.help-chat-bubble.blocked-alert[data-guardrail-status=blocked_off_topic] { background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.4); }
.help-blocked-header { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.help-chat-bubble.blocked-alert[data-guardrail-status=blocked_unsafe_or_injection] .help-blocked-header { color: var(--studio-accent-rose, #f43f5e); }
.help-chat-bubble.blocked-alert[data-guardrail-status=blocked_off_topic] .help-blocked-header { color: var(--studio-accent-amber, #f59e0b); }
.help-blocked-body { font-size: 12px; line-height: 1.45; color: var(--studio-text-secondary, #94a3b8); margin-bottom: 8px; }
.help-chat-footer { padding: 12px 14px; border-top: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-surface, #0f1624); }
.help-chat-input-wrapper { position: relative; display: flex; flex-direction: column; }
.help-chat-input { width: 100%; padding: 10px 42px 10px 12px; background: var(--studio-bg-root, #080c14); border: 1px solid var(--studio-border-subtle, #263654); border-radius: 8px; color: var(--studio-text-primary, #f1f5f9); font-size: 12.5px; font-family: inherit; resize: none; box-sizing: border-box; line-height: 1.4; transition: all var(--studio-transition-fast, 0.15s ease); }
.help-chat-input:focus { outline: none; border-color: var(--studio-border-focus-ring, #38bdf8); box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)); }
.help-chat-submit { position: absolute; right: 8px; bottom: 24px; width: 28px; height: 28px; border-radius: 6px; background: var(--studio-accent-blue, #3b82f6); border: none; color: #ffffff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--studio-transition-fast, 0.15s ease); }
.help-chat-submit:hover:not(:disabled) { background: var(--studio-accent-blue-light, #60a5fa); transform: translateY(-1px); }
.help-chat-submit:disabled { background: rgba(38, 54, 84, 0.6); color: var(--studio-text-muted, #64748b); cursor: not-allowed; }
.help-chat-meta-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 10px; color: var(--studio-text-muted, #64748b); }
@media (max-width: 1100px) {
  #studio-help-workspace.active { flex-direction: column !important; overflow-y: auto !important; }
  .help-main-pane { height: auto !important; overflow-y: visible !important; padding: 18px 20px 40px; }
  .help-chat-panel { width: 100% !important; max-width: 100% !important; min-width: 100% !important; height: 520px !important; border-left: none !important; border-top: 1px solid var(--studio-border-subtle, #263654); }
}
/* frontend/css/studio/deploy-byoc-wizard.css */
.studio-deploy-dialog,
.deploy-teardown-dialog { width: min(780px, calc(100vw - 24px)); max-width: 100%; box-sizing: border-box; background: var(--studio-bg-surface, #0f1624); color: var(--studio-text-primary, #f1f5f9); border: 1px solid var(--studio-border-subtle, #263654); }
.studio-deploy-dialog *,
.deploy-teardown-dialog *,
.byoc-wizard-panel *,
.byoc-azure-wizard-panel *,
.byoc-aws-wizard-panel * { box-sizing: border-box; min-width: 0; }
.studio-deploy-dialog :is(button, a, input, select, textarea, summary, [role=radio], [role=tab]):focus-visible,
.deploy-teardown-dialog :is(button, a, input, select, textarea, summary, [role=radio], [role=tab]):focus-visible,
.byoc-wizard-panel :is(button, a, input, select, textarea, summary, [role=radio], [role=tab]):focus-visible,
.byoc-azure-wizard-panel :is(button, a, input, select, textarea, summary, [role=radio], [role=tab]):focus-visible,
.byoc-aws-wizard-panel :is(button, a, input, select, textarea, summary, [role=radio], [role=tab]):focus-visible,
.deploy-status-pill:focus-visible,
.exec-standalone-launch-link:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)); }
.studio-deploy-modal-body { display: flex; flex-direction: column; gap: 14px; max-height: min(76vh, 720px); overflow-y: auto; overflow-x: hidden; }
.deploy-modal-subtitle { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; font-size: 12.5px; color: var(--studio-text-secondary, #94a3b8); }
.deploy-status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; min-height: 28px; border-radius: var(--studio-radius-full, 999px); font-size: 12px; font-weight: 600; line-height: 1.2; border: 1px solid #475569; background: var(--studio-status-muted-bg, #1e293b); color: var(--studio-status-muted-fg, #cbd5e1); max-width: 100%; }
.deploy-status-pill.is-unconfigured { background: #162032; color: #cbd5e1; border-color: #475569; }
.deploy-status-pill.is-tier-blocked,
.deploy-status-pill.is-org-policy-blocked { background: var(--studio-status-warn-bg, #2b1d07); color: var(--studio-status-warn-fg, #fde68a); border-color: var(--studio-status-warn-border, #f59e0b); }
.deploy-status-pill.is-deploying { background: var(--studio-status-info-bg, #082f49); color: var(--studio-status-info-fg, #bae6fd); border-color: var(--studio-status-info-border, #38bdf8); }
.deploy-status-pill.is-active-hosted { background: var(--studio-status-ok-bg, #052e2b); color: var(--studio-status-ok-fg, #6ee7b7); border-color: var(--studio-status-ok-border, #10b981); }
.deploy-status-pill.is-active-byoc { background: #082f49; color: #bae6fd; border-color: #38bdf8; }
.deploy-status-pill.is-active-azure { background: #0b2942; color: #bfdbfe; border-color: #3b82f6; }
.deploy-status-pill.is-active-aws { background: #2b1d07; color: #fde68a; border-color: #f59e0b; }
.deploy-status-pill.is-active-oidc { background: #1e1b4b; color: #ddd6fe; border-color: #8b5cf6; }
.deploy-status-pill.is-failed { background: var(--studio-status-err-bg, #331018); color: var(--studio-status-err-fg, #fecdd3); border-color: var(--studio-status-err-border, #fb7185); }
.deploy-status-pill.is-detached { background: #1e293b; color: #cbd5e1; border-color: #475569; }
.deploy-tier-upgrade-banner,
.deploy-modal-error-banner,
.deploy-org-policy-alert,
.deploy-error-remediation-panel,
.byoc-error-alert,
.byoc-deprecation-banner,
.byoc-cloudsql-warning-box,
.byoc-azure-pg-warning,
.byoc-aws-rds-warning { padding: 12px 14px; border-radius: var(--studio-radius-md, 10px); font-size: 13px; line-height: 1.45; display: flex; flex-direction: column; gap: 8px; }
.deploy-tier-upgrade-banner,
.deploy-org-policy-alert,
.byoc-deprecation-banner,
.byoc-cloudsql-warning-box,
.byoc-azure-pg-warning,
.byoc-aws-rds-warning { background: var(--studio-status-warn-bg, #2b1d07); border: 1px solid var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); }
.deploy-modal-error-banner,
.deploy-error-remediation-panel,
.byoc-error-alert { background: var(--studio-status-err-bg, #331018); border: 1px solid var(--studio-status-err-border, #fb7185); color: var(--studio-status-err-fg, #fecdd3); }
.deploy-tier-banner-title { font-weight: 700; color: #fef3c7; }
.deploy-tier-banner-desc { font-size: 12.5px; color: #fde68a; }
.deploy-alert-content { display: flex; flex-direction: column; gap: 8px; }
.byoc-cloudsql-warning-box a,
.byoc-azure-pg-warning a,
.byoc-aws-rds-warning a { color: #fde68a; text-decoration: underline; font-weight: 700; }
.byoc-cloudsql-warning-box a:hover,
.byoc-azure-pg-warning a:hover,
.byoc-aws-rds-warning a:hover { color: #fef3c7; }
.byoc-cloudsql-ack-label,
.byoc-azure-pg-warning label,
.byoc-aws-rds-warning label,
.byoc-rds-ack-label { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 2px 0; cursor: pointer; color: #fef3c7; line-height: 1.45; }
.byoc-cloudsql-ack-label input[type=checkbox],
.byoc-azure-pg-warning input[type=checkbox],
.byoc-aws-rds-warning input[type=checkbox],
.byoc-rds-ack-label input[type=checkbox] { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--studio-accent-amber, #f59e0b); cursor: pointer; }
.deploy-section-label,
.byoc-field-label,
.byoc-identity-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #cbd5e1; margin-bottom: 6px; }
.deploy-target-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.deploy-access-grid,
.deploy-db-grid,
.byoc-form-grid,
.byoc-identity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.deploy-teardown-radiogroup { display: flex; flex-direction: column; gap: 10px; }
.deploy-target-card,
.deploy-access-card { width: 100%; min-height: 44px; text-align: left; padding: 12px 14px; border-radius: var(--studio-radius-md, 10px); border: 1px solid #334155; background: var(--studio-bg-elevated, #162032); color: var(--studio-text-primary, #f1f5f9); cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease; }
.deploy-target-card:hover:not([aria-disabled=true]),
.deploy-access-card:hover:not([aria-disabled=true]) { border-color: var(--studio-border-focus-ring, #38bdf8); background: var(--studio-bg-card, #1b273d); }
.deploy-target-card.selected,
.deploy-access-card.selected { border-color: var(--studio-accent-emerald, #10b981); background: #0d2b26; box-shadow: inset 0 0 0 1px #10b981; }
.deploy-target-card[data-deploy-target=byoc_aws_app_runner]:hover:not([aria-disabled=true]) { border-color: var(--studio-accent-amber, #f59e0b); }
.deploy-target-card[data-deploy-target=byoc_aws_app_runner].selected { border-color: var(--studio-accent-amber, #f59e0b); background: #231a0b; box-shadow: inset 0 0 0 1px #f59e0b; }
.deploy-target-card.is-destructive.selected { border-color: #fb7185; background: var(--studio-status-err-bg, #331018); box-shadow: inset 0 0 0 1px #fb7185; }
.deploy-target-card[aria-disabled=true] { opacity: 0.78; cursor: not-allowed; border-color: #334155; }
.deploy-target-card-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-weight: 600; color: var(--studio-text-primary, #f1f5f9); }
.deploy-target-desc,
.byoc-field-help,
.deploy-gate-hint,
.deploy-history-empty,
.deploy-history-meta,
.deploy-fail-detail,
.deploy-fail-hint,
.deploy-org-policy-hint { font-size: 12.5px; line-height: 1.45; color: #cbd5e1; margin: 0; }
.byoc-field-help.is-validation-error { color: #fda4af; font-weight: 600; }
.deploy-quota-chip { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--studio-radius-full, 999px); background: #1e293b; color: #e2e8f0; border: 1px solid #475569; white-space: nowrap; }
.deploy-quota-chip.is-ready { background: var(--studio-status-ok-bg, #052e2b); color: var(--studio-status-ok-fg, #6ee7b7); border-color: var(--studio-status-ok-border, #10b981); }
.deploy-quota-chip.is-locked,
.deploy-quota-chip.is-tier-locked,
.deploy-quota-chip.is-warn { background: var(--studio-status-warn-bg, #2b1d07); color: var(--studio-status-warn-fg, #fde68a); border-color: var(--studio-status-warn-border, #f59e0b); }
.deploy-byoc-config-section { display: flex; flex-direction: column; gap: 10px; }
.deploy-byoc-verified-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 14px; border-radius: var(--studio-radius-md, 10px); border: 1px solid var(--studio-status-ok-border, #10b981); background: var(--studio-status-ok-bg, #052e2b); color: var(--studio-status-ok-fg, #6ee7b7); font-size: 13px; font-weight: 600; }
.byoc-wizard-panel,
.byoc-azure-wizard-panel,
.byoc-aws-wizard-panel { padding: 14px; border-radius: var(--studio-radius-md, 10px); border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-root, #080c14); color: var(--studio-text-primary, #f1f5f9); display: flex; flex-direction: column; gap: 12px; max-width: 100%; }
.byoc-azure-wizard-panel { border-color: #1e3a5f; }
.byoc-aws-wizard-panel { border-color: #4b3617; }
.byoc-remediation-card,
.byoc-azure-remediation-card,
.byoc-aws-remediation-card { padding: 12px 14px; border-radius: var(--studio-radius-md, 10px); border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-elevated, #162032); color: var(--studio-text-primary, #f1f5f9); font-size: 13px; line-height: 1.45; display: flex; flex-direction: column; gap: 8px; }
.byoc-azure-remediation-card { border-color: #1e3a5f; }
.byoc-aws-remediation-card { border-color: #4b3617; }
.byoc-remediation-card.is-error,
.byoc-azure-remediation-card.is-error,
.byoc-aws-remediation-card.is-error { background: var(--studio-status-err-bg, #331018); border-color: var(--studio-status-err-border, #fb7185); color: var(--studio-status-err-fg, #fecdd3); }
.byoc-remediation-card.is-warn,
.byoc-azure-remediation-card.is-warn,
.byoc-aws-remediation-card.is-warn { background: var(--studio-status-warn-bg, #2b1d07); border-color: var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); }
.byoc-remediation-card.is-info,
.byoc-azure-remediation-card.is-info,
.byoc-aws-remediation-card.is-info { background: var(--studio-status-info-bg, #082f49); border-color: var(--studio-status-info-border, #38bdf8); color: var(--studio-status-info-fg, #bae6fd); }
.byoc-remediation-card pre,
.byoc-remediation-card code,
.byoc-azure-remediation-card pre,
.byoc-azure-remediation-card code,
.byoc-aws-remediation-card pre,
.byoc-aws-remediation-card code { font-family: var(--studio-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 12px; color: #f1f5f9; }
.byoc-remediation-card pre,
.byoc-azure-remediation-card pre,
.byoc-aws-remediation-card pre { margin: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-root, #080c14); overflow-x: auto; max-width: 100%; }
.byoc-remediation-card button,
.byoc-remediation-card a,
.byoc-azure-remediation-card button,
.byoc-azure-remediation-card a,
.byoc-azure-wizard-panel button,
.byoc-aws-remediation-card button,
.byoc-aws-remediation-card a,
.byoc-aws-wizard-panel button { min-height: 44px; }
.byoc-azure-remediation-reference,
.byoc-aws-remediation-reference { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-surface, #0f1624); }
.byoc-azure-remediation-reference summary,
.byoc-aws-remediation-reference summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.byoc-verified-banner { padding: 10px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; line-height: 1.45; border: 1px solid #334155; background: var(--studio-bg-elevated, #162032); color: #cbd5e1; }
.byoc-verified-banner.is-verified { background: var(--studio-status-ok-bg, #052e2b); border-color: var(--studio-status-ok-border, #10b981); color: var(--studio-status-ok-fg, #6ee7b7); }
.byoc-verified-banner.is-pending { background: var(--studio-status-warn-bg, #2b1d07); border-color: var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); }
.byoc-verified-banner a,
.deploy-meta-link { color: #bae6fd; text-decoration: underline; font-weight: 700; }
.byoc-verified-banner.is-pending a { color: #fde68a; }
.byoc-verified-banner a:hover,
.deploy-meta-link:hover { color: #ffffff; }
.byoc-field-group { display: flex; flex-direction: column; gap: 4px; }
.byoc-input-mono,
.byoc-select,
.byoc-textarea-mono,
.byoc-file-input { width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 8px; border: 1px solid #475569; background: var(--studio-bg-root, #080c14); color: var(--studio-text-primary, #f1f5f9); font-size: 13px; }
.byoc-input-mono[aria-invalid=true],
.byoc-select[aria-invalid=true],
.byoc-textarea-mono[aria-invalid=true] { border-color: #fb7185; background: #1f0d14; }
.byoc-input-mono,
.byoc-textarea-mono,
.byoc-mono-value { font-family: var(--studio-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); }
.byoc-input-mono::placeholder,
.byoc-textarea-mono::placeholder { color: #94a3b8; }
.byoc-auth-tablist,
.byoc-script-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.byoc-auth-tab,
.byoc-script-tab,
.byoc-copy-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 12px; border-radius: 8px; border: 1px solid #475569; background: var(--studio-bg-elevated, #162032); color: #e2e8f0; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color 140ms ease, background 140ms ease, color 140ms ease; }
.byoc-auth-tab:hover:not(:disabled),
.byoc-script-tab:hover:not(:disabled),
.byoc-copy-btn:hover:not(:disabled) { border-color: var(--studio-border-focus-ring, #38bdf8); background: var(--studio-bg-card, #1b273d); color: #ffffff; }
.byoc-copy-btn.is-danger { border-color: #fb7185; background: #331018; color: #fecdd3; }
.byoc-copy-btn.is-danger:hover:not(:disabled) { border-color: #fda4af; background: #4c1120; color: #ffffff; }
.byoc-copy-btn.is-copied { border-color: #10b981; background: #052e2b; color: #6ee7b7; }
.byoc-auth-tab.active,
.byoc-script-tab.active,
.byoc-script-tab[aria-selected=true] { background: #082f49; border-color: #38bdf8; color: #f1f5f9; box-shadow: inset 0 0 0 1px #38bdf8; }
.byoc-azure-wizard-panel .byoc-script-tab[aria-selected=true] { background: #0b2942; border-color: #3b82f6; color: #bfdbfe; box-shadow: inset 0 0 0 1px #3b82f6; }
.byoc-aws-wizard-panel .byoc-script-tab[aria-selected=true],
.byoc-aws-wizard-panel .byoc-script-tab.active { background: #2b1d07; border-color: #f59e0b; color: #fde68a; box-shadow: inset 0 0 0 1px #f59e0b; }
.byoc-script-box[hidden] { display: none; }
.byoc-identity-card,
.byoc-ext-db-box { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-elevated, #162032); display: flex; flex-direction: column; gap: 8px; }
.byoc-identity-val-row,
.byoc-script-toolbar,
.byoc-preflight-header,
.byoc-preflight-row-main,
.byoc-remediation-header,
.byoc-actions-bar,
.byoc-ext-db-input-row,
.byoc-ext-db-status-row,
.deploy-stepper-header,
.deploy-step-main,
.deploy-active-url-row,
.deploy-active-cta-row,
.deploy-org-policy-actions,
.deploy-fail-header,
.deploy-org-policy-title,
.deploy-history-row,
.deploy-history-row-info,
.deploy-history-row-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.byoc-ext-db-input-row .byoc-input-mono { flex: 1 1 260px; }
.byoc-mono-value { font-size: 12px; color: #e2e8f0; word-break: break-all; }
.byoc-code-well { margin: 0; padding: 12px; border-radius: 8px; border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-root, #080c14); color: #e2e8f0; font-family: var(--studio-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 12px; line-height: 1.5; overflow-x: auto; max-width: 100%; white-space: pre; }
.byoc-preflight-section { display: flex; flex-direction: column; gap: 8px; }
.byoc-preflight-header { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #cbd5e1; }
.byoc-preflight-checklist,
.deploy-steps-list,
.deploy-history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.byoc-preflight-row,
.deploy-step-row,
.deploy-active-summary,
.deploy-progress-stepper,
.deploy-history-row { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-elevated, #162032); }
.byoc-preflight-row { display: flex; flex-direction: column; gap: 8px; }
.byoc-preflight-row[data-check-status=PASS],
.deploy-step-row.is-done { border-color: var(--studio-status-ok-border, #10b981); }
.byoc-preflight-row[data-check-status=CHECKING],
.deploy-step-row.is-active { border-color: var(--studio-status-info-border, #38bdf8); }
.byoc-preflight-row[data-check-status=FAIL],
.deploy-step-row.is-failed { border-color: var(--studio-status-err-border, #fb7185); }
.byoc-preflight-row-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 220px; }
.byoc-preflight-row-title { font-size: 13px; font-weight: 600; color: var(--studio-text-primary, #f1f5f9); }
.byoc-preflight-row-detail { font-size: 12px; line-height: 1.45; color: #cbd5e1; }
.byoc-remediation-box { padding: 10px 12px; border-radius: 8px; border: 1px solid #fb7185; background: #240c13; display: flex; flex-direction: column; gap: 8px; }
.byoc-remediation-header span { font-size: 12px; font-weight: 700; color: #fecdd3; }
.byoc-check-badge,
.deploy-step-badge,
.byoc-vault-chip,
.deploy-meta-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: var(--studio-radius-full, 999px); font-size: 11px; font-weight: 700; border: 1px solid #475569; background: #1e293b; color: #e2e8f0; white-space: nowrap; }
.byoc-check-badge.is-pass,
.byoc-vault-chip.is-saved,
.deploy-step-row.is-done .deploy-step-badge { background: var(--studio-status-ok-bg, #052e2b); border-color: var(--studio-status-ok-border, #10b981); color: var(--studio-status-ok-fg, #6ee7b7); }
.byoc-check-badge.is-bootstrapped,
.byoc-check-badge.is-checking,
.byoc-vault-chip.is-configured,
.deploy-step-row.is-active .deploy-step-badge { background: var(--studio-status-info-bg, #082f49); border-color: var(--studio-status-info-border, #38bdf8); color: var(--studio-status-info-fg, #bae6fd); }
.byoc-check-badge.is-fail,
.deploy-step-row.is-failed .deploy-step-badge { background: var(--studio-status-err-bg, #331018); border-color: var(--studio-status-err-border, #fb7185); color: var(--studio-status-err-fg, #fecdd3); }
.byoc-check-badge.is-unverified { background: #1e293b; border-color: #475569; color: #cbd5e1; }
.deploy-step-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
#btn-deploy-confirm,
#deploy-open-standalone-link,
#btn-byoc-test-bootstrap,
#btn-aws-test-bootstrap,
#btn-aws-save-target,
#btn-confirm-deploy-teardown,
#btn-cancel-deploy-teardown { min-height: 44px; }
#btn-deploy-confirm.btn-emerald,
.studio-deploy-dialog .btn-primary-emerald { background: #10b981; color: #080c14; font-weight: 700; border-color: #10b981; }
#btn-deploy-upgrade-tier,
#btn-enable-private-oidc { min-height: 44px; background: #f59e0b; color: #080c14; font-weight: 700; border: 1px solid #f59e0b; }
.exec-standalone-chip-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.exec-standalone-launch-link { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 10px; border-radius: 8px; border: 1px solid #475569; background: var(--studio-bg-surface, #0f1624); color: #bae6fd; font-size: 12px; font-weight: 600; text-decoration: none; }
@media (max-width: 768px) {
  .studio-deploy-dialog,
  .deploy-teardown-dialog { width: calc(100vw - 16px); max-width: calc(100vw - 16px); margin: 8px auto; }
  .deploy-access-grid,
  .deploy-db-grid,
  .byoc-form-grid,
  .byoc-identity-grid { grid-template-columns: 1fr; }
  .studio-deploy-dialog .modal-footer,
  .studio-deploy-dialog .studio-modal-footer,
  .deploy-teardown-dialog .modal-footer,
  .deploy-teardown-dialog .studio-modal-footer { flex-direction: column-reverse; align-items: stretch; }
  .studio-deploy-dialog .modal-footer button,
  .studio-deploy-dialog .studio-modal-footer button,
  .deploy-teardown-dialog .modal-footer button,
  .deploy-teardown-dialog .studio-modal-footer button { width: 100%; min-height: 44px; }
}
@media (max-width: 640px) {
  .deploy-target-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .byoc-wizard-panel,
  .byoc-azure-wizard-panel,
  .byoc-aws-wizard-panel { padding: 12px; }
  .byoc-script-toolbar,
  .byoc-actions-bar,
  .byoc-ext-db-input-row,
  .deploy-active-cta-row,
  .deploy-org-policy-actions { flex-direction: column; align-items: stretch; }
  .byoc-script-tabs { width: 100%; }
  .byoc-script-tab { flex: 1 1 auto; }
  .byoc-actions-bar button,
  .byoc-ext-db-input-row button,
  .deploy-active-cta-row a,
  .deploy-active-cta-row button,
  .deploy-org-policy-actions button { width: 100%; justify-content: center; }
}
@media (pointer: coarse) {
  .deploy-target-card,
  .deploy-access-card,
  .byoc-auth-tab,
  .byoc-script-tab,
  .byoc-copy-btn,
  .byoc-remediation-card button,
  .byoc-remediation-card a,
  .byoc-azure-remediation-card button,
  .byoc-azure-remediation-card a,
  .byoc-aws-remediation-card button,
  .byoc-aws-remediation-card a,
  .exec-standalone-launch-link { min-height: 44px; min-width: 44px; }
}
/* frontend/css/studio/build-estimator.css */
#kickoff-build-estimate-card.hidden,
#kickoff-build-estimate-card[hidden],
#spec-lab-estimate-pill.hidden,
#spec-lab-estimate-pill[hidden],
#studio-live-eta-pill.hidden,
#studio-live-eta-pill[hidden],
#exec-admin-calibration-section.hidden,
#exec-admin-calibration-section[hidden] { display: none !important; }
#kickoff-build-estimate-card { margin-top: 12px; width: 100%; }
.build-estimate-card { background: var(--studio-bg-surface, #0f1624); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-md, 10px); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; color: var(--studio-text-primary, #f1f5f9); }
.build-estimate-standby { background: rgba(15, 22, 36, 0.85); border-style: dashed; border-color: #334155; padding: 12px 14px; }
.build-estimate-standby-row { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 1.45; color: #cbd5e1; }
.build-estimate-standby-dot { width: 8px; height: 8px; border-radius: 9999px; flex-shrink: 0; background: #38bdf8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.65); }
.build-estimate-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.build-estimate-tier-badge,
.build-estimate-structural-pill,
.build-estimate-confidence-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 9999px; font-size: 11.5px; font-weight: 700; line-height: 1.35; letter-spacing: 0.01em; }
.build-estimate-tier-badge.tier-simple,
.spec-lab-est-tier.tier-simple { background: #052e2b; border: 1px solid #10b981; color: #6ee7b7; }
.build-estimate-tier-badge.tier-standard,
.spec-lab-est-tier.tier-standard { background: #082f49; border: 1px solid #38bdf8; color: #7dd3fc; }
.build-estimate-tier-badge.tier-complex,
.spec-lab-est-tier.tier-complex { background: #2e1065; border: 1px solid #a78bfa; color: #ddd6fe; }
.build-estimate-structural-pill { background: #162032; border: 1px solid #334155; color: #e2e8f0; font-family: var(--studio-font-mono); font-weight: 600; }
.build-estimate-confidence-chip { margin-left: auto; border: 1px solid #475569; background: #1e293b; color: #e2e8f0; }
.build-estimate-confidence-chip.confidence-prior { background: #1e293b; border-color: #64748b; color: #e2e8f0; }
.build-estimate-confidence-chip.confidence-blended { background: #082f49; border-color: #38bdf8; color: #bae6fd; }
.build-estimate-confidence-chip.confidence-empirical { background: #052e2b; border-color: #10b981; color: #a7f3d0; }
.build-estimate-metrics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.build-estimate-metric { background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-sm, 6px); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.build-estimate-metric-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #94a3b8; }
.build-estimate-metric-value { font-size: 15px; font-weight: 700; line-height: 1.35; color: #f8fafc; font-variant-numeric: tabular-nums; }
.build-estimate-metric-typical { font-size: 12px; font-weight: 500; color: #cbd5e1; }
.build-estimate-finops-usd { display: inline-block; font-size: 12px; font-weight: 600; font-family: var(--studio-font-mono); color: #7dd3fc; }
.build-estimate-hitl-note { font-size: 11.5px; line-height: 1.35; color: #94a3b8; }
.build-estimate-warning-banner { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--studio-radius-sm, 6px); background: #2b1d07; border: 1px solid #f59e0b; color: #fde68a; font-size: 12.5px; line-height: 1.45; }
.build-estimate-warning-banner strong { color: #fef3c7; }
.build-estimate-warning-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 9999px; flex-shrink: 0; background: #f59e0b; color: #080c14; font-size: 12px; font-weight: 800; margin-top: 1px; }
.build-estimate-disclaimer { margin: 0; font-size: 11.5px; line-height: 1.45; color: #94a3b8; }
.build-estimate-cap-note { margin: 0; padding: 7px 10px; border-radius: var(--studio-radius-sm, 6px); background: #162032; border: 1px solid #334155; color: #cbd5e1; font-size: 12px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.build-estimate-cap-note strong { color: #f8fafc; }
.build-estimate-cap-note.is-warning,
.build-estimate-cap-note.is-low-balance { background: var(--studio-status-warn-bg, #2b1d07); border-color: var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); }
#spec-lab-estimate-pill { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 4px 10px; border-radius: 9999px; background: #0f172a; border: 1px solid #334155; color: #f1f5f9; font-size: 12px; line-height: 1.35; }
.spec-lab-est-tier { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 9999px; font-size: 11px; font-weight: 700; }
.spec-lab-est-scope { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 9999px; background: #162032; border: 1px solid #334155; color: #e2e8f0; font-family: var(--studio-font-mono); font-size: 11px; font-weight: 600; line-height: 1.35; font-variant-numeric: tabular-nums; }
.spec-lab-est-sep { color: #94a3b8; user-select: none; }
.spec-lab-est-time,
.spec-lab-est-credits { font-weight: 600; color: #e2e8f0; font-variant-numeric: tabular-nums; }
.spec-lab-est-confidence { font-size: 11px; font-weight: 600; color: #94a3b8; padding-left: 2px; }
.spec-lab-est-cap-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 9999px; background: var(--studio-status-warn-bg, #2b1d07); border: 1px solid var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); font-size: 11px; font-weight: 700; line-height: 1.35; font-variant-numeric: tabular-nums; }
.spec-lab-est-cap-chip.is-neutral,
.spec-lab-est-cap-chip.is-cap { background: #162032; border-color: #475569; color: #e2e8f0; }
#studio-live-eta-pill { display: inline-flex; align-items: center; flex-wrap: nowrap; white-space: nowrap; flex-shrink: 0; gap: 6px; padding: 4px 10px; max-width: 100%; border-radius: 9999px; background: #0f172a; border: 1px solid rgba(56, 189, 248, 0.5); color: #f1f5f9; font-size: 11px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.live-eta-stage { font-weight: 700; color: #7dd3fc; white-space: nowrap; }
.live-eta-sep { color: #94a3b8; user-select: none; flex-shrink: 0; }
.live-eta-time { font-weight: 600; color: #f8fafc; white-space: nowrap; }
.live-eta-credits { font-family: var(--studio-font-mono); font-size: 11px; font-weight: 600; color: #6ee7b7; white-space: nowrap; }
#exec-admin-calibration-section { margin-top: 16px; width: 100%; }
.admin-calibration-card { background: #0f172a; border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-md, 10px); padding: 16px; display: flex; flex-direction: column; gap: 14px; color: #f1f5f9; }
.admin-calibration-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.admin-calibration-header h4 { margin: 0; font-size: 15px; font-weight: 700; color: #f8fafc; }
.admin-calibration-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 9999px; background: #2e1065; border: 1px solid #a78bfa; color: #ddd6fe; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.admin-calibration-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.calibration-kpi { background: #111827; border: 1px solid #263654; border-radius: var(--studio-radius-sm, 6px); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.calibration-kpi-label { font-size: 11px; font-weight: 600; color: #94a3b8; line-height: 1.3; }
.calibration-kpi-value { font-size: 16px; font-weight: 700; color: #f8fafc; font-variant-numeric: tabular-nums; }
.admin-calibration-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #263654; border-radius: var(--studio-radius-sm, 6px); background: #111827; }
.admin-calibration-table { width: 100%; border-collapse: collapse; font-size: 12.5px; text-align: left; color: #e2e8f0; }
.admin-calibration-table th { padding: 9px 12px; background: #162032; border-bottom: 1px solid #263654; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #cbd5e1; white-space: nowrap; }
.admin-calibration-table td { padding: 9px 12px; border-bottom: 1px solid rgba(38, 54, 84, 0.7); color: #f1f5f9; white-space: nowrap; font-variant-numeric: tabular-nums; }
.admin-calibration-table tbody tr:last-child td { border-bottom: none; }
.calibration-hash { font-family: var(--studio-font-mono); font-size: 11.5px; padding: 2px 6px; border-radius: 4px; background: #1e293b; border: 1px solid #334155; color: #7dd3fc; }
.calibration-empty { text-align: center; padding: 16px 12px; color: #cbd5e1; font-style: italic; white-space: normal; }
@media (max-width: 900px) {
  .admin-calibration-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .build-estimate-metrics-grid { grid-template-columns: 1fr; }
  .build-estimate-confidence-chip { margin-left: 0; }
  .admin-calibration-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-calibration-card,
  .build-estimate-card { padding: 12px; }
}
@media (max-width: 480px) {
  #studio-live-eta-pill { border-radius: 12px; flex-wrap: wrap; white-space: normal; padding: 5px 10px; row-gap: 2px; }
}
@media (max-width: 380px) {
  .admin-calibration-kpis { grid-template-columns: 1fr; }
}
/* frontend/css/studio/cost-tracker.css */
.studio-cost-tracker-wrap { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; }
.studio-cost-tracker-pill { anchor-name: --studio-cost-tracker-anchor; display: inline-flex; align-items: center; gap: 7px; min-height: 28px; min-width: 24px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-elevated, #162032); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-mono); font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.studio-cost-tracker-pill:hover,
.studio-cost-tracker-pill:focus-visible { border-color: var(--studio-border-highlight, #3b82f6); box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)); outline: none; }
.studio-cost-pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--studio-accent-emerald, #10b981); flex-shrink: 0; }
.studio-cost-tracker-popover { min-width: 270px; max-width: min(320px, calc(100vw - 24px)); max-height: min(360px, 70dvh); overflow-y: auto; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-surface, #0f1624); color: var(--studio-text-primary, #f1f5f9); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65); font-size: 12px; box-sizing: border-box; }
@supports not selector(:popover-open) {
  .studio-cost-tracker-popover[popover]:not(.\:popover-open):not(.is-open) { display: none; }
}
.studio-cost-tracker-popover[popover]:is(:popover-open, .\:popover-open, .is-open) { display: block; }
@supports (position-area: block-end) {
  .studio-cost-tracker-popover { position-anchor: --studio-cost-tracker-anchor; inset: auto; margin-block-start: 8px; margin-block-end: 0; margin-inline: 0; position-area: block-end span-inline-start; position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline; }
}
@supports not (position-area: block-end) {
  .studio-cost-tracker-popover { position: fixed; inset: 60px 16px auto auto; margin: 0; z-index: 120; }
}
.studio-cost-pop-title { font-weight: 700; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--studio-accent-blue-light, #60a5fa); margin-bottom: 8px; }
.studio-cost-pop-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; color: var(--studio-text-primary, #f1f5f9); }
.studio-cost-pop-row.is-sub { padding-left: 8px; color: var(--studio-text-secondary, #94a3b8); }
.spec-lab-cost-summary-bar { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-elevated, #162032); color: var(--studio-text-primary, #f1f5f9); font-size: 12px; }
.spec-cost-bar-muted { color: var(--studio-text-secondary, #94a3b8); }
.kickoff-incurred-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--studio-border-muted, rgba(38, 54, 84, 0.6)); font-size: 12px; color: var(--studio-text-secondary, #94a3b8); }
.kickoff-incurred-row strong { color: var(--studio-text-primary, #f1f5f9); }
.exec-estimate-variance-line { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--studio-border-muted, rgba(38, 54, 84, 0.6)); font-size: 12px; color: var(--studio-text-secondary, #94a3b8); }
.exec-estimate-variance-line strong { color: var(--studio-text-primary, #f1f5f9); }
/* frontend/css/studio/components.css */
#btn-toggle-auto-retry { min-width: 24px; min-height: 28px; }
#btn-toggle-auto-retry.active { background: rgba(16, 185, 129, 0.20); border-color: #10b981; color: #ecfdf5; box-shadow: 0 0 8px rgba(16, 185, 129, 0.28); }
#btn-toggle-auto-retry.active:hover { background: rgba(16, 185, 129, 0.28); border-color: #34d399; color: #ffffff; }
#btn-toggle-auto-retry:focus-visible,
.btn-auto-retry-pause-inspect:focus-visible { outline: 2px solid #34d399; outline-offset: 2px; }
.studio-auto-retry-status-pill { position: relative; z-index: 28; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 10px 14px 4px; padding: 8px 14px; border-radius: var(--studio-radius-md, 10px); background: rgba(15, 23, 42, 0.96); border: 1px solid rgba(245, 158, 11, 0.55); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); color: #f8fafc; font-size: 12.5px; }
.studio-auto-retry-status-pill.hidden { display: none !important; }
.auto-retry-pill-indicator { display: inline-flex; align-items: center; justify-content: center; color: #fbbf24; flex-shrink: 0; }
@keyframes autoRetrySpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.auto-retry-spin { animation: autoRetrySpin 2.2s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .auto-retry-spin { animation: none; }
}
.auto-retry-status-text { flex: 1 1 200px; min-width: 0; color: #f8fafc; font-weight: 500; line-height: 1.4; }
.btn-auto-retry-pause-inspect { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 24px; min-height: 28px; padding: 5px 12px; border-radius: var(--studio-radius-sm, 6px); background: #1e293b; border: 1px solid #f59e0b; color: #fef3c7; font-size: 11.5px; font-weight: 600; cursor: pointer; flex-shrink: 0; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.btn-auto-retry-pause-inspect:hover:not(:disabled) { background: #334155; border-color: #fbbf24; color: #ffffff; }
.btn-auto-retry-pause-inspect:disabled { opacity: 0.6; cursor: not-allowed; }
/* frontend/css/studio/processing-guard.css */
.pg-banner[hidden],
#spec-lab-processing-banner[hidden],
#stitch-studio-processing-banner[hidden] { display: none !important; }
#spec-lab-processing-banner { grid-column: 1 / -1; position: sticky; top: 0; z-index: 16; }
#stitch-studio-processing-banner { position: relative; z-index: 158; flex-shrink: 0; }
.pg-banner { width: 100%; max-width: 100%; box-sizing: border-box; background: var(--pg-surface-gradient); border-bottom: 1px solid var(--pg-border-active); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.42); overflow-x: hidden; font-family: var(--pg-font-sans); }
.pg-banner[data-pg-state=atomic] { background: var(--pg-surface-atomic-gradient); border-bottom-color: var(--pg-border-atomic); }
.pg-banner[data-pg-state=cancelling] { opacity: 0.85; }
.pg-banner[data-pg-state=error] { background: var(--pg-surface-error-gradient); border-bottom-color: var(--pg-border-error); }
.pg-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 18px; min-height: 46px; max-width: 100%; box-sizing: border-box; }
.pg-banner-left { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.pg-banner-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--pg-accent-active); }
.pg-banner[data-pg-state=stepped] .pg-banner-icon { color: var(--pg-accent-stepped); }
.pg-banner[data-pg-state=atomic] .pg-banner-icon { color: var(--pg-accent-atomic); }
.pg-banner[data-pg-state=error] .pg-banner-icon { color: #f87171; }
.pg-spinner-svg { animation: pg-spin 0.9s linear infinite; }
.pg-banner[data-pg-state=error] .pg-spinner-svg { animation: none; }
.pg-banner-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.pg-banner-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pg-banner-label { font-family: var(--pg-font-sans); font-size: 12.5px; font-weight: 700; color: var(--pg-text-primary); overflow-wrap: anywhere; }
.pg-banner-step-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 9999px; background: #0b2420; border: 1px solid rgba(52, 211, 153, 0.45); color: #6ee7b7; font-family: var(--pg-font-mono); font-size: 11px; font-weight: 700; white-space: nowrap; }
.pg-banner[data-pg-state=atomic] .pg-banner-step-badge { background: #2a2010; border-color: var(--pg-border-atomic); color: #fde68a; }
.pg-banner-detail { font-size: 11.5px; color: var(--pg-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-banner-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.pg-wait-cue { font-size: 11.5px; color: var(--pg-text-secondary); white-space: nowrap; }
.pg-elapsed-badge { font-family: var(--pg-font-mono); font-variant-numeric: tabular-nums; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 9999px; background: var(--pg-surface-bg-deep); border: 1px solid var(--pg-border-active); color: var(--pg-text-primary); min-width: 38px; text-align: center; white-space: nowrap; }
.pg-cancel-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; min-width: 84px; padding: 0 12px; border-radius: 6px; background: var(--pg-cancel-bg); border: 1px solid var(--pg-cancel-border); color: var(--pg-cancel-text); font-family: var(--pg-font-sans); font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; flex-shrink: 0; touch-action: manipulation; transition: background-color 0.15s ease, border-color 0.15s ease; }
.pg-cancel-btn:hover:not(:disabled) { background: rgba(244, 63, 94, 0.28); border-color: #f87171; }
.pg-cancel-btn:disabled { opacity: 0.65; cursor: not-allowed; background: rgba(245, 158, 11, 0.14); border-color: var(--pg-border-atomic); color: #fde68a; }
.pg-cancel-btn:focus-visible,
.pg-confirm-btn-stay:focus-visible,
.pg-confirm-btn-leave:focus-visible { outline: 2px solid var(--pg-focus-ring) !important; outline-offset: 2px !important; }
.pg-progress-track { position: relative; width: 100%; height: 3px; background: var(--pg-surface-bg-deep); overflow: hidden; }
.pg-progress-fill { position: relative; height: 100%; width: 0%; background: var(--pg-accent-stepped); transition: width 250ms ease; }
.pg-banner[data-pg-state=atomic] .pg-progress-fill { width: 100%; background: var(--pg-accent-atomic); }
.pg-banner[data-pg-state=error] .pg-progress-fill { width: 100%; background: #f87171; }
.pg-progress-track[data-indeterminate=true] .pg-progress-fill { width: 100%; background: rgba(96, 165, 250, 0.22); }
.pg-progress-track[data-indeterminate=true] .pg-progress-fill::after { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient( 90deg, transparent, var(--pg-accent-active), transparent); animation: pg-shimmer 1.35s ease-in-out infinite; }
.is-processing-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; cursor: wait !important; }
.is-processing-trigger.is-atomic { border-color: var(--pg-border-atomic) !important; }
.pg-btn-spinner { display: inline-flex; align-items: center; justify-content: center; line-height: 1; animation: pg-spin 0.9s linear infinite; }
.is-processing-surface { position: relative; box-shadow: inset 0 0 0 1px var(--pg-border-active) !important; }
.is-processing-surface::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient( 90deg, transparent, var(--pg-accent-active), transparent); animation: pg-surface-shimmer 1.6s ease-in-out infinite; pointer-events: none; z-index: 5; }
.pg-surface-error-flash { box-shadow: inset 0 0 0 1.5px var(--pg-border-error) !important; transition: box-shadow 0.3s ease; }
[data-processing-locked=true] { opacity: var(--pg-lock-opacity, 0.48) !important; cursor: not-allowed !important; filter: grayscale(0.25); transform: none !important; }
#pg-nav-confirm-dialog.pg-confirm-dialog[hidden] { display: none !important; }
#pg-nav-confirm-dialog.pg-confirm-dialog { margin: auto; padding: 0; border: none; background: transparent; color: var(--pg-text-primary); z-index: 100000; max-width: calc(100vw - 24px); }
#pg-nav-confirm-dialog.pg-confirm-dialog::backdrop { background: rgba(8, 12, 20, 0.84); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pg-confirm-card { width: 460px; max-width: 100%; box-sizing: border-box; background: var(--pg-surface-bg); border: 1px solid var(--pg-border-atomic); border-radius: 14px; padding: 20px 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72); display: flex; flex-direction: column; gap: 14px; font-family: var(--pg-font-sans); }
#pg-nav-confirm-dialog[data-atomic=true] .pg-confirm-card { border-color: var(--pg-border-error); }
.pg-confirm-header { display: flex; align-items: flex-start; gap: 12px; }
.pg-confirm-icon-wrap { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: rgba(245, 158, 11, 0.16); border: 1px solid var(--pg-border-atomic); color: var(--pg-accent-atomic); }
#pg-nav-confirm-dialog[data-atomic=true] .pg-confirm-icon-wrap { background: rgba(244, 63, 94, 0.18); border-color: var(--pg-border-error); color: #f87171; }
.pg-confirm-title { font-size: 15px; font-weight: 700; color: var(--pg-text-primary); margin: 0 0 3px 0; }
.pg-confirm-op-tag { font-family: var(--pg-font-mono); font-size: 11.5px; color: #fde68a; margin: 0; }
.pg-confirm-desc { font-size: 13px; line-height: 1.5; color: var(--pg-text-secondary); margin: 0; }
.pg-confirm-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.pg-confirm-btn-stay,
.pg-confirm-btn-leave { min-height: 38px; padding: 0 16px; border-radius: 8px; font-family: var(--pg-font-sans); font-size: 13px; font-weight: 700; cursor: pointer; border: 1px solid transparent; color: #ffffff; touch-action: manipulation; }
.pg-confirm-btn-stay { background: #2563eb; }
.pg-confirm-btn-stay:hover { background: #1d4ed8; }
.pg-confirm-btn-leave { background: #dc2626; }
.pg-confirm-btn-leave:hover { background: #b91c1c; }
@keyframes pg-spin {
  to { transform: rotate(360deg); }
}
@keyframes pg-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}
@keyframes pg-surface-shimmer {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
@media (max-width: 768px), (pointer: coarse) {
  .pg-banner-inner { flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .pg-banner-left { flex: 1 1 100%; min-width: 0; }
  .pg-banner-detail { white-space: normal; overflow-wrap: anywhere; }
  .pg-banner-right { flex: 1 1 100%; justify-content: space-between; flex-wrap: wrap; gap: 8px; min-width: 0; }
  .pg-wait-cue { white-space: normal; flex: 1 1 180px; font-size: 11px; line-height: 1.35; }
  .pg-cancel-btn { min-height: 44px; min-width: 44px; padding: 0 14px; }
  .pg-confirm-card { width: calc(100vw - 24px); max-width: 100%; }
  .pg-confirm-actions { flex-direction: column-reverse; align-items: stretch; }
  .pg-confirm-btn-stay,
  .pg-confirm-btn-leave { min-height: 44px; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-spinner-svg,
  .pg-progress-track[data-indeterminate=true] .pg-progress-fill::after,
  .is-processing-surface::before,
  .pg-btn-spinner { animation: none !important; }
  .pg-progress-track[data-indeterminate=true] .pg-progress-fill { width: 100% !important; opacity: 0.72; }
  .is-processing-surface { transition: none !important; }
}
/* frontend/css/studio/credit-cap.css */
.studio-error-recovery-banner.is-credit-cap { border-color: rgba(245, 158, 11, 0.55); background: linear-gradient( 90deg, rgba(245, 158, 11, 0.14) 0%, rgba(15, 23, 42, 0.98) 60%); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), 0 0 18px rgba(245, 158, 11, 0.14); }
.studio-error-recovery-banner.is-credit-cap .error-banner-icon-wrap { background: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.45); color: #fbbf24; }
.studio-error-recovery-banner.is-credit-cap .error-type-badge { background: #b45309; color: #ffffff; }
.studio-error-recovery-banner.pipeline-banner--stopped,
.credit-cap-stopped-banner { border-color: rgba(148, 163, 184, 0.45); background: linear-gradient( 90deg, rgba(100, 116, 139, 0.18) 0%, rgba(15, 23, 42, 0.98) 65%); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5); }
.studio-error-recovery-banner.pipeline-banner--stopped .error-banner-icon-wrap,
.credit-cap-stopped-banner .error-banner-icon-wrap { background: rgba(245, 158, 11, 0.14); border-color: rgba(148, 163, 184, 0.45); color: #fcd34d; }
.studio-error-recovery-banner.pipeline-banner--stopped .error-type-badge,
.credit-cap-stopped-banner .error-type-badge { background: #334155; color: #f1f5f9; border: 1px solid rgba(148, 163, 184, 0.4); }
.credit-cap-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(148, 163, 184, 0.22); max-width: 100%; box-sizing: border-box; }
.credit-cap-actions.hidden { display: none !important; }
.credit-cap-prompt { display: flex; flex-direction: column; gap: 12px; max-width: 100%; box-sizing: border-box; }
.credit-cap-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.credit-cap-title { font-size: 13px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.credit-cap-scope-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--studio-radius-full, 9999px); font-size: 11px; font-weight: 700; background: rgba(59, 130, 246, 0.22); border: 1px solid rgba(96, 165, 250, 0.45); color: #dbeafe; }
.credit-cap-metrics { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.credit-cap-metric-card { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 180px; padding: 8px 12px; border-radius: var(--studio-radius-md, 10px); background: rgba(15, 22, 36, 0.85); border: 1px solid var(--studio-border-subtle, #263654); box-sizing: border-box; }
.credit-cap-metric-label { font-size: 11px; font-weight: 600; color: #cbd5e1; text-transform: uppercase; letter-spacing: 0.04em; }
.credit-cap-metric-value { font-family: var(--studio-font-mono, monospace); font-size: 14px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); }
.credit-cap-metric-value.is-depleted { color: #fda4af; }
.credit-cap-metric-value.is-healthy { color: #6ee7b7; }
.credit-cap-options { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.credit-cap-option-wrap { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; min-width: 0; }
.credit-cap-tier-btn,
.credit-cap-use-remaining-btn,
.credit-cap-full-stop-btn,
.credit-cap-purchase-btn,
.credit-cap-delete-build-btn,
.credit-cap-pack-btn,
.credit-cap-copy-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 8px 14px; border-radius: var(--studio-radius-md, 10px); font-family: var(--studio-font-sans, sans-serif); font-size: 13px; font-weight: 600; line-height: 1.25; cursor: pointer; touch-action: manipulation; transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease; box-sizing: border-box; max-width: 100%; text-align: center; }
.credit-cap-tier-btn:focus-visible,
.credit-cap-use-remaining-btn:focus-visible,
.credit-cap-full-stop-btn:focus-visible,
.credit-cap-purchase-btn:focus-visible,
.credit-cap-delete-build-btn:focus-visible,
.credit-cap-pack-btn:focus-visible,
.credit-cap-copy-btn:focus-visible,
.credit-cap-modal-close:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; }
.credit-cap-tier-btn { flex-direction: column; gap: 2px; background: #1d4ed8; border: 1px solid #60a5fa; color: #ffffff; }
.credit-cap-tier-btn:hover:not(:disabled) { background: #2563eb; transform: translateY(-1px); }
.credit-cap-tier-delta { font-family: var(--studio-font-mono, monospace); font-size: 14px; font-weight: 700; }
.credit-cap-tier-sub { font-size: 11px; font-weight: 500; color: #e2e8f0; }
.credit-cap-tier-btn:disabled,
.credit-cap-tier-btn[aria-disabled=true] { background: rgba(30, 41, 59, 0.72); border-color: rgba(148, 163, 184, 0.3); color: #94a3b8; cursor: not-allowed; transform: none; }
.credit-cap-tier-btn:disabled .credit-cap-tier-sub { color: #94a3b8; }
.credit-cap-disabled-reason { font-size: 11px; color: #cbd5e1; line-height: 1.3; padding: 0 2px; }
.credit-cap-use-remaining-btn { background: #047857; border: 1px solid #34d399; color: #ffffff; }
.credit-cap-use-remaining-btn:hover:not(:disabled) { background: #059669; transform: translateY(-1px); }
.credit-cap-use-remaining-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.credit-cap-secondary-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.credit-cap-secondary-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.credit-cap-purchase-btn { background: rgba(139, 92, 246, 0.24); border: 1px solid rgba(167, 139, 250, 0.65); color: #f3e8ff; }
.credit-cap-purchase-btn:hover:not(:disabled) { background: rgba(139, 92, 246, 0.36); border-color: #c4b5fd; }
.credit-cap-full-stop-btn { background: rgba(190, 18, 60, 0.22); border: 1px solid rgba(251, 113, 133, 0.65); color: #ffe4e6; }
.credit-cap-full-stop-btn:hover:not(:disabled) { background: rgba(190, 18, 60, 0.38); border-color: #fda4af; }
.credit-cap-full-stop-btn.is-confirming { background: #be123c; border-color: #fda4af; color: #ffffff; }
.credit-cap-full-stop-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.credit-cap-delete-build-btn { background: rgba(30, 41, 59, 0.85); border: 1px solid rgba(251, 113, 133, 0.55); color: #fecdd3; }
.credit-cap-delete-build-btn:hover:not(:disabled) { background: rgba(190, 18, 60, 0.3); border-color: #fda4af; }
.credit-cap-status-note { font-size: 12px; color: #e2e8f0; line-height: 1.45; margin: 0; }
.credit-cap-status-note.is-warning { color: #fde68a; }
.credit-cap-status-note.is-error { color: #fecdd3; }
#studio-purchase-credits-modal { position: fixed; inset: 0; z-index: 1050; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--studio-bg-overlay, rgba(8, 12, 20, 0.88)); backdrop-filter: blur(8px); box-sizing: border-box; }
#studio-purchase-credits-modal.hidden { display: none !important; }
.credit-cap-modal-dialog { width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; background: var(--studio-bg-surface, #0f1624); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-xl, 18px); box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(148, 163, 184, 0.14); padding: 22px; display: flex; flex-direction: column; gap: 16px; box-sizing: border-box; color: var(--studio-text-primary, #f1f5f9); }
.credit-cap-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--studio-border-subtle, #263654); }
.credit-cap-modal-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); }
.credit-cap-modal-subtitle { margin: 4px 0 0; font-size: 13px; color: #cbd5e1; line-height: 1.45; }
.credit-cap-modal-close { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: var(--studio-radius-md, 10px); background: rgba(30, 41, 59, 0.8); border: 1px solid var(--studio-border-subtle, #263654); color: #f1f5f9; cursor: pointer; flex-shrink: 0; }
.credit-cap-modal-close:hover { background: rgba(51, 65, 85, 0.9); }
.credit-cap-modal-body { display: flex; flex-direction: column; gap: 14px; }
.credit-cap-pack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.credit-cap-pack-card { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 14px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); box-sizing: border-box; }
.credit-cap-pack-title { font-size: 12px; font-weight: 700; color: #cbd5e1; text-transform: uppercase; letter-spacing: 0.04em; }
.credit-cap-pack-credits { font-family: var(--studio-font-mono, monospace); font-size: 18px; font-weight: 700; color: #ffffff; }
.credit-cap-pack-desc { font-size: 12px; color: #cbd5e1; line-height: 1.4; }
.credit-cap-pack-btn { width: 100%; background: #1d4ed8; border: 1px solid #60a5fa; color: #ffffff; }
.credit-cap-pack-btn:hover:not(:disabled) { background: #2563eb; }
.credit-cap-pack-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.credit-cap-info-panel { padding: 14px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); display: flex; flex-direction: column; gap: 10px; }
.credit-cap-info-panel p { margin: 0; font-size: 13px; color: #e2e8f0; line-height: 1.5; }
.credit-cap-org-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--studio-radius-sm, 6px); background: rgba(8, 12, 20, 0.7); border: 1px solid var(--studio-border-subtle, #263654); }
.credit-cap-org-code { font-family: var(--studio-font-mono, monospace); font-size: 12px; color: #f1f5f9; word-break: break-all; }
.credit-cap-copy-btn { background: rgba(30, 41, 59, 0.9); border: 1px solid rgba(148, 163, 184, 0.4); color: #f1f5f9; }
.credit-cap-copy-btn:hover { background: rgba(51, 65, 85, 0.95); }
.credit-cap-modal-status { font-size: 13px; line-height: 1.45; padding: 10px 12px; border-radius: var(--studio-radius-md, 10px); background: rgba(16, 185, 129, 0.14); border: 1px solid rgba(52, 211, 153, 0.45); color: #d1fae5; }
.credit-cap-modal-status.hidden { display: none !important; }
.credit-cap-modal-status.is-error { background: rgba(190, 18, 60, 0.18); border-color: rgba(251, 113, 133, 0.5); color: #ffe4e6; }
.admin-custom-grant-panel { border-color: rgba(96, 165, 250, 0.4); background: rgba(15, 23, 42, 0.92); }
.admin-custom-grant-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-custom-grant-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.admin-custom-grant-field--full { grid-column: 1 / -1; }
.admin-custom-grant-label { font-size: 12px; font-weight: 600; color: #cbd5e1; }
.admin-custom-grant-select,
.admin-custom-grant-input { min-height: 44px; width: 100%; padding: 8px 12px; border-radius: var(--studio-radius-md, 10px); border: 1px solid var(--studio-border-subtle, #263654); background: rgba(8, 12, 20, 0.85); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, sans-serif); font-size: 13px; box-sizing: border-box; }
.admin-custom-grant-select:focus-visible,
.admin-custom-grant-input:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; }
.admin-custom-grant-submit-btn { background: #047857; border-color: #34d399; }
.admin-custom-grant-submit-btn:hover:not(:disabled) { background: #059669; }
@media (max-width: 640px) {
  .credit-cap-pack-grid,
  .admin-custom-grant-grid { grid-template-columns: 1fr; }
  .credit-cap-option-wrap { flex: 1 1 100%; }
  .credit-cap-secondary-actions,
  .credit-cap-secondary-group { flex-direction: column; align-items: stretch; width: 100%; }
  .credit-cap-tier-btn,
  .credit-cap-use-remaining-btn,
  .credit-cap-full-stop-btn,
  .credit-cap-purchase-btn,
  .credit-cap-delete-build-btn,
  .credit-cap-copy-btn { width: 100%; }
  .credit-cap-modal-dialog { padding: 16px; }
}
/* frontend/css/studio/billing-checkout.css */
#btn-studio-credit-balance,
.studio-credit-balance-btn,
.studio-credit-balance-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; min-width: 44px; padding: 3px 10px; border-radius: var(--studio-radius-full, 9999px); background: var(--studio-bg-card, #1b273d); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-mono, monospace); font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; flex-shrink: 0; cursor: pointer; touch-action: manipulation; box-sizing: border-box; transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; }
#btn-studio-credit-balance:hover,
.studio-credit-balance-btn:hover,
.studio-credit-balance-pill:hover { background: var(--studio-bg-card-hover, #22314d); border-color: var(--studio-border-highlight, #3b82f6); box-shadow: 0 0 12px rgba(59, 130, 246, 0.3); }
#btn-studio-credit-balance:focus-visible,
.studio-credit-balance-btn:focus-visible,
.studio-credit-balance-pill:focus-visible,
.billing-setup-banner button:focus-visible,
.billing-setup-banner a:focus-visible,
#studio-purchase-credits-modal .credit-pack-card:focus-visible,
#studio-purchase-credits-modal button:focus-visible,
#gcp-topup-confirm-checkbox:focus-visible,
.onboarding-plan-card:focus-visible,
.onboarding-gcp-link-panel input:focus-visible,
.onboarding-gcp-link-panel button:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; }
.studio-credit-balance-pill .billing-channel-dot,
.studio-credit-balance-btn .billing-channel-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--studio-accent-emerald-light, #34d399); }
.studio-credit-balance-btn[data-billing-channel=gcp] .billing-channel-dot,
.studio-credit-balance-pill[data-billing-channel=gcp] .billing-channel-dot { background: var(--studio-accent-blue-light, #60a5fa); }
.studio-credit-balance-btn[data-billing-channel=manual] .billing-channel-dot,
.studio-credit-balance-pill[data-billing-channel=manual] .billing-channel-dot { background: var(--studio-accent-amber, #f59e0b); }
#studio-billing-setup-banner,
.billing-setup-banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; width: 100%; max-width: 100%; padding: 10px 18px; box-sizing: border-box; background: var(--pg-surface-gradient, linear-gradient(90deg, rgba(59, 130, 246, 0.16) 0%, rgba(22, 32, 50, 0.98) 55%)); border-bottom: 1px solid var(--pg-border-active, rgba(96, 165, 250, 0.55)); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, sans-serif); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; backdrop-filter: blur(12px); z-index: 45; }
#studio-billing-setup-banner.hidden,
#studio-billing-setup-banner[hidden],
.billing-setup-banner.hidden,
.billing-setup-banner[hidden],
.billing-poll-banner.hidden,
.billing-poll-banner[hidden],
.onboarding-gcp-link-panel.hidden,
.onboarding-gcp-link-panel[hidden] { display: none !important; }
.billing-banner-content { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; flex: 1 1 240px; min-width: 0; }
.billing-banner-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--studio-radius-full, 9999px); background: rgba(29, 78, 216, 0.35); border: 1px solid rgba(96, 165, 250, 0.6); color: #dbeafe; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.billing-banner-content.is-success .billing-banner-text { color: #d1fae5; }
.billing-banner-content.is-warning .billing-banner-text { color: #fde68a; }
.billing-banner-content.is-error .billing-banner-text { color: #ffe4e6; }
.billing-setup-actions,
.billing-banner-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-inline-start: auto; min-width: 0; }
.billing-setup-actions button,
.billing-setup-actions a,
.billing-banner-actions button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; min-width: 44px; padding: 6px 14px; border-radius: var(--studio-radius-md, 10px); font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: none; touch-action: manipulation; box-sizing: border-box; }
.billing-banner-primary-btn { background: #1d4ed8; border: 1px solid #60a5fa; color: #ffffff; }
.billing-banner-primary-btn:hover { background: #2563eb; }
.billing-banner-dismiss-btn { background: rgba(30, 41, 59, 0.85); border: 1px solid rgba(148, 163, 184, 0.45); color: #f1f5f9; }
.billing-banner-dismiss-btn:hover { background: rgba(51, 65, 85, 0.95); }
.billing-channel-badge,
.billing-status-pill--pending { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--studio-radius-full, 9999px); font-size: 11px; font-weight: 700; letter-spacing: 0.03em; white-space: nowrap; }
.billing-channel-badge { text-transform: uppercase; }
.billing-channel-badge--stripe { background: rgba(79, 70, 229, 0.28); border: 1px solid rgba(129, 140, 248, 0.6); color: #e0e7ff; }
.billing-channel-badge--gcp { background: rgba(29, 78, 216, 0.32); border: 1px solid rgba(96, 165, 250, 0.6); color: #dbeafe; }
.billing-channel-badge--manual { background: rgba(180, 83, 9, 0.3); border: 1px solid rgba(251, 191, 36, 0.55); color: #fde68a; }
.billing-status-pill--pending { background: rgba(180, 83, 9, 0.32); border: 1px solid rgba(251, 191, 36, 0.6); color: #fef3c7; }
#studio-purchase-credits-modal .credit-pack-grid,
.onboarding-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; box-sizing: border-box; }
#studio-purchase-credits-modal .credit-pack-card { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-width: 0; padding: 16px 14px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); overflow-wrap: anywhere; box-sizing: border-box; transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease; }
#studio-purchase-credits-modal .credit-pack-card:hover { background: var(--studio-bg-card, #1b273d); border-color: var(--studio-border-highlight, #3b82f6); transform: translateY(-1px); }
#studio-purchase-credits-modal .credit-pack-card button,
.onboarding-gcp-link-panel button { min-height: 40px; min-width: 44px; padding: 8px 14px; border-radius: var(--studio-radius-md, 10px); font-size: 13px; font-weight: 600; cursor: pointer; touch-action: manipulation; box-sizing: border-box; }
#studio-purchase-credits-modal .credit-pack-price { font-family: var(--studio-font-sans, sans-serif); font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: #ffffff; font-variant-numeric: tabular-nums; }
#studio-purchase-credits-modal .credit-pack-gcp-units { font-family: var(--studio-font-mono, monospace); font-size: 11.5px; font-weight: 600; color: #93c5fd; line-height: 1.35; }
.gcp-topup-confirm-row { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: var(--studio-radius-md, 10px); background: rgba(29, 78, 216, 0.14); border: 1px solid rgba(96, 165, 250, 0.45); color: var(--studio-text-primary, #f1f5f9); font-size: 12.5px; line-height: 1.45; cursor: pointer; box-sizing: border-box; }
#gcp-topup-confirm-checkbox { width: 24px; height: 24px; min-width: 24px; min-height: 24px; margin: 0; flex-shrink: 0; accent-color: var(--studio-accent-blue, #3b82f6); cursor: pointer; }
.billing-poll-banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 14px; border-radius: var(--studio-radius-md, 10px); background: rgba(59, 130, 246, 0.16); border: 1px solid rgba(96, 165, 250, 0.55); color: #eff6ff; font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
.billing-grant-history-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; max-height: 210px; overflow-y: auto; scrollbar-gutter: stable; overscroll-behavior: contain; }
.billing-grant-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 9px 12px; border-radius: var(--studio-radius-sm, 6px); background: rgba(15, 22, 36, 0.85); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); font-size: 12px; overflow-wrap: anywhere; }
.onboarding-plan-card { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-width: 0; min-height: 44px; padding: 14px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); text-align: left; cursor: pointer; overflow-wrap: anywhere; box-sizing: border-box; transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease; }
.onboarding-plan-card:hover { background: var(--studio-bg-card, #1b273d); border-color: var(--studio-border-highlight, #3b82f6); }
.onboarding-plan-card--selected { background: rgba(29, 78, 216, 0.22); border-color: var(--studio-border-focus-ring, #38bdf8); box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45), 0 8px 20px rgba(8, 12, 20, 0.45); }
.onboarding-gcp-link-panel { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-elevated, #162032); border: 1px solid rgba(96, 165, 250, 0.45); color: var(--studio-text-primary, #f1f5f9); font-size: 13px; overflow-wrap: anywhere; box-sizing: border-box; }
@media (max-width: 640px) {
  #btn-studio-credit-balance,
  .studio-credit-balance-btn,
  .studio-credit-balance-pill { min-height: 44px; padding: 6px 10px; }
  #studio-billing-setup-banner,
  .billing-setup-banner { flex-direction: column; align-items: stretch; padding: 12px 14px; }
  .billing-setup-actions,
  .billing-banner-actions { width: 100%; margin-inline-start: 0; flex-direction: column; align-items: stretch; }
  .billing-setup-actions button,
  .billing-setup-actions a,
  .billing-banner-actions button,
  #studio-purchase-credits-modal .credit-pack-card button,
  .onboarding-gcp-link-panel button { width: 100%; min-height: 44px; }
  #studio-purchase-credits-modal .credit-pack-grid,
  .onboarding-plan-grid { grid-template-columns: 1fr; }
  .billing-grant-row { flex-direction: column; align-items: flex-start; }
}
/* frontend/css/studio/welcome-guide.css */
dialog.studio-welcome-dialog[open] { display: flex; flex-direction: column; width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 32px); margin: auto; padding: 0; border-radius: 16px; border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-surface, #0f1624); color: var(--studio-text-primary, #f1f5f9); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65); overflow: auto; }
dialog.studio-welcome-dialog:modal { overscroll-behavior: contain; }
dialog.studio-welcome-dialog::backdrop { overflow: hidden; overscroll-behavior: contain; background: rgba(4, 8, 16, 0.78); backdrop-filter: blur(6px); }
.studio-welcome-header { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 28px 20px; background: linear-gradient( 135deg, rgba(30, 41, 59, 0.55) 0%, rgba(15, 23, 42, 0.92) 100%); border-bottom: 1px solid var(--studio-border-subtle, #263654); }
.studio-welcome-header-copy { flex: 1; min-width: 0; }
.studio-welcome-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--studio-accent-blue-light, #60a5fa); background: rgba(59, 130, 246, 0.14); border: 1px solid rgba(59, 130, 246, 0.35); padding: 4px 10px; border-radius: 9999px; margin-bottom: 10px; }
.studio-welcome-title { margin: 0 0 8px 0; font-size: 22px; font-weight: 800; line-height: 1.25; letter-spacing: -0.02em; color: var(--studio-text-primary, #f1f5f9); }
.studio-welcome-subtitle { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--studio-text-secondary, #cbd5e1); max-width: 680px; }
.studio-welcome-close-btn { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--studio-border-subtle, #263654); background: rgba(15, 23, 42, 0.7); color: var(--studio-text-secondary, #cbd5e1); cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.studio-welcome-close-btn:hover { background: var(--studio-bg-card-hover, #22314d); color: #ffffff; border-color: rgba(96, 165, 250, 0.55); }
.studio-welcome-close-btn:focus-visible,
.studio-welcome-step-btn:focus-visible,
.studio-welcome-secondary-btn:focus-visible,
.studio-welcome-dismiss-btn:focus-visible,
.studio-welcome-toggle-input:focus-visible + .studio-welcome-toggle-track { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)); }
.studio-welcome-body { padding: 22px 28px; }
.studio-welcome-steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.studio-welcome-step-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 18px; border-radius: 12px; background: var(--studio-bg-card, #1b273d); border: 1px solid var(--studio-border-subtle, #263654); transition: border-color 0.15s ease, transform 0.15s ease; }
.studio-welcome-step-card.is-discovery { border-color: rgba(59, 130, 246, 0.45); background: linear-gradient( 180deg, rgba(29, 78, 216, 0.14) 0%, rgba(27, 39, 61, 0.96) 100%); }
.studio-welcome-step-card.is-design { border-color: rgba(139, 92, 246, 0.38); }
.studio-welcome-step-card.is-build { border-color: rgba(16, 185, 129, 0.38); }
.studio-welcome-step-card:hover { transform: translateY(-1px); }
.studio-welcome-step-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.studio-welcome-step-badge-wrap { display: inline-flex; align-items: center; gap: 8px; }
.studio-welcome-step-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 9999px; font-size: 11.5px; font-weight: 800; color: #ffffff; }
.studio-welcome-step-num.blue { background: #1d4ed8; }
.studio-welcome-step-num.violet { background: #6d28d9; }
.studio-welcome-step-num.emerald { background: #047857; }
.studio-welcome-step-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; }
.studio-welcome-step-icon.blue { background: rgba(59, 130, 246, 0.18); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.4); }
.studio-welcome-step-icon.violet { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.4); }
.studio-welcome-step-icon.emerald { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
.studio-welcome-start-pill { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #93c5fd; background: rgba(59, 130, 246, 0.2); border: 1px solid rgba(96, 165, 250, 0.45); padding: 3px 8px; border-radius: 9999px; }
.studio-welcome-step-title { margin: 0 0 6px 0; font-size: 15px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); }
.studio-welcome-step-desc { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--studio-text-secondary, #cbd5e1); }
.studio-welcome-step-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700; cursor: pointer; border: 1px solid transparent; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.studio-welcome-step-btn.primary { background: #2563eb; color: #ffffff; border-color: rgba(96, 165, 250, 0.5); }
.studio-welcome-step-btn.primary:hover { background: #1d4ed8; }
.studio-welcome-step-btn.violet { background: rgba(139, 92, 246, 0.16); color: #ddd6fe; border-color: rgba(139, 92, 246, 0.45); }
.studio-welcome-step-btn.violet:hover { background: rgba(139, 92, 246, 0.28); color: #ffffff; }
.studio-welcome-step-btn.emerald { background: rgba(16, 185, 129, 0.16); color: #a7f3d0; border-color: rgba(16, 185, 129, 0.45); }
.studio-welcome-step-btn.emerald:hover { background: rgba(16, 185, 129, 0.28); color: #ffffff; }
.studio-welcome-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 28px 20px; border-top: 1px solid var(--studio-border-subtle, #263654); background: rgba(8, 12, 20, 0.65); }
.studio-welcome-toggle-label { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 6px 4px 0; cursor: pointer; user-select: none; }
.studio-welcome-toggle-input { position: absolute; width: 44px; height: 44px; opacity: 0; margin: 0; cursor: pointer; }
.studio-welcome-toggle-track { position: relative; flex-shrink: 0; width: 42px; height: 24px; border-radius: 9999px; background: #334155; border: 1px solid #475569; transition: background-color 0.15s ease, border-color 0.15s ease; }
.studio-welcome-toggle-thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 9999px; background: #f8fafc; transition: transform 0.15s ease; }
.studio-welcome-toggle-input:checked + .studio-welcome-toggle-track { background: #2563eb; border-color: #60a5fa; }
.studio-welcome-toggle-input:checked + .studio-welcome-toggle-track .studio-welcome-toggle-thumb { transform: translateX(18px); }
.studio-welcome-toggle-copy { display: flex; flex-direction: column; gap: 2px; }
.studio-welcome-toggle-copy strong { font-size: 12.5px; font-weight: 600; color: var(--studio-text-primary, #f1f5f9); }
.studio-welcome-toggle-copy small { font-size: 11.5px; color: var(--studio-text-secondary, #94a3b8); }
.studio-welcome-footer-actions { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.studio-welcome-secondary-btn,
.studio-welcome-dismiss-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.studio-welcome-secondary-btn { background: var(--studio-bg-card, #1b273d); color: var(--studio-text-primary, #f1f5f9); border: 1px solid var(--studio-border-subtle, #263654); }
.studio-welcome-secondary-btn:hover { background: var(--studio-bg-card-hover, #22314d); border-color: rgba(96, 165, 250, 0.5); }
.studio-welcome-dismiss-btn { background: #10b981; color: #052e16; border: 1px solid #34d399; font-weight: 700; }
.studio-welcome-dismiss-btn:hover { background: #34d399; }
.help-hero-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
@media (max-width: 860px) {
  .studio-welcome-header,
  .studio-welcome-body,
  .studio-welcome-footer { padding-left: 18px; padding-right: 18px; }
  .studio-welcome-steps-grid { grid-template-columns: 1fr; }
  .studio-welcome-footer-actions { width: 100%; justify-content: flex-end; }
}
/* frontend/css/studio/value-export.css */
.btn-value-export,
.btn-value-github { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; border: 1px solid rgba(56, 189, 248, 0.38); background: rgba(15, 23, 42, 0.78); color: #e2e8f0; cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease; }
.btn-value-export:hover:not(:disabled),
.btn-value-github:hover:not(:disabled) { background: rgba(30, 41, 59, 0.92); border-color: #38bdf8; }
.btn-value-export:focus-visible,
.btn-value-github:focus-visible,
#studio-github-push-modal button:focus-visible,
#studio-github-push-modal input:focus-visible { outline: 2px solid #38bdf8; outline-offset: 2px; }
.btn-value-github[data-linked=true] { border-color: rgba(16, 185, 129, 0.55); background: rgba(16, 185, 129, 0.14); color: #6ee7b7; }
.btn-value-export:disabled,
.btn-value-github:disabled { opacity: 0.6; cursor: not-allowed; }
#studio-github-push-modal:modal { overscroll-behavior: contain; }
#studio-github-push-modal::backdrop { overflow: hidden; overscroll-behavior: contain; background: rgba(2, 6, 23, 0.72); backdrop-filter: blur(4px); }
#studio-github-push-modal[open] { display: flex; flex-direction: column; width: min(560px, 94vw); max-height: 88vh; margin: auto; padding: 0; border-radius: 14px; border: 1px solid rgba(56, 189, 248, 0.35); background: #0b1120; color: #f8fafc; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6); }
.value-github-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid rgba(148, 163, 184, 0.16); }
.value-github-modal-title { margin: 0; font-size: 16px; font-weight: 700; color: #f8fafc; }
.value-github-modal-body { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.value-github-field { display: flex; flex-direction: column; gap: 6px; }
.value-github-field label { font-size: 12px; font-weight: 600; color: #cbd5e1; }
.value-github-field input[type=text] { min-height: 40px; padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(148, 163, 184, 0.28); background: #060911; color: #f8fafc; font-size: 13px; }
.value-github-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #e2e8f0; min-height: 44px; }
.value-github-mode-note { margin: 0; font-size: 12.5px; line-height: 1.45; color: #94a3b8; background: rgba(15, 23, 42, 0.72); border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 8px; padding: 10px 12px; }
.value-github-paths-list { margin: 0; padding: 10px 14px 10px 26px; max-height: 145px; overflow-y: auto; background: #060911; border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 8px; font-size: 12px; color: #cbd5e1; }
.value-github-modal-error { margin: 0; padding: 10px 12px; border-radius: 8px; background: rgba(239, 68, 68, 0.14); border: 1px solid rgba(248, 113, 113, 0.45); color: #fecaca; font-size: 12.5px; }
.value-github-modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 20px 18px; border-top: 1px solid rgba(148, 163, 184, 0.16); }
#studio-github-push-modal button,
.value-salvage-btn { min-height: 44px; min-width: 44px; }
@media (max-width: 768px), (pointer: coarse) {
  .btn-value-export,
  .btn-value-github { min-height: 44px; min-width: 44px; }
}
/* frontend/css/studio/enterprise-identity.css */
.btn-onboard-sso { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 16px; border-radius: var(--studio-radius-lg, 14px); background: rgba(59, 130, 246, 0.14); border: 1px solid rgba(59, 130, 246, 0.45); color: var(--studio-accent-blue-light, #60a5fa); font-family: var(--studio-font-sans, sans-serif); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background var(--studio-transition-fast, 0.15s ease), border-color var(--studio-transition-fast, 0.15s ease); }
.btn-onboard-sso:hover { background: rgba(59, 130, 246, 0.24); border-color: var(--studio-accent-blue, #3b82f6); }
.btn-onboard-sso:focus-visible,
.ent-id-btn:focus-visible,
.ent-id-tab:focus-visible,
.ent-id-input:focus-visible,
.ent-id-select:focus-visible,
.ent-id-textarea:focus-visible,
.ent-id-checkbox:focus-visible,
.ent-id-close:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)); }
.onboard-sso-hint { margin-top: 8px; padding: 8px 12px; border-radius: var(--studio-radius-md, 10px); font-size: 12.5px; line-height: 1.4; border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-elevated, #162032); color: var(--studio-text-secondary, #94a3b8); }
.onboard-sso-hint.info { border-color: rgba(59, 130, 246, 0.45); color: var(--studio-accent-blue-light, #60a5fa); }
.onboard-sso-hint.error { border-color: rgba(244, 63, 94, 0.5); color: #fda4af; background: rgba(244, 63, 94, 0.12); }
.ent-id-backdrop { position: fixed; inset: 0; z-index: 1030; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--studio-bg-overlay, rgba(8, 12, 20, 0.88)); backdrop-filter: blur(10px); }
.ent-id-backdrop.hidden { display: none !important; }
.ent-id-dialog { width: 100%; max-width: 780px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; background: var(--studio-bg-surface, #0f1624); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-xl, 18px); box-shadow: 0 24px 56px rgba(0, 0, 0, 0.78); color: var(--studio-text-primary, #f1f5f9); }
.ent-id-dialog.ent-id-dialog--narrow { max-width: 500px; }
.ent-id-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--studio-border-subtle, #263654); background: rgba(8, 12, 20, 0.55); }
.ent-id-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); }
.ent-id-subtitle { margin: 4px 0 0; font-size: 12.5px; color: var(--studio-text-secondary, #94a3b8); }
.ent-id-close { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--studio-radius-sm, 6px); border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-elevated, #162032); color: var(--studio-text-secondary, #94a3b8); cursor: pointer; }
.ent-id-close:hover { color: var(--studio-text-primary, #f1f5f9); border-color: var(--studio-border-highlight, #3b82f6); }
.ent-id-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 22px; border-bottom: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-root, #080c14); }
.ent-id-tab { min-height: 44px; padding: 8px 14px; border-radius: var(--studio-radius-md, 10px); border: 1px solid transparent; background: transparent; color: var(--studio-text-secondary, #94a3b8); font-size: 13px; font-weight: 600; cursor: pointer; }
.ent-id-tab[aria-selected=true] { background: var(--studio-bg-card, #1b273d); border-color: var(--studio-border-highlight, #3b82f6); color: var(--studio-text-primary, #f1f5f9); }
.ent-id-body { padding: 18px 22px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 14px; }
.ent-id-step-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ent-id-step-pill { padding: 4px 10px; border-radius: var(--studio-radius-full, 9999px); font-size: 11.5px; font-weight: 700; background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-secondary, #94a3b8); }
.ent-id-step-pill.active { background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.45); color: var(--studio-accent-emerald-light, #34d399); }
.ent-id-alert { padding: 10px 12px; border-radius: var(--studio-radius-md, 10px); font-size: 12.5px; line-height: 1.45; border: 1px solid rgba(244, 63, 94, 0.45); background: rgba(244, 63, 94, 0.12); color: #fecdd3; }
.ent-id-alert.success { border-color: rgba(16, 185, 129, 0.45); background: rgba(16, 185, 129, 0.12); color: #a7f3d0; }
.ent-id-alert.info { border-color: rgba(59, 130, 246, 0.45); background: rgba(59, 130, 246, 0.12); color: #bfdbfe; }
.ent-id-card { background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-lg, 14px); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ent-id-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ent-id-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ent-id-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ent-id-label { font-size: 12px; font-weight: 600; color: var(--studio-text-secondary, #94a3b8); }
.ent-id-input,
.ent-id-select,
.ent-id-textarea { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: var(--studio-radius-md, 10px); border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-root, #080c14); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, sans-serif); font-size: 13px; box-sizing: border-box; }
.ent-id-textarea { min-height: 78px; font-family: var(--studio-font-mono, monospace); font-size: 12px; }
.ent-id-mono-box { padding: 10px 12px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-root, #080c14); border: 1px solid var(--studio-border-subtle, #263654); font-family: var(--studio-font-mono, monospace); font-size: 12px; color: var(--studio-accent-emerald-light, #34d399); word-break: break-all; }
.ent-id-recovery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ent-id-recovery-code { padding: 6px 10px; border-radius: var(--studio-radius-sm, 6px); background: var(--studio-bg-root, #080c14); border: 1px solid var(--studio-border-subtle, #263654); font-family: var(--studio-font-mono, monospace); font-size: 12px; text-align: center; color: var(--studio-text-primary, #f1f5f9); }
.ent-id-btn { min-height: 44px; min-width: 44px; padding: 8px 14px; border-radius: var(--studio-radius-md, 10px); border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-card, #1b273d); color: var(--studio-text-primary, #f1f5f9); font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ent-id-btn:hover { background: var(--studio-bg-card-hover, #22314d); }
.ent-id-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.ent-id-btn--primary { background: var(--studio-accent-blue, #3b82f6); border-color: var(--studio-accent-blue-light, #60a5fa); color: #ffffff; }
.ent-id-btn--emerald { background: var(--studio-accent-emerald, #10b981); border-color: var(--studio-accent-emerald-light, #34d399); color: var(--studio-text-inverse, #080c14); }
.ent-id-btn--danger { background: rgba(244, 63, 94, 0.16); border-color: rgba(244, 63, 94, 0.48); color: #fda4af; }
.ent-id-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--studio-radius-full, 9999px); font-size: 11px; font-weight: 700; border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-root, #080c14); color: var(--studio-text-secondary, #94a3b8); }
.ent-id-badge--ok { border-color: rgba(16, 185, 129, 0.45); color: var(--studio-accent-emerald-light, #34d399); background: rgba(16, 185, 129, 0.12); }
.ent-id-badge--warn { border-color: rgba(245, 158, 11, 0.45); color: #fbbf24; background: rgba(245, 158, 11, 0.12); }
.ent-id-badge--off { border-color: rgba(244, 63, 94, 0.45); color: #fda4af; background: rgba(244, 63, 94, 0.12); }
.ent-id-token-banner { padding: 12px 14px; border-radius: var(--studio-radius-md, 10px); border: 1px solid rgba(16, 185, 129, 0.5); background: rgba(16, 185, 129, 0.1); display: flex; flex-direction: column; gap: 8px; }
.ent-id-checkbox { width: 24px; height: 24px; accent-color: var(--studio-accent-blue, #3b82f6); cursor: pointer; }
.ent-id-check-label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; cursor: pointer; }
@media (max-width: 768px) {
  .ent-id-grid,
  .ent-id-recovery-grid { grid-template-columns: 1fr; }
  .ent-id-header,
  .ent-id-tabs,
  .ent-id-body { padding-left: 14px; padding-right: 14px; }
  .ent-id-row { flex-direction: column; align-items: stretch; }
}
/* frontend/css/studio/stitch-post-build-revision.css */
#btn-spec-lab-post-build-add-screen,
.spec-lab-btn-post-build-add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: var(--studio-radius-md, 10px); background: linear-gradient( 135deg, #0369a1 0%, #047857 100%); border: 1px solid rgba(56, 189, 248, 0.55); color: #ffffff; font-family: var(--studio-font-sans, sans-serif); font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: filter var(--studio-transition-fast, 0.15s ease), transform var(--studio-transition-fast, 0.15s ease); box-sizing: border-box; }
#btn-spec-lab-post-build-add-screen:hover:not(:disabled),
.spec-lab-btn-post-build-add:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
#btn-spec-lab-post-build-add-screen:focus-visible,
.spec-lab-btn-post-build-add:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; }
#btn-spec-lab-post-build-add-screen.hidden,
#btn-spec-lab-post-build-add-screen[hidden] { display: none !important; }
#studio-stitch-revision-drawer.stitch-rev-drawer { position: fixed; inset: 0; z-index: 980; display: flex; justify-content: flex-end; background: var(--studio-bg-overlay, rgba(8, 12, 20, 0.88)); backdrop-filter: blur(8px); box-sizing: border-box; overflow: hidden; }
#studio-stitch-revision-drawer.hidden,
#studio-stitch-revision-drawer[hidden] { display: none !important; }
.stitch-rev-panel { width: min(880px, 100vw); max-width: 100%; height: 100dvh; max-height: 100dvh; background: var(--studio-bg-surface, #0f1624); border-left: 1px solid var(--studio-border-subtle, #263654); box-shadow: -16px 0 48px rgba(0, 0, 0, 0.72); display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; color: var(--studio-text-primary, #f1f5f9); }
.stitch-rev-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-elevated, #162032); flex-shrink: 0; box-sizing: border-box; }
.stitch-rev-header-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
.stitch-rev-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stitch-rev-title { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.3; color: var(--studio-text-primary, #f1f5f9); overflow-wrap: anywhere; }
.stitch-rev-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: #cbd5e1; }
.stitch-rev-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.stitch-rev-project-pill,
.stitch-rev-elapsed-pill,
.stitch-rev-status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--studio-radius-full, 9999px); font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.stitch-rev-project-pill { background: rgba(59, 130, 246, 0.2); border: 1px solid rgba(96, 165, 250, 0.45); color: #dbeafe; }
.stitch-rev-elapsed-pill { font-family: var(--studio-font-mono, monospace); background: rgba(15, 22, 36, 0.9); border: 1px solid var(--studio-border-subtle, #263654); color: #e2e8f0; }
.stitch-rev-status-pill { background: #1e293b; border: 1px solid rgba(148, 163, 184, 0.45); color: #f1f5f9; }
.stitch-rev-status-pill.is-active { background: #1d4ed8; border-color: #60a5fa; color: #ffffff; }
.stitch-rev-status-pill.is-ready,
.stitch-rev-status-pill.is-built { background: #047857; border-color: #34d399; color: #ffffff; }
.stitch-rev-status-pill.is-building { background: #6d28d9; border-color: #a78bfa; color: #ffffff; }
.stitch-rev-status-pill.is-failed { background: #be123c; border-color: #fda4af; color: #ffffff; }
.stitch-rev-close-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: var(--studio-radius-md, 10px); background: rgba(30, 41, 59, 0.85); border: 1px solid var(--studio-border-subtle, #263654); color: #f1f5f9; cursor: pointer; }
.stitch-rev-close-btn:hover { background: rgba(51, 65, 85, 0.95); border-color: var(--studio-border-highlight, #3b82f6); }
.stitch-rev-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; }
.stitch-rev-screens-strip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stitch-rev-screen-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--studio-radius-full, 9999px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: #cbd5e1; font-size: 11px; font-weight: 600; max-width: 100%; overflow-wrap: anywhere; }
.stitch-rev-screen-chip.is-new-slot { background: rgba(16, 185, 129, 0.16); border-color: rgba(52, 211, 153, 0.55); color: #d1fae5; }
.stitch-rev-chip-slot { font-family: var(--studio-font-mono, monospace); font-size: 10px; color: #93c5fd; font-weight: 700; }
.stitch-rev-screen-chip.is-new-slot .stitch-rev-chip-slot { color: #6ee7b7; }
.stitch-rev-progress-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--studio-radius-md, 10px); background: linear-gradient( 90deg, rgba(59, 130, 246, 0.18) 0%, rgba(22, 32, 50, 0.96) 70%); border: 1px solid rgba(96, 165, 250, 0.45); color: #e2e8f0; font-size: 12.5px; font-weight: 600; }
.stitch-rev-progress-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(147, 197, 253, 0.3); border-top-color: #60a5fa; flex-shrink: 0; display: none; }
.stitch-rev-progress-banner.is-spinning .stitch-rev-progress-spinner { display: inline-block; animation: stitchRevSpin 0.85s linear infinite; }
@keyframes stitchRevSpin {
  to { transform: rotate(360deg); }
}
.stitch-rev-error-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--studio-radius-md, 10px); background: rgba(190, 18, 60, 0.22); border: 1px solid rgba(251, 113, 133, 0.65); color: #ffe4e6; font-size: 12.5px; line-height: 1.45; }
.stitch-rev-error-banner.hidden,
.stitch-rev-error-banner[hidden],
.stitch-rev-progress-banner.hidden,
.stitch-rev-progress-banner[hidden] { display: none !important; }
.stitch-rev-error-text { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.stitch-rev-form { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); box-sizing: border-box; }
.stitch-rev-field-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.stitch-rev-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.stitch-rev-label { font-size: 11.5px; font-weight: 700; color: #e2e8f0; }
.stitch-rev-input,
.stitch-rev-textarea,
.stitch-rev-select { width: 100%; min-height: 44px; padding: 9px 12px; border-radius: var(--studio-radius-sm, 6px); background: var(--studio-bg-root, #080c14); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, sans-serif); font-size: 12.5px; line-height: 1.45; box-sizing: border-box; }
.stitch-rev-textarea { min-height: 68px; resize: vertical; }
.stitch-rev-input[aria-invalid=true],
.stitch-rev-textarea[aria-invalid=true] { border-color: #fb7185; }
.stitch-rev-preview-stage { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stitch-rev-preview-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 220px; padding: 20px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-root, #080c14); border: 1px dashed rgba(148, 163, 184, 0.35); color: #cbd5e1; font-size: 12.5px; line-height: 1.5; }
.stitch-rev-preview-empty.hidden,
.stitch-rev-preview-empty[hidden],
.stitch-rev-iframe.hidden,
.stitch-rev-iframe[hidden],
.stitch-rev-refine-bar.hidden,
.stitch-rev-refine-bar[hidden],
.stitch-rev-history.hidden,
.stitch-rev-history[hidden] { display: none !important; }
.stitch-rev-iframe { display: block; width: 100%; min-height: 360px; height: clamp(320px, 44vh, 540px); border-radius: var(--studio-radius-md, 10px); border: 1px solid var(--studio-border-subtle, #263654); background: #080c14; box-sizing: border-box; }
.stitch-rev-refine-bar { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); }
.stitch-rev-refine-row { display: flex; align-items: center; gap: 8px; }
.stitch-rev-refine-row .stitch-rev-input { flex: 1 1 auto; min-width: 0; }
.stitch-rev-quick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stitch-rev-history { display: flex; flex-direction: column; gap: 6px; }
.stitch-rev-history-item { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #cbd5e1; }
.stitch-rev-history-badge { padding: 2px 7px; border-radius: var(--studio-radius-full, 9999px); background: rgba(59, 130, 246, 0.22); border: 1px solid rgba(96, 165, 250, 0.45); color: #dbeafe; font-family: var(--studio-font-mono, monospace); font-size: 10px; font-weight: 700; white-space: nowrap; }
.stitch-rev-btn,
.stitch-rev-quick-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 8px 14px; border-radius: var(--studio-radius-md, 10px); font-family: var(--studio-font-sans, sans-serif); font-size: 12.5px; font-weight: 700; cursor: pointer; box-sizing: border-box; transition: background-color 0.15s ease, border-color 0.15s ease, filter 0.15s ease; }
.stitch-rev-btn-primary { background: #047857; border: 1px solid #34d399; color: #ffffff; }
.stitch-rev-btn-primary:hover:not(:disabled) { background: #059669; }
.stitch-rev-btn-accent { background: #1d4ed8; border: 1px solid #60a5fa; color: #ffffff; }
.stitch-rev-btn-accent:hover:not(:disabled) { background: #2563eb; }
.stitch-rev-btn-secondary,
.stitch-rev-quick-chip { background: #1e293b; border: 1px solid rgba(148, 163, 184, 0.45); color: #f1f5f9; }
.stitch-rev-quick-chip { font-size: 11.5px; font-weight: 600; padding: 6px 12px; }
.stitch-rev-btn-secondary:hover:not(:disabled),
.stitch-rev-quick-chip:hover:not(:disabled) { background: #334155; border-color: #60a5fa; }
.stitch-rev-btn-danger { background: #9f1239; border: 1px solid #fda4af; color: #ffffff; }
.stitch-rev-btn-danger:hover:not(:disabled) { background: #be123c; }
.stitch-rev-btn:disabled,
.stitch-rev-quick-chip:disabled { opacity: 0.5; cursor: not-allowed; }
.stitch-rev-btn.hidden,
.stitch-rev-btn[hidden] { display: none !important; }
.stitch-rev-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-elevated, #162032); flex-shrink: 0; box-sizing: border-box; }
.stitch-rev-footer-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#studio-stitch-revision-drawer button:focus-visible,
#studio-stitch-revision-drawer input:focus-visible,
#studio-stitch-revision-drawer textarea:focus-visible,
#studio-stitch-revision-drawer select:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; }
@media (max-width: 640px) {
  .stitch-rev-panel { width: 100vw; border-left: none; }
  .stitch-rev-header,
  .stitch-rev-body,
  .stitch-rev-footer { padding-inline: 12px; }
  .stitch-rev-field-grid { grid-template-columns: 1fr; }
  .stitch-rev-refine-row,
  .stitch-rev-footer,
  .stitch-rev-footer-group { flex-direction: column; align-items: stretch; width: 100%; }
  .stitch-rev-btn,
  .stitch-rev-footer .stitch-rev-btn { width: 100%; }
  .stitch-rev-iframe { min-height: 280px; }
}
/* frontend/css/studio/byok-vault.css */
#account-byok-status-box { background: var(--studio-bg-surface, #0f1624); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-md, 10px); padding: 10px 14px; gap: 12px; flex-wrap: wrap; box-sizing: border-box; transition: border-color var(--studio-transition-fast, 0.15s ease), background-color var(--studio-transition-fast, 0.15s ease); }
#account-byok-status-box .connected-sub-status-info { flex: 1 1 200px; min-width: 0; }
#account-byok-status-box #account-connected-byok-status { color: var(--studio-text-secondary, #94a3b8); overflow-wrap: anywhere; line-height: 1.4; }
#account-byok-status-box.is-byok-active { border-color: var(--studio-status-ok-border, #10b981); }
#account-byok-status-box.is-byok-paused { border-color: var(--studio-status-warn-border, #f59e0b); }
#account-byok-status-box.is-byok-error { border-color: var(--studio-status-err-border, #fb7185); }
#btn-account-open-byok-settings { min-height: 36px; flex-shrink: 0; white-space: nowrap; }
#btn-account-open-byok-settings:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)); }
dialog.byok-vault-dialog:not([open]) { display: none; }
dialog.byok-vault-dialog[open] { display: flex; flex-direction: column; width: min(820px, calc(100vw - 32px)); max-width: 100%; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: hidden; box-sizing: border-box; border-radius: var(--studio-radius-xl, 18px); border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-surface, #0f1624); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, sans-serif); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.78); overscroll-behavior: contain; }
dialog.byok-vault-dialog:modal { overscroll-behavior: contain; }
dialog.byok-vault-dialog::backdrop { background: var(--studio-bg-overlay, rgba(8, 12, 20, 0.88)); backdrop-filter: blur(8px); overscroll-behavior: contain; }
dialog.byok-vault-dialog *,
dialog.byok-vault-dialog *::before,
dialog.byok-vault-dialog *::after { box-sizing: border-box; }
dialog.byok-vault-dialog .hidden,
dialog.byok-vault-dialog [hidden] { display: none !important; }
dialog.byok-vault-dialog :is(button, input, select, a, [tabindex]):focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)); }
.byok-vault-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 22px 16px; background: var(--studio-bg-root, #080c14); border-bottom: 1px solid var(--studio-border-subtle, #263654); flex-shrink: 0; }
.byok-vault-header-copy { flex: 1 1 auto; min-width: 0; }
.byok-vault-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; margin-bottom: 8px; border-radius: var(--studio-radius-full, 9999px); border: 1px solid var(--studio-status-info-border, #38bdf8); background: var(--studio-status-info-bg, #082f49); color: var(--studio-status-info-fg, #bae6fd); font-family: var(--studio-font-mono, monospace); font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.byok-vault-eyebrow .material-symbols-outlined { font-size: 14px; color: var(--studio-accent-violet-light, #a78bfa); }
.byok-vault-title { margin: 0 0 4px; font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--studio-text-primary, #f1f5f9); }
.byok-vault-subtitle { margin: 0; font-size: 13px; line-height: 1.45; color: var(--studio-text-secondary, #94a3b8); }
.byok-vault-close-btn { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; min-width: 44px; min-height: 44px; border-radius: var(--studio-radius-md, 10px); border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-elevated, #162032); color: var(--studio-text-secondary, #94a3b8); cursor: pointer; transition: background-color var(--studio-transition-fast, 0.15s ease), border-color var(--studio-transition-fast, 0.15s ease), color var(--studio-transition-fast, 0.15s ease); }
.byok-vault-close-btn:hover { background: var(--studio-bg-card-hover, #22314d); border-color: var(--studio-border-highlight, #3b82f6); color: var(--studio-text-primary, #f1f5f9); }
.byok-vault-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scroll-padding-block: 16px; padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.byok-org-bar { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 14px; border-radius: var(--studio-radius-lg, 14px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); }
.byok-org-select-group { display: flex; flex-direction: column; gap: 5px; flex: 1 1 240px; min-width: 0; }
.byok-org-select-label { font-size: 12px; font-weight: 600; color: var(--studio-text-secondary, #94a3b8); }
.byok-org-bar .ent-id-select { min-height: 36px; padding: 6px 12px; background: var(--studio-bg-card, #1b273d); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); border-radius: var(--studio-radius-md, 10px); font-size: 13px; }
.byok-org-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.byok-status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; min-height: 26px; border-radius: var(--studio-radius-full, 9999px); border: 1px solid var(--studio-status-muted-border, #475569); background: var(--studio-status-muted-bg, #1e293b); color: var(--studio-status-muted-fg, #cbd5e1); font-size: 11.5px; font-weight: 700; line-height: 1.25; max-width: 100%; overflow-wrap: anywhere; }
.byok-status-pill .material-symbols-outlined { font-size: 14px; flex-shrink: 0; }
.byok-status-pill--ok,
.byok-status-pill.is-ok { background: var(--studio-status-ok-bg, #052e2b); border-color: var(--studio-status-ok-border, #10b981); color: var(--studio-status-ok-fg, #6ee7b7); }
.byok-status-pill--warn,
.byok-status-pill.is-warn { background: var(--studio-status-warn-bg, #2b1d07); border-color: var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); }
.byok-status-pill--err,
.byok-status-pill.is-err { background: var(--studio-status-err-bg, #331018); border-color: var(--studio-status-err-border, #fb7185); color: var(--studio-status-err-fg, #fecdd3); }
.byok-status-pill--info,
.byok-status-pill.is-info { background: var(--studio-status-info-bg, #082f49); border-color: var(--studio-status-info-border, #38bdf8); color: var(--studio-status-info-fg, #bae6fd); }
.byok-status-pill--muted,
.byok-status-pill.is-muted { background: var(--studio-status-muted-bg, #1e293b); border-color: var(--studio-status-muted-border, #475569); color: var(--studio-status-muted-fg, #cbd5e1); }
.byok-modal-alert,
.byok-trial-gate-banner,
.byok-rbac-note { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 11px 14px; border-radius: var(--studio-radius-md, 10px); font-size: 13px; line-height: 1.45; border: 1px solid var(--studio-status-info-border, #38bdf8); background: var(--studio-status-info-bg, #082f49); color: var(--studio-status-info-fg, #bae6fd); overflow-wrap: anywhere; }
.byok-modal-alert.is-ok { border-color: var(--studio-status-ok-border, #10b981); background: var(--studio-status-ok-bg, #052e2b); color: var(--studio-status-ok-fg, #6ee7b7); }
.byok-modal-alert.is-warn,
.byok-trial-gate-banner { border-color: var(--studio-status-warn-border, #f59e0b); background: var(--studio-status-warn-bg, #2b1d07); color: var(--studio-status-warn-fg, #fde68a); }
.byok-modal-alert.is-err { border-color: var(--studio-status-err-border, #fb7185); background: var(--studio-status-err-bg, #331018); color: var(--studio-status-err-fg, #fecdd3); }
.byok-rbac-note { justify-content: flex-start; border-color: var(--studio-status-muted-border, #475569); background: var(--studio-status-muted-bg, #1e293b); color: var(--studio-status-muted-fg, #cbd5e1); }
.byok-banner-copy { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 260px; min-width: 0; }
.byok-providers-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.byok-provider-card { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-width: 0; min-height: 290px; padding: 16px; border-radius: var(--studio-radius-lg, 14px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); transition: border-color var(--studio-transition-fast, 0.15s ease), opacity var(--studio-transition-fast, 0.15s ease); }
.byok-provider-card.is-probing { border-color: var(--studio-border-highlight, #3b82f6); }
.byok-provider-card.is-trial-gated { opacity: 0.72; }
.byok-provider-card.is-loading-skeleton { background: linear-gradient( 90deg, var(--studio-bg-elevated, #162032) 25%, var(--studio-bg-card, #1b273d) 50%, var(--studio-bg-elevated, #162032) 75%); background-size: 200% 100%; animation: byokSkeletonShimmer 1.4s ease-in-out infinite; }
@keyframes byokSkeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.byok-card-header { display: flex; flex-direction: column; gap: 8px; }
.byok-card-title-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.byok-card-title { margin: 0; display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); }
.byok-card-title .material-symbols-outlined { font-size: 18px; color: var(--studio-accent-violet-light, #a78bfa); }
.byok-provider-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--studio-radius-sm, 6px); background: var(--studio-bg-card, #1b273d); border: 1px solid var(--studio-border-subtle, #263654); font-family: var(--studio-font-mono, monospace); font-size: 11px; font-weight: 600; color: var(--studio-text-secondary, #94a3b8); }
.byok-card-desc { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--studio-text-secondary, #94a3b8); }
.byok-card-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.byok-telemetry { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-card, #1b273d); border: 1px solid var(--studio-border-subtle, #263654); }
.byok-telemetry-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.byok-telemetry-label { font-size: 12px; font-weight: 600; color: var(--studio-text-secondary, #94a3b8); }
.byok-mask-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--studio-radius-sm, 6px); background: var(--studio-bg-surface, #0f1624); border: 1px solid var(--studio-border-subtle, #263654); font-family: var(--studio-font-mono, monospace); font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--studio-text-primary, #f1f5f9); max-width: 100%; overflow-wrap: anywhere; }
.byok-mask-chip.is-empty { font-family: var(--studio-font-sans, sans-serif); font-weight: 500; letter-spacing: normal; color: var(--studio-text-secondary, #94a3b8); }
.byok-last-verified { font-family: var(--studio-font-mono, monospace); font-size: 11.5px; color: var(--studio-text-secondary, #94a3b8); overflow-wrap: anywhere; }
.byok-error-detail { padding: 7px 10px; border-radius: var(--studio-radius-sm, 6px); background: var(--studio-status-err-bg, #331018); border: 1px solid var(--studio-status-err-border, #fb7185); color: var(--studio-status-err-fg, #fecdd3); font-family: var(--studio-font-mono, monospace); font-size: 11.5px; line-height: 1.4; overflow-wrap: anywhere; }
.byok-credit-note { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--studio-status-ok-fg, #6ee7b7); line-height: 1.35; }
.byok-form { display: flex; flex-direction: column; gap: 10px; }
.byok-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.byok-field-label { font-size: 12.5px; font-weight: 600; color: var(--studio-text-primary, #f1f5f9); }
.byok-input { width: 100%; min-height: 38px; padding: 8px 12px; border-radius: var(--studio-radius-md, 10px); border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-card, #1b273d); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-mono, monospace); font-size: 12.5px; }
.byok-input::placeholder { font-family: var(--studio-font-sans, sans-serif); color: var(--studio-text-secondary, #94a3b8); opacity: 0.9; }
.byok-input[aria-invalid=true] { border-color: var(--studio-accent-rose, #f43f5e); }
.byok-input:disabled,
.byok-input[aria-disabled=true] { opacity: 0.6; cursor: not-allowed; }
.byok-input-hint { font-size: 11.5px; line-height: 1.4; color: var(--studio-text-secondary, #94a3b8); }
.byok-input-error { font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--studio-status-err-fg, #fecdd3); overflow-wrap: anywhere; }
.byok-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.byok-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; min-width: 36px; padding: 6px 12px; border-radius: var(--studio-radius-md, 10px); border: 1px solid var(--studio-border-subtle, #263654); background: var(--studio-bg-card, #1b273d); color: var(--studio-text-primary, #f1f5f9); font-family: var(--studio-font-sans, sans-serif); font-size: 12.5px; font-weight: 600; line-height: 1.25; cursor: pointer; transition: background-color var(--studio-transition-fast, 0.15s ease), border-color var(--studio-transition-fast, 0.15s ease); }
.byok-btn:hover:not(:disabled) { background: var(--studio-bg-card-hover, #22314d); border-color: var(--studio-border-highlight, #3b82f6); }
.byok-btn:disabled,
.byok-btn[aria-disabled=true] { opacity: 0.55; cursor: not-allowed; }
.byok-btn--primary { background: var(--studio-accent-blue, #3b82f6); border-color: var(--studio-accent-blue-light, #60a5fa); color: var(--studio-text-primary, #f1f5f9); }
.byok-btn--primary:hover:not(:disabled) { background: var(--studio-accent-blue-container, #1d4ed8); }
.byok-btn--emerald { background: var(--studio-accent-emerald, #10b981); border-color: var(--studio-accent-emerald-light, #34d399); color: var(--studio-accent-emerald-on, #002113); font-weight: 700; }
.byok-btn--emerald:hover:not(:disabled) { background: var(--studio-accent-emerald-light, #34d399); }
.byok-btn--warn { background: var(--studio-status-warn-bg, #2b1d07); border-color: var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); }
.byok-btn--danger { background: var(--studio-status-err-bg, #331018); border-color: var(--studio-status-err-border, #fb7185); color: var(--studio-status-err-fg, #fecdd3); }
.byok-btn--danger:hover:not(:disabled) { border-color: var(--studio-accent-rose, #f43f5e); }
.byok-delete-confirm { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-status-err-bg, #331018); border: 1px solid var(--studio-status-err-border, #fb7185); color: var(--studio-status-err-fg, #fecdd3); font-size: 12.5px; line-height: 1.4; }
.byok-delete-confirm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#studio-purchase-credits-byok-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 14px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-status-info-border, #38bdf8); color: var(--studio-text-primary, #f1f5f9); font-size: 13px; line-height: 1.45; box-sizing: border-box; }
#studio-purchase-credits-byok-bar.hidden,
#studio-purchase-credits-byok-bar[hidden] { display: none !important; }
.stitch-rev-byok-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 14px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); font-size: 12.5px; line-height: 1.45; box-sizing: border-box; }
.stitch-rev-byok-actions.hidden,
.stitch-rev-byok-actions[hidden] { display: none !important; }
.stitch-rev-byok-btn-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.revision-job-banner #btn-banner-fix-byok,
.studio-revision-job-banner #btn-banner-fix-byok,
#btn-banner-fix-byok { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 6px 12px; border-radius: var(--studio-radius-sm, 6px); background: var(--studio-accent-blue, #3b82f6); border: 1px solid var(--studio-accent-blue-light, #60a5fa); color: var(--studio-text-primary, #f1f5f9); font-size: 12px; font-weight: 700; cursor: pointer; }
.revision-job-banner #btn-banner-pause-byok,
.studio-revision-job-banner #btn-banner-pause-byok,
#btn-banner-pause-byok { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 6px 12px; border-radius: var(--studio-radius-sm, 6px); background: var(--studio-status-warn-bg, #2b1d07); border: 1px solid var(--studio-status-warn-border, #f59e0b); color: var(--studio-status-warn-fg, #fde68a); font-size: 12px; font-weight: 700; cursor: pointer; }
#btn-banner-fix-byok:focus-visible,
#btn-banner-pause-byok:focus-visible,
#studio-purchase-credits-byok-bar button:focus-visible,
.stitch-rev-byok-actions button:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; box-shadow: var(--studio-focus-glow, 0 0 0 3px rgba(56, 189, 248, 0.35)); }
@media (max-width: 768px) {
  dialog.byok-vault-dialog[open] { width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); border-radius: var(--studio-radius-lg, 14px); }
  .byok-vault-header,
  .byok-vault-body { padding-inline: 14px; }
  .byok-org-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .byok-org-select-group { flex: 0 0 auto; width: 100%; }
  .byok-providers-grid { grid-template-columns: 1fr; }
  .byok-org-bar .ent-id-select,
  .byok-input,
  .byok-btn,
  #btn-account-open-byok-settings,
  #studio-purchase-credits-byok-bar button,
  .stitch-rev-byok-actions button,
  .revision-job-banner #btn-banner-fix-byok,
  .revision-job-banner #btn-banner-pause-byok,
  .studio-revision-job-banner #btn-banner-fix-byok,
  .studio-revision-job-banner #btn-banner-pause-byok,
  #btn-banner-fix-byok,
  #btn-banner-pause-byok { min-height: 44px; min-width: 44px; }
  .byok-card-actions,
  .byok-delete-confirm-actions,
  .stitch-rev-byok-btn-group { flex-direction: column; align-items: stretch; width: 100%; }
  .byok-btn { width: 100%; }
}
@media (pointer: coarse) {
  .byok-org-bar .ent-id-select,
  .byok-input,
  .byok-btn,
  #btn-account-open-byok-settings,
  #btn-banner-fix-byok,
  #btn-banner-pause-byok { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  dialog.byok-vault-dialog *,
  #account-byok-status-box,
  .byok-provider-card,
  .byok-btn,
  .byok-vault-close-btn { transition: none !important; animation: none !important; }
  .byok-provider-card.is-loading-skeleton { background: var(--studio-bg-card, #1b273d); }
}
/* frontend/css/studio/build-queue.css */
#studio-workspace[data-build-subview=queue] #studio-console-aside,
#studio-workspace[data-build-subview=queue] #btn-expand-console,
#studio-workspace[data-build-subview=queue] #studio-canvas-pane,
#studio-workspace[data-build-subview=queue] #btn-expand-drawer,
#studio-workspace[data-build-subview=queue] #studio-agent-drawer { display: none !important; }
#studio-workspace[data-build-subview=queue] { display: flex; flex-direction: column; width: 100%; max-width: 100vw; min-width: 0; overflow: hidden; }
#studio-workspace[data-build-subview=queue] #studio-build-queue-view { display: flex; flex-direction: column; flex: 1 1 auto; gap: 16px; width: 100%; max-width: 100%; min-width: 0; height: 100%; min-height: 0; padding: 20px 24px; overflow-y: auto; overflow-x: hidden; background-color: var(--studio-bg-root); background-image: var(--studio-dot-matrix); background-size: 24px 24px; box-sizing: border-box; }
#studio-workspace[data-build-subview=canvas] #studio-build-queue-view,
#studio-build-queue-view[hidden],
#studio-build-queue-view.hidden { display: none !important; }
.studio-tab-badge,
#studio-builder-tab-badge { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 3px; border-radius: var(--studio-radius-full); background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-primary); font-family: var(--studio-font-mono); font-size: 10px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.studio-toggle-btn.active #studio-builder-tab-badge,
.studio-toggle-btn.active .studio-tab-badge { background: rgba(59, 130, 246, 0.24); border-color: rgba(96, 165, 250, 0.55); color: #dbeafe; }
.studio-tab-badge[hidden],
.studio-tab-badge.hidden,
#studio-builder-tab-badge[hidden],
#studio-builder-tab-badge.hidden { display: none !important; }
.studio-tab-badge-dot--attention { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background-color: var(--studio-accent-amber); box-shadow: 0 0 8px rgba(245, 158, 11, 0.75); animation: studio-pulse 1.6s ease-in-out infinite; }
.studio-back-to-queue-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; min-width: 44px; padding: 6px 12px; border-radius: var(--studio-radius-md); background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-primary); font-family: var(--studio-font-sans); font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; flex-shrink: 0; cursor: pointer; transition: background-color var(--studio-transition-fast), border-color var(--studio-transition-fast), color var(--studio-transition-fast); }
.studio-back-to-queue-btn:hover { background: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); color: #ffffff; }
.studio-back-to-queue-btn:focus-visible { outline: 2px solid var(--studio-border-focus-ring); outline-offset: 2px; box-shadow: var(--studio-focus-glow); }
.build-queue-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 16px; width: 100%; max-width: 100%; min-width: 0; padding-bottom: 14px; border-bottom: 1px solid var(--studio-border-subtle); box-sizing: border-box; }
.build-queue-title-group { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 260px; }
.build-queue-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--studio-text-primary); line-height: 1.25; }
.build-queue-subtitle { margin: 0; font-size: 13px; color: var(--studio-text-secondary); line-height: 1.4; }
.build-queue-header-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 100%; min-width: 0; flex-shrink: 0; }
.build-queue-summary-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; min-width: 0; }
.build-queue-stat { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; border-radius: var(--studio-radius-md); background: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); font-size: 12px; font-weight: 600; white-space: nowrap; }
.build-queue-stat-label { color: var(--studio-text-secondary); }
.build-queue-stat-value { font-family: var(--studio-font-mono); font-size: 13px; font-weight: 700; color: var(--studio-text-primary); font-variant-numeric: tabular-nums; }
.build-queue-refresh-indicator { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 11px; border-radius: var(--studio-radius-full); background: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); font-family: var(--studio-font-mono); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.build-queue-live-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background-color: var(--studio-accent-emerald); box-shadow: 0 0 8px rgba(16, 185, 129, 0.7); }
.build-queue-new-build-btn,
.bq-new-build-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: var(--studio-radius-md); background: linear-gradient( 135deg, #00a572, #10b981); border: 1px solid rgba(52, 211, 153, 0.65); color: var(--studio-accent-emerald-on); font-family: var(--studio-font-sans); font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; box-shadow: 0 0 16px rgba(16, 185, 129, 0.25); transition: filter var(--studio-transition-fast), transform var(--studio-transition-fast); }
.build-queue-new-build-btn:hover,
.bq-new-build-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.build-queue-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; width: 100%; max-width: 100%; min-width: 0; }
.build-queue-filter-tabs { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--studio-radius-md); background: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); max-width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; box-sizing: border-box; }
.build-queue-filter-tab { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 12px; border: 1px solid transparent; border-radius: var(--studio-radius-sm); background: transparent; color: var(--studio-text-secondary); font-family: var(--studio-font-sans); font-size: 12.5px; font-weight: 600; white-space: nowrap; flex-shrink: 0; cursor: pointer; transition: background-color var(--studio-transition-fast), color var(--studio-transition-fast), border-color var(--studio-transition-fast); }
.build-queue-filter-tab:hover { color: var(--studio-text-primary); background: var(--studio-bg-elevated); }
.build-queue-filter-tab[aria-selected=true],
.build-queue-filter-tab.is-active { background: var(--studio-bg-card); border-color: rgba(59, 130, 246, 0.45); color: var(--studio-text-primary); }
.build-queue-filter-tab[aria-selected=true]::after,
.build-queue-filter-tab.is-active::after { content: ""; position: absolute; inset: auto 10px 0 10px; border-block-end: 2px solid var(--studio-accent-blue-light); }
.build-queue-filter-tab:focus-visible,
.build-queue-mine-toggle:focus-visible,
.build-queue-new-build-btn:focus-visible,
.bq-new-build-btn:focus-visible,
.build-queue-retry-btn:focus-visible,
.build-queue-table-wrap:focus-visible { outline: 2px solid var(--studio-border-focus-ring); outline-offset: 2px; box-shadow: var(--studio-focus-glow); }
.build-queue-mine-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 14px; border-radius: var(--studio-radius-full); background: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-secondary); font-family: var(--studio-font-sans); font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: all var(--studio-transition-fast); }
.build-queue-mine-toggle:hover { border-color: var(--studio-border-highlight); color: var(--studio-text-primary); }
.build-queue-mine-toggle[aria-pressed=true],
.build-queue-mine-toggle.is-active { background: var(--studio-status-info-bg); border-color: var(--studio-status-info-border); color: var(--studio-status-info-fg); }
.build-queue-mine-toggle[hidden],
.build-queue-mine-toggle.hidden { display: none !important; }
.build-queue-error-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; width: 100%; max-width: 100%; padding: 10px 14px; border-radius: var(--studio-radius-md); background: var(--studio-status-warn-bg); border: 1px solid var(--studio-status-warn-border); color: var(--studio-status-warn-fg); font-size: 12.5px; font-weight: 500; box-sizing: border-box; }
.build-queue-error-banner[hidden],
.build-queue-error-banner.hidden { display: none !important; }
.build-queue-error-content { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 220px; }
.build-queue-retry-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 14px; border-radius: var(--studio-radius-sm); background: rgba(245, 158, 11, 0.16); border: 1px solid var(--studio-status-warn-border); color: #fef3c7; font-family: var(--studio-font-sans); font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.build-queue-retry-btn:hover { background: rgba(245, 158, 11, 0.28); }
.build-queue-table-wrap { width: 100%; max-width: 100%; min-width: 0; flex-shrink: 0; overflow-x: auto; overflow-y: visible; background: var(--studio-bg-surface); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-lg); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); box-sizing: border-box; -webkit-overflow-scrolling: touch; }
.build-queue-table-wrap[hidden],
.build-queue-table-wrap.hidden { display: none !important; }
.build-queue-table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 13px; color: var(--studio-text-primary); }
.build-queue-table thead th { position: sticky; top: 0; z-index: 2; padding: 11px 14px; background: var(--studio-bg-elevated); border-bottom: 1px solid var(--studio-border-subtle); color: #cbd5e1; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
.build-queue-table tbody tr { transition: background-color var(--studio-transition-fast); }
.build-queue-table tbody tr:hover { background: rgba(34, 49, 77, 0.45); }
.build-queue-table tbody td { padding: 10px 14px; border-bottom: 1px solid var(--studio-border-muted); vertical-align: middle; }
.build-queue-table tbody tr:last-child td { border-bottom: none; }
.bq-row-title-btn,
.bq-row-title-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 2px; border: none; background: transparent; color: var(--studio-text-primary); font-family: var(--studio-font-sans); font-size: 13.5px; font-weight: 700; text-align: left; text-decoration: none; cursor: pointer; }
.bq-row-title-btn:hover,
.bq-row-title-link:hover { color: var(--studio-accent-blue-light); text-decoration: underline; text-underline-offset: 3px; }
.bq-row-title-btn:focus-visible,
.bq-row-title-link:focus-visible,
.bq-action-btn:focus-visible { outline: 2px solid var(--studio-border-focus-ring); outline-offset: 2px; border-radius: var(--studio-radius-sm); }
.bq-row-subtext { display: block; font-size: 11.5px; color: var(--studio-text-secondary); line-height: 1.35; }
.bq-cell-mono { font-family: var(--studio-font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bq-version-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--studio-radius-full); background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); color: #cbd5e1; font-family: var(--studio-font-mono); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.bq-version-badge--revision { background: var(--studio-accent-violet-container); border-color: rgba(167, 139, 250, 0.55); color: #ddd6fe; }
.bq-progress-wrap { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.bq-progress-track { flex: 1 1 auto; height: 7px; border-radius: var(--studio-radius-full); background: var(--studio-bg-root); border: 1px solid var(--studio-border-muted); overflow: hidden; }
.bq-progress-fill { height: 100%; border-radius: var(--studio-radius-full); background: linear-gradient( 90deg, var(--studio-accent-blue), var(--studio-accent-emerald)); transition: width 0.25s ease; }
.bq-progress-fill.is-warning { background: var(--studio-accent-amber); }
.bq-progress-fill.is-error { background: var(--studio-accent-rose); }
.bq-progress-pct { font-family: var(--studio-font-mono); font-size: 11.5px; font-weight: 700; color: #cbd5e1; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.bq-health-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--studio-radius-full); font-size: 11.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; border: 1px solid transparent; }
.bq-health-pill .material-symbols-outlined,
.bq-health-icon { font-size: 14px; line-height: 1; flex-shrink: 0; }
.bq-health-pill--green { background: var(--studio-status-ok-bg); border-color: var(--studio-status-ok-border); color: var(--studio-status-ok-fg); }
.bq-health-pill--yellow { background: var(--studio-status-warn-bg); border-color: var(--studio-status-warn-border); color: var(--studio-status-warn-fg); }
.bq-health-pill--red { background: var(--studio-status-err-bg); border-color: var(--studio-status-err-border); color: var(--studio-status-err-fg); }
.bq-health-pill--queued { background: var(--studio-status-info-bg); border-color: var(--studio-status-info-border); color: var(--studio-status-info-fg); }
.bq-action-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 6px 12px; border-radius: var(--studio-radius-md); background: var(--studio-bg-card); border: 1px solid var(--studio-border-subtle); color: var(--studio-text-primary); font-family: var(--studio-font-sans); font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: all var(--studio-transition-fast); }
.bq-action-btn:hover:not(:disabled):not([aria-disabled=true]) { background: var(--studio-bg-card-hover); border-color: var(--studio-border-highlight); color: #ffffff; }
.bq-action-btn--primary { background: rgba(59, 130, 246, 0.2); border-color: rgba(96, 165, 250, 0.6); color: #dbeafe; }
.bq-action-btn--attention { background: var(--studio-status-warn-bg); border-color: var(--studio-status-warn-border); color: var(--studio-status-warn-fg); }
.bq-action-btn:disabled,
.bq-action-btn[aria-disabled=true],
.bq-action-btn.is-readonly { opacity: 0.65; background: var(--studio-status-muted-bg); border-color: var(--studio-status-muted-border); color: var(--studio-status-muted-fg); cursor: not-allowed; }
.bq-row--readonly td { opacity: 0.88; }
.bq-readonly-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: var(--studio-radius-full); background: var(--studio-status-muted-bg); border: 1px solid var(--studio-status-muted-border); color: var(--studio-status-muted-fg); font-size: 10.5px; font-weight: 600; white-space: nowrap; }
@keyframes bqRowHighlightPulse {
  0%, 100% { background-color: rgba(56, 189, 248, 0.16); box-shadow: inset 3px 0 0 var(--studio-border-focus-ring); }
  50% { background-color: rgba(56, 189, 248, 0.28); box-shadow: inset 4px 0 0 #7dd3fc; }
}
.bq-row--highlighted { animation: bqRowHighlightPulse 1.8s ease-in-out 2; background-color: rgba(56, 189, 248, 0.14); box-shadow: inset 3px 0 0 var(--studio-border-focus-ring); }
@keyframes bqSkeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.build-queue-skeleton { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 100%; }
.build-queue-skeleton[hidden],
.build-queue-skeleton.hidden { display: none !important; }
.build-queue-skeleton-row { width: 100%; height: 54px; border-radius: var(--studio-radius-md); border: 1px solid var(--studio-border-subtle); background: linear-gradient( 90deg, var(--studio-bg-surface) 25%, var(--studio-bg-card) 50%, var(--studio-bg-surface) 75%); background-size: 200% 100%; animation: bqSkeletonShimmer 1.4s ease-in-out infinite; }
.build-queue-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; width: 100%; max-width: 100%; padding: 40px 24px; border-radius: var(--studio-radius-lg); background: var(--studio-bg-surface); border: 1px dashed var(--studio-border-subtle); color: var(--studio-text-secondary); box-sizing: border-box; }
.build-queue-empty[hidden],
.build-queue-empty.hidden { display: none !important; }
.build-queue-empty-title,
.bq-empty-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--studio-text-primary); }
.build-queue-empty-desc,
.bq-empty-copy { margin: 0; max-width: 440px; font-size: 13px; color: var(--studio-text-secondary); }
.bq-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; width: 100%; }
.bq-empty-icon { width: 48px; height: 48px; border-radius: var(--studio-radius-full); background: var(--studio-bg-elevated); border: 1px solid var(--studio-border-subtle); color: var(--studio-accent-blue-light); display: flex; align-items: center; justify-content: center; }
.bq-empty-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; }
@media (min-width: 1280px) {
  .build-queue-table { min-width: 100%; }
}
@media (max-width: 768px) {
  #studio-workspace[data-build-subview=queue] #studio-build-queue-view { padding: 14px 12px 24px; }
  .build-queue-header-meta { width: 100%; justify-content: flex-start; }
  .build-queue-filter-tab,
  .build-queue-mine-toggle,
  .studio-back-to-queue-btn { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-tab-badge-dot--attention,
  .bq-row--highlighted,
  .build-queue-skeleton-row { animation: none; }
}
/* frontend/css/studio/workspace-admin-hub.css */
.studio-btn-admin-shortcut { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; color: #e0e7ff; background: linear-gradient( 135deg, rgba(99, 102, 241, 0.2), rgba(59, 130, 246, 0.22)); border: 1px solid rgba(129, 140, 248, 0.45); border-radius: var(--studio-radius-md, 8px); padding: 2px 8px; min-height: 24px; text-decoration: none; white-space: nowrap; flex-shrink: 0; transition: all var(--studio-transition-fast, 0.15s ease); }
.studio-btn-admin-shortcut:hover { color: #ffffff; border-color: #818cf8; background: linear-gradient( 135deg, rgba(99, 102, 241, 0.36), rgba(59, 130, 246, 0.36)); }
.studio-btn-admin-shortcut:focus-visible,
.studio-admin-shortcut-tile:focus-visible { outline: 2px solid var(--studio-border-focus-ring, #38bdf8); outline-offset: 2px; }
.studio-btn-admin-shortcut.hidden,
.studio-btn-admin-shortcut[hidden] { display: none !important; }
.studio-learning-pref-box { display: flex; flex-direction: column; gap: 8px; background: var(--studio-bg-surface, #0f1624); border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-md, 10px); padding: 12px 14px; }
.studio-learning-pref-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.studio-learning-pref-toggle-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--studio-text-primary, #f1f5f9); cursor: pointer; min-height: 24px; }
.studio-learning-pref-toggle-label input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--studio-accent-emerald, #10b981); cursor: pointer; }
.studio-learning-pref-toggle-label input[type=checkbox]:disabled { opacity: 0.45; cursor: not-allowed; }
.studio-learning-pref-note { font-size: 11.5px; line-height: 1.4; color: var(--studio-text-secondary, #94a3b8); }
.studio-admin-shortcuts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.studio-admin-shortcut-tile { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 6px 10px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease; }
.studio-admin-shortcut-tile:hover { border-color: var(--studio-accent-blue, #3b82f6); background: rgba(59, 130, 246, 0.14); }
dialog#studio-org-members-modal { width: min(740px, calc(100vw - 28px)); max-height: calc(100dvh - 32px); padding: 0; margin: auto; border: none; background: transparent; color: var(--studio-text-primary, #f1f5f9); }
dialog#studio-org-members-modal:not([open]) { display: none; }
dialog#studio-org-members-modal::backdrop { background: var(--studio-bg-overlay, rgba(8, 12, 20, 0.88)); backdrop-filter: blur(10px); }
.org-members-role-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; padding: 10px 12px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-root, #080c14); border: 1px solid var(--studio-border-subtle, #263654); font-size: 11.5px; color: var(--studio-text-secondary, #94a3b8); }
.org-members-role-guide strong { color: var(--studio-text-primary, #f1f5f9); }
.org-members-readonly-banner { padding: 9px 12px; border-radius: var(--studio-radius-md, 10px); background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.45); color: #fde68a; font-size: 12px; font-weight: 600; }
.org-invite-bar { display: grid; grid-template-columns: 1.3fr 1fr auto auto; gap: 8px; align-items: center; padding: 8px; border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-root, #080c14); border: 1px solid var(--studio-border-subtle, #263654); }
.org-invite-bar input,
.org-invite-bar select { min-height: 36px; padding: 6px 10px; border-radius: var(--studio-radius-sm, 6px); background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); font-size: 12.5px; }
.org-invite-bar input:disabled,
.org-invite-bar select:disabled,
.org-invite-bar button:disabled { opacity: 0.45; cursor: not-allowed; }
.org-members-list-box { display: flex; flex-direction: column; border: 1px solid var(--studio-border-subtle, #263654); border-radius: var(--studio-radius-md, 10px); background: var(--studio-bg-root, #080c14); max-height: 320px; overflow-y: auto; }
.org-member-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid rgba(38, 54, 84, 0.45); }
.org-member-row:last-child { border-bottom: none; }
.org-member-identity { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.org-member-avatar { width: 32px; height: 32px; border-radius: 9999px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); }
.org-member-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.org-member-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.org-member-name { font-size: 13px; font-weight: 700; color: var(--studio-text-primary, #f1f5f9); }
.org-member-email { font-size: 11.5px; color: var(--studio-text-secondary, #94a3b8); overflow-wrap: anywhere; }
.org-member-role-summary { font-size: 11px; color: var(--studio-text-muted, #64748b); }
.org-role-chip { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 9999px; background: rgba(59, 130, 246, 0.18); border: 1px solid rgba(59, 130, 246, 0.4); color: #93c5fd; }
.org-role-chip.role-owner { background: rgba(139, 92, 246, 0.2); border-color: rgba(139, 92, 246, 0.45); color: #c4b5fd; }
.org-role-chip.role-developer { background: rgba(16, 185, 129, 0.16); border-color: rgba(16, 185, 129, 0.4); color: #6ee7b7; }
.org-role-chip.role-viewer { background: rgba(100, 116, 139, 0.2); border-color: rgba(100, 116, 139, 0.4); color: #cbd5e1; }
.org-member-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.org-member-role-select,
.org-member-btn { min-height: 32px; padding: 4px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--studio-bg-elevated, #162032); border: 1px solid var(--studio-border-subtle, #263654); color: var(--studio-text-primary, #f1f5f9); cursor: pointer; }
.org-member-btn-danger { color: #fda4af; border-color: rgba(244, 63, 94, 0.4); }
.org-member-btn-danger:disabled,
.org-member-role-select:disabled { opacity: 0.4; cursor: not-allowed; }
.org-members-empty { padding: 18px; text-align: center; font-size: 12.5px; color: var(--studio-text-secondary, #94a3b8); }
@media (max-width: 640px) {
  .studio-admin-shortcuts-grid,
  .org-members-role-guide,
  .org-invite-bar { grid-template-columns: 1fr; }
  .org-member-row { flex-direction: column; align-items: flex-start; }
  .org-member-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
}
/* frontend/css/studio/index.css */
