.project-setup { display: block; }
.setup-main { min-width: 0; }
.setup-section { margin: 0 0 20px; padding: 28px; border: 1px solid #e1e7ee; border-radius: 14px; background: #fff; }
.setup-section-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 28px; }
.setup-step { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; background: #f0f4f8; color: #65748a; font-size: 12px; font-weight: 700; }
.setup-section h2 { margin: 0; font-size: 18px; line-height: 1.5; }
.setup-section-heading p { margin: 4px 0 0; color: #65748a; font-size: 13px; line-height: 1.6; }
.setup-field { min-width: 0; margin-bottom: 24px; }
.setup-field:last-child { margin-bottom: 0; }
.setup-field label, .workflow-fieldset legend { display: block; margin-bottom: 10px; color: #35465e; font-size: 13px; font-weight: 700; }
.required-mark { color: #21846d; }
.optional-label { margin-left: 8px; color: #748398; font-size: 11px; font-weight: 400; }
.setup-field input, .setup-field textarea { width: 100%; padding: 12px 14px; border: 1px solid #cdd7e3; border-radius: 8px; background: #fff; color: #24354d; font: 14px/1.5 'DM Sans', system-ui, sans-serif; }
.setup-field input::placeholder { color: #748398; }
.setup-field textarea { min-height: 110px; resize: vertical; }
.setup-field small { display: block; margin-top: 8px; color: #65748a; font-size: 12px; line-height: 1.6; }
.setup-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-bottom: 24px; }
.setup-field-grid .setup-field { margin-bottom: 0; }
.workflow-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.workflow-options { display: grid; gap: 12px; }
.workflow-option { display: flex; align-items: flex-start; gap: 12px; padding: 17px; border: 1px solid #dce3ec; border-radius: 9px; cursor: pointer; }
.workflow-option:has(input:checked) { border-color: #21846d; background: #f3faf6; box-shadow: 0 0 0 1px #21846d; }
.workflow-option input, .setup-checkbox input { flex: none; width: 17px; height: 17px; margin: 2px 0 0; accent-color: #21846d; }
.workflow-option strong, .setup-checkbox strong { display: block; font-size: 13px; }
.workflow-option small, .setup-checkbox small { display: block; margin-top: 5px; color: #65748a; font-size: 12px; line-height: 1.6; }
.workflow-route { display: block; margin-top: 10px; color: #43536b; font-size: 12px; line-height: 1.8; }
.setup-checkbox { display: flex; align-items: flex-start; gap: 13px; cursor: pointer; }
.setup-checkbox + .setup-checkbox { margin-top: 18px; padding-top: 18px; border-top: 1px solid #edf1f5; }
.setup-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; }
.setup-actions > p { color: #65748a; font-size: 12px; }
.setup-actions > div { display: flex; gap: 10px; }
.setup-errors { margin-bottom: 20px; padding: 20px; border: 1px solid #e9bbc0; border-radius: 10px; background: #fff5f5; color: #a12c3e; }
.setup-errors h2 { margin: 0; font-size: 16px; }
.setup-errors ul, .setup-field .errorlist, .workflow-fieldset .errorlist { padding-left: 18px; font-size: 12px; line-height: 1.7; }
.setup-errors a { text-decoration: underline; }
.setup-field .errorlist, .workflow-fieldset .errorlist { margin-bottom: 0; color: #a12c3e; }
.has-errors input, .has-errors textarea { border-color: #c14455; }
.setup-field :disabled { background: #f4f6f9; color: #65748a; cursor: not-allowed; }
.setup-workflow-note { margin: 12px 0 0; color: #65748a; font-size: 12px; line-height: 1.7; }

.app-page dialog.project-dialog { position: fixed; inset: 0; box-sizing: border-box; width: min(1080px, calc(100vw - 32px)); max-width: 1080px; max-height: calc(100dvh - 48px); height: fit-content; margin: auto; padding: 0; border: 1px solid #dce3ec; border-radius: 12px; background: #f8fafc; color: #24354d; box-shadow: 0 24px 80px #172b4d40; overflow: hidden; }
.project-dialog::backdrop { background: #172b4d66; }
.project-dialog[open] { display: flex; flex-direction: column; }
.project-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: none; padding: 16px 24px; border-bottom: 1px solid #dce3ec; background: #fff; }
.project-dialog-heading h2 { margin: 0; font-size: 18px; }
.project-dialog-heading button { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #65748a; font-size: 24px; cursor: pointer; }
.project-dialog-body { min-height: 0; padding: 20px 24px; overflow-y: auto; overscroll-behavior: contain; }
.project-dialog .setup-section { padding: 20px; margin-bottom: 16px; }
.project-dialog .setup-section-heading { margin-bottom: 20px; }
.project-dialog .workspace-primary, .project-dialog .workspace-secondary { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 36px; padding: 8px 14px; border: 1px solid #dce3ec; border-radius: 6px; background: #fff; color: #24354d; font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; }
.project-dialog .workspace-primary { border-color: #216bb0; background: #216bb0; color: #fff; }
.project-dialog .workspace-primary:disabled { opacity: .6; cursor: wait; }
.project-dialog [data-project-dialog-error] { padding: 12px; border-radius: 6px; background: #fff5f5; color: #a12c3e; }
@media (max-width: 1000px) { .setup-field-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .project-dialog-body { padding: 16px; } .project-dialog .setup-actions { align-items: stretch; flex-direction: column; } .project-dialog .setup-actions > div { display: flex; flex-wrap: wrap; } }
