/* Shared Agent Factory controls within the existing Labs workspace. */
.builder-page .factory-model-shortcut { font-family:inherit; cursor:pointer; }
.builder-page .factory-model-picker { margin:0 0 24px; padding:20px; border:1px solid #ded7ef; border-radius:14px; background:linear-gradient(140deg,#faf8ff,#fff 72%); scroll-margin-top:20px; }
.builder-page .factory-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.builder-page .factory-section-head h3,.builder-page .factory-workflow-intro h3 { margin:4px 0 0; font-size:18px; font-weight:750; line-height:1.3; color:#2f2640; }
.builder-page .factory-eyebrow { display:block; color:#88749e; font-size:9px; font-weight:750; text-transform:uppercase; letter-spacing:.09em; }
.builder-page .factory-shared-badge { flex-shrink:0; padding:5px 7px; border:1px solid #e3dcf2; border-radius:6px; background:#fff; color:#7f6899; font-size:9px; font-weight:650; white-space:nowrap; }
.builder-page .factory-intro { color:#786784; font-size:11.5px; line-height:1.65; margin:0 0 16px; }
.builder-page .factory-provider-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; }
.builder-page .factory-provider-grid button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; min-width:0; min-height:97px; padding:12px 4px 10px; border:1px solid #e2ddec; border-radius:9px; background:#fff; cursor:pointer; transition:background .15s,border-color .15s; font-family:inherit; }
.builder-page .factory-provider-grid button:hover { border-color:#b3a0d3; background:#faf8fe; }
.builder-page .factory-provider-grid button[aria-pressed="true"],.builder-page .factory-provider-grid button.on { border-color:#9573c5; background:#f0eafb; box-shadow:0 0 0 1px #cdbce5; }
.builder-page .factory-provider-grid img { object-fit:contain; width:26px; height:26px; margin-bottom:3px; }
.builder-page .factory-provider-grid strong { color:#443452; font-size:11px; font-weight:700; }
.builder-page .factory-provider-grid span { color:#8b7698; font-size:8px; line-height:1.3; text-align:center; }
.builder-page .factory-grid-2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.builder-page .factory-native-controls { margin-top:16px; padding-top:15px; border-top:1px solid #e7e0ef; }
.builder-page .factory-model-status { margin-top:14px; font-size:11px; font-weight:650; line-height:1.5; color:#674b8c; }
.builder-page .factory-capability-note { margin:6px 0 0; font-size:11px; line-height:1.65; color:#786786; }
.builder-page .factory-key-note { margin:12px 0 0; padding-top:10px; border-top:1px solid #ece6f2; color:#8b7a95; font-size:10px; line-height:1.6; }
.builder-page #nativeModelControls[hidden],.builder-page #nativeVoiceWorkspace[hidden],.builder-page #legacyVoiceDetails[hidden] { display:none!important; }
.builder-page .factory-native-voice { padding:20px; border:1px solid #ded7ef; border-radius:12px; background:#f9f6fe; }
.builder-page .factory-native-voice h5 { font-size:16px; margin:7px 0 8px; color:#443451; }
.builder-page .factory-native-voice p { font-size:12px; line-height:1.7; color:#776781; margin:0 0 15px; }
.builder-page .factory-native-voice .factory-help { margin-top:14px; margin-bottom:0; }
.builder-page .factory-workflow-intro { margin:0 0 6px; }
.builder-page .factory-workflow-intro p { margin:10px 0 0; color:#75687f; font-size:12px; line-height:1.7; }
.builder-page .factory-settings-card { padding:18px; border:1px solid #e4dfec; border-radius:12px; background:#fff; margin-top:14px; min-width:0; }
.builder-page .factory-settings-card h5 { margin:0; color:#493956; font-size:13px; font-weight:750; }
.builder-page .factory-settings-card label,.builder-page .factory-native-controls label { display:block; margin-bottom:6px; color:#63516f; font-size:10.5px; font-weight:650; }
.builder-page .factory-field { margin-top:14px; }
.builder-page .factory-field small { display:block; margin-top:6px; font-size:10px; line-height:1.6; color:#8c7b97; }
.builder-page .factory-help { margin:13px 0 0; color:#84718f; font-size:10.5px; line-height:1.7; }
.builder-page .factory-settings-card .factory-check { display:flex; gap:11px; align-items:flex-start; cursor:pointer; margin:0 0 15px; }
.builder-page .factory-check input[type="checkbox"] { width:17px; height:17px; min-width:17px; min-height:17px; padding:0; margin:1px 0 0; border-radius:4px; accent-color:#8665ba; }
.builder-page .factory-check strong { display:block; color:#493956; font-size:13px; line-height:1.4; font-weight:750; }
.builder-page .factory-check small { display:block; margin-top:5px; color:#84728e; font-size:10.5px; font-weight:400; line-height:1.7; }
.builder-page .factory-budget-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.builder-page .factory-role-note { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; padding:13px 0 0; margin-top:15px; border-top:1px solid #eee8f3; }
.builder-page .factory-role-note b { display:block; color:#6e527e; font-size:10.5px; font-weight:700; }
.builder-page .factory-role-note span { display:block; margin-top:4px; color:#8f7a9b; font-size:10px; line-height:1.6; }
.builder-page .factory-rows { display:grid; gap:12px; margin-top:14px; }
.builder-page .factory-rows:empty { margin-top:0; }
.builder-page .factory-stage-card,.builder-page .factory-specialist-card { min-width:0; padding:14px; border:1px solid #e3dced; border-radius:9px; background:#fcfafe; }
.builder-page .factory-row-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.builder-page .factory-row-head strong { color:#654a7a; font-size:11px; }
.builder-page .factory-row-head .btn { padding:4px 9px; min-height:27px; font-size:10px; }
.builder-page .factory-add-button { margin-top:13px; font-size:11px; min-height:34px; }
.builder-page .factory-settings-card input,.builder-page .factory-settings-card textarea,.builder-page .factory-settings-card select,.builder-page .factory-native-controls select { min-width:0; max-width:100%; }
.builder-page .factory-provider-grid button:focus-visible,.builder-page .factory-model-shortcut:focus-visible,.builder-page .factory-settings-card button:focus-visible,.builder-page .factory-model-picker:focus-visible { outline:3px solid #b89ddf; outline-offset:3px; }
@media(max-width:640px) {
  .builder-page .factory-model-picker { padding:15px; }
  .builder-page .factory-section-head { flex-wrap:wrap; gap:8px; }
  .builder-page .factory-provider-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .builder-page .factory-provider-grid button { min-height:88px; }
  .builder-page .factory-settings-card { padding:14px; }
  .builder-page .factory-budget-grid { gap:7px; }
  .builder-page .factory-budget-grid label { font-size:9px; }
  .builder-page .factory-grid-2 { grid-template-columns:1fr; }
}
@media(prefers-reduced-motion:reduce) { .builder-page .factory-provider-grid button { transition:none; } }
html[data-theme="dark"] .builder-page .factory-model-picker,html[data-theme="dark"] .builder-page .factory-settings-card,html[data-theme="dark"] .builder-page .factory-native-voice { background:#24212b; border-color:#46394f; }
html[data-theme="dark"] .builder-page .factory-provider-grid button,html[data-theme="dark"] .builder-page .factory-shared-badge,html[data-theme="dark"] .builder-page .factory-stage-card,html[data-theme="dark"] .builder-page .factory-specialist-card { background:#2c2633; border-color:#4b3e58; }
html[data-theme="dark"] .builder-page .factory-provider-grid button[aria-pressed="true"],html[data-theme="dark"] .builder-page .factory-provider-grid button.on { background:#453456; border-color:#a78ac7; box-shadow:none; }
html[data-theme="dark"] .builder-page .factory-provider-grid strong,html[data-theme="dark"] .builder-page .factory-section-head h3,html[data-theme="dark"] .builder-page .factory-workflow-intro h3,html[data-theme="dark"] .builder-page .factory-check strong,html[data-theme="dark"] .builder-page .factory-settings-card h5,html[data-theme="dark"] .builder-page .factory-native-voice h5 { color:#e6daef; }
html[data-theme="dark"] .builder-page .factory-intro,html[data-theme="dark"] .builder-page .factory-workflow-intro p,html[data-theme="dark"] .builder-page .factory-check small,html[data-theme="dark"] .builder-page .factory-help,html[data-theme="dark"] .builder-page .factory-capability-note,html[data-theme="dark"] .builder-page .factory-key-note,html[data-theme="dark"] .builder-page .factory-native-voice p,html[data-theme="dark"] .builder-page .factory-role-note span,html[data-theme="dark"] .builder-page .factory-settings-card label { color:#c0accd; }

.builder-page #managedVoiceWorkspace[hidden], .builder-page #languagePackWorkspace[hidden], .builder-page #byokRuntimeWorkspace[hidden], .builder-page #factoryStages[hidden], .builder-page #factorySpecialists[hidden], .builder-page #factoryAddStage[hidden], .builder-page #factoryAddSpecialist[hidden] { display:none !important; }
.builder-page .factory-check small { text-transform:none; letter-spacing:normal; }
