.profile-toolbar { display:flex; align-items:end; flex-wrap:wrap; gap:12px; margin:16px 0; }
.profile-toolbar label { margin:0; flex:0 1 260px; min-width:140px; }
.profile-toolbar .button { flex:none; }
#review-profile-editor { max-width:1680px; }
.profile-workspace { display:grid; grid-template-columns:250px minmax(0, 1fr); gap:24px; align-items:start; }
.profile-sidebar { position:sticky; top:95px; max-height:calc(100dvh - 115px); overflow:auto; padding:16px; border:1px solid var(--border, #39434e); border-radius:14px; background:var(--surface, #1e252d); }
.profile-sidebar > label { margin-top:0; }
.profile-team-readonly { padding:4px 0 12px; }
.profile-team-readonly strong { display:block; margin-top:10px; font-size:16px; overflow-wrap:anywhere; }
.profile-list-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:20px 0 12px; }
.profile-list { display:flex; flex-direction:column; gap:8px; max-height:65vh; overflow:auto; padding:3px; }
.profile-list-item { display:block; width:100%; text-align:left; padding:12px; border:1px solid transparent; border-radius:10px; background:transparent; color:var(--ink); cursor:pointer; overflow-wrap:anywhere; }
.profile-list-item strong, .profile-list-item small { display:block; }
.profile-list-item small { margin-top:5px; color:var(--muted, #a0aab7); }
.profile-list-item:hover { background:var(--panel, #252e38); }
.profile-list-item[aria-current="true"] { border-color:var(--accent, #a6cbb9); background:var(--panel, #252e38); }
.profile-list-item:focus-visible { outline:2px solid var(--accent, #a6cbb9); outline-offset:1px; }
.profile-detail { min-width:0; }
.profile-detail > section > .profile-toolbar:first-child { margin-top:0; }
.profile-empty { padding:48px 24px; text-align:center; border:1px dashed var(--border, #39434e); border-radius:14px; }
.profile-create-modal { width:min(560px, calc(100vw - 32px)); max-height:calc(100dvh - 48px); overflow:auto; }
.profile-create-modal form { margin:0; }
.profile-create-modal fieldset { border:0; margin:0; padding:0; min-width:0; }
.profile-create-modal .inline-actions { justify-content:flex-end; gap:12px; }
.profile-create-modal [data-profile-create-error]:empty { display:none; }
.profile-create-modal [data-profile-create-error] { color:var(--danger, #e8a29c); }
@media (max-width:1100px) {
    .profile-workspace { grid-template-columns:1fr; }
    .profile-sidebar { position:static; max-height:none; overflow:visible; }
    .profile-list { max-height:240px; }
}
.profile-graph { border:1px solid var(--border, #39434e); border-radius:14px; background:var(--surface, #1e252d); margin:20px 0; }
.profile-stage-board { width:100%; min-width:0; }
.profile-stage-column { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr)); gap:12px; min-width:0; padding:16px; }
.profile-stage-header { grid-column:1 / -1; display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:4px; }
.profile-stage-header h3 { margin:0; font-size:14px; }
.profile-stage-add, .profile-stage-remove { position:relative; display:grid; place-items:center; flex:none; width:28px; height:28px; padding:0; border:1px solid var(--border, #39434e); border-radius:50%; color:var(--ink); background:transparent; cursor:pointer; font-size:0; line-height:1; }
.profile-stage-add::before, .profile-stage-remove::before, .profile-stage-add::after { content:""; position:absolute; top:50%; left:50%; width:12px; height:2px; border-radius:1px; background:currentColor; transform:translate(-50%, -50%); }
.profile-stage-add::after { width:2px; height:12px; }
.profile-stage-add:hover, .profile-stage-remove:hover { background:var(--panel, #252e38); border-color:var(--accent, #a6cbb9); }
.profile-stage-card { display:flex; align-items:start; gap:8px; min-width:0; border:1px solid var(--border, #39434e); border-radius:10px; margin:0; padding:14px; background:var(--panel, #252e38); }
.profile-stage-settings { flex:1; min-width:0; padding:4px; text-align:left; border:0; background:transparent; color:var(--ink); cursor:pointer; overflow-wrap:anywhere; font-weight:600; }
.profile-stage-settings small { display:block; margin-top:8px; color:var(--muted, #a0aab7); font-size:11px; font-weight:400; }
.profile-stage-add:disabled, .profile-stage-remove:disabled, .profile-stage-settings:disabled { cursor:default; opacity:.5; }
.profile-stage-card:focus-within { outline:2px solid var(--accent, #a6cbb9); outline-offset:2px; }
.profile-integration-choice { display:flex; align-items:center; gap:8px; }
.profile-integration-choice input[type="checkbox"] { width:18px; height:18px; margin:0; }
[data-profile-node-prompt] { width:100%; min-height:160px; resize:vertical; }
.profile-focus-policy label { flex-basis:180px; }
.profile-repositories { padding:18px; margin:20px 0; border:1px solid var(--border, #39434e); border-radius:14px; }
.profile-repository-list { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:10px; max-height:320px; overflow:auto; margin-bottom:16px; }
.profile-repository-option { display:flex; align-items:center; gap:10px; padding:12px; margin:0; background:var(--surface, #1e252d); border:1px solid var(--border, #39434e); border-radius:10px; cursor:pointer; }
.profile-repository-option input[type="checkbox"] { width:18px; height:18px; flex:none; margin:0; }
.profile-repository-option span { min-width:0; overflow-wrap:anywhere; }
.profile-repository-option small { display:block; color:var(--muted, #a0aab7); margin-top:4px; }
.profile-repository-option:has(input:checked) { border-color:#a6cbb9; }
#review-profile-editor fieldset { min-width:0; border:0; padding:0; }
#review-profile-editor [data-profile-status] { min-height:1.5em; }
@media (max-width:700px) { .profile-toolbar label { flex:1 1 100%; } }
