.attempt-confirmation { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:16px; padding:12px 14px; }
.attempt-confirmation[hidden] { display:none; }
.attempt-confirmation p { margin:3px 0 0; color:var(--gray-700); }
.attempt-confirmation-actions { display:flex; flex-wrap:wrap; gap:8px; }
@media(max-width:640px) { .attempt-confirmation { align-items:flex-start; flex-direction:column; } }
.source-config-workspace,.component-toolbar { min-width:0; }
.source-config-dialog { width:min(960px,calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 32px); padding:0; border:1px solid var(--gray-300); border-radius:4px; color:var(--gray-800); }
.source-config-dialog::backdrop { background:rgb(0 0 0 / 42%); }
.source-config-dialog-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; border-bottom:1px solid var(--gray-200); }
.source-config-dialog-header h2 { margin:0; font-size:18px; }
.source-config-dialog-body { padding:16px 18px; max-height:calc(100dvh - 180px); overflow:auto; }
.upload-dialog-workflow { margin:0; padding:0 18px 18px; max-height:calc(100dvh - 230px); overflow:auto; overscroll-behavior:contain; }
.source-config-dialog .source-config-dialog-body:has(+ .upload-dialog-workflow:not([hidden])) { padding-bottom:0; }
@media(max-width:640px) { .upload-dialog-workflow { padding:0 12px 12px; max-height:calc(100dvh - 270px); } }
.upload-dialog-workflow[hidden] { display:none; }
.upload-dialog-workflow .workflow-strip { margin-bottom:12px; }
.source-config-dialog .source-tabs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.source-config-dialog .source-heading { display:flex; align-items:center; gap:10px; margin:8px 0; }
.source-config-dialog .source-heading h3 { margin:0; font-size:16px; }
.source-config-dialog #source-config-form { padding:8px 0 0; }
.source-config-dialog .source-controls { display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }
.source-config-workspace { margin:0 0 14px; }
@media(max-width:640px) { .source-config-dialog { width:calc(100vw - 20px); max-height:calc(100dvh - 20px); } .source-config-dialog-body { padding:12px; max-height:calc(100dvh - 130px); } .source-config-dialog .source-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); } }
.source-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 18px; }
.source-tabs .btn { min-width:88px; }
.source-heading { display:flex; align-items:center; gap:12px; margin:12px 0; }
.source-heading h2 { margin:0; font-size:18px; }
.source-config-workspace #source-config-form { padding:16px 0 24px; }
.source-config-workspace .form-grid,.component-modal .form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.source-config-workspace .field,.component-modal .field { min-width:0; }
.source-config-workspace input,.source-config-workspace select,.source-config-workspace textarea,.component-modal input:not([type=checkbox]),.component-modal select,.component-modal textarea { width:100%; max-width:100%; }
.source-controls,.component-actions { display:flex; justify-content:flex-end; gap:8px; margin:16px 0; }
.source-message { min-height:24px; color:var(--gray-700); }
.component-toolbar { display:flex; align-items:end; flex-wrap:wrap; gap:12px; margin:18px 0; }
.component-toolbar .field { flex:1 1 180px; max-width:300px; }
.component-toolbar .btn { margin-left:auto; }
.component-workspace { display:grid; grid-template-columns:210px minmax(0,1fr); gap:20px; align-items:start; margin-top:12px; }
.component-categories { display:grid; gap:3px; padding:8px 0; border-right:1px solid var(--gray-200); }
.component-category { display:flex; justify-content:space-between; align-items:center; gap:8px; min-height:40px; padding:8px 14px; border:0; border-left:3px solid transparent; background:transparent; color:var(--gray-700); text-align:left; cursor:pointer; }
.component-category:hover { background:var(--gray-100); }
.component-category.active { border-left-color:var(--primary); background:var(--primary-light); color:var(--primary); font-weight:600; }
.component-category-count { color:var(--gray-500); font-size:12px; }
.component-results { min-width:0; }
.component-results-head { display:flex; align-items:center; gap:12px; margin:4px 0 14px; }
.component-results-head h2 { margin:0; font-size:18px; }
.component-results-head span { color:var(--gray-500); font-size:13px; }
.component-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.component-item { display:flex; flex-direction:column; min-width:0; min-height:170px; padding:16px; border:1px solid var(--gray-200); border-radius:6px; background:#fff; }
.component-item-category { align-self:flex-start; color:var(--primary); background:var(--primary-light); padding:2px 7px; font-size:12px; }
.component-item h3 { margin:10px 0 6px; font-size:16px; overflow-wrap:anywhere; }
.component-item p { margin:0 0 16px; color:var(--gray-600); font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.component-item-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:auto; }
.component-modal .modal-b > h4 { margin:18px 0 10px; }
@media(max-width:1100px){.component-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.component-workspace{grid-template-columns:minmax(0,1fr)}.component-categories{display:flex; overflow-x:auto; border-right:0; border-bottom:1px solid var(--gray-200); padding:0 0 8px}.component-category{flex:none; white-space:nowrap; border-left:0; border-bottom:3px solid transparent}.component-category.active{border-bottom-color:var(--primary)}.component-grid{grid-template-columns:minmax(0,1fr)}}
.component-modal { width:min(940px,calc(100vw - 30px)); max-height:calc(100vh - 32px); overflow:auto; }
.component-modal .field-wide { grid-column:1/-1; }
.component-params-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:20px 0 10px; }
.component-params-heading h4 { font-size:15px; margin:0; }
.component-editor-tabs { display:flex; gap:18px; margin:18px 0 10px; border-bottom:1px solid var(--gray-200); }
.component-editor-tab { position:relative; padding:8px 0; border:0; background:transparent; color:var(--gray-600); cursor:pointer; }
.component-editor-tab.active { color:var(--primary); font-weight:600; }
.component-editor-tab.active::after { position:absolute; right:0; bottom:-1px; left:0; height:2px; background:var(--primary); content:""; }
.component-editor-panel[hidden] { display:none; }
.component-code-label { display:block; margin:10px 0 8px; color:var(--gray-600); font-size:13px; }
.component-code-editor { min-height:260px; resize:vertical; font:13px/1.65 Consolas,"Courier New",monospace; background:#111!important; color:#f5f5f5!important; border-color:#333!important; }
.component-code-editor::placeholder { color:#aaa; }
.component-examples-editor { min-height:220px; resize:vertical; }
.component-modal .tbl input[type=checkbox] { width:18px; height:18px; }
.component-modal .tbl input:not([type=checkbox]) { min-width:100px; }
.component-modal .tbl th:nth-child(5),.component-modal .tbl td:nth-child(5) { min-width:150px; }
@media(max-width:640px){.source-config-workspace .form-grid,.component-modal .form-grid{grid-template-columns:minmax(0,1fr)}.component-toolbar .field{max-width:none}.component-toolbar .btn{margin-left:0}.source-tabs .btn{flex:1 1 85px}}
