/* Team settings: readable member actions and complete permission controls. */
/* Checkbox rows keep the label and keyboard target easy to reach. */
html body.workbench-shell .settings-checkbox-page .project-fields label:has(input[type="checkbox"]) { display:flex; align-items:center; gap:10px; min-height:44px; padding:10px 0; margin:0; box-sizing:border-box; font-weight:400; cursor:pointer; }
html body.workbench-shell .settings-checkbox-page .project-fields input[type="checkbox"] { flex:0 0 20px; width:20px; height:20px; min-height:20px; margin:0; }
html body.workbench-shell .settings-checkbox-page .project-fields label:has(input[type="checkbox"]):focus-within { outline:3px solid var(--brand,#2459bc); outline-offset:2px; border-radius:4px; }
html body.workbench-shell .workspace.team-settings-page .project-actions a:not(.primary-link),
html body.workbench-shell .workspace.team-settings-page .member-links a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 16px; border:1px solid var(--line,#d6dce5); border-radius:10px; background:var(--panel,#fff); color:var(--brand,#2459bc); font-size:14px; text-decoration:none; box-sizing:border-box; }
html body.workbench-shell .workspace.team-settings-page .project-actions a:focus-visible,
html body.workbench-shell .workspace.team-settings-page .member-links a:focus-visible { outline:3px solid var(--brand,#2459bc); outline-offset:3px; }
@media(max-width:650px) { .workspace.team-settings-page :is(a,button,input,select,textarea,summary) { scroll-margin-bottom:calc(90px + env(safe-area-inset-bottom)); } }
.workbench-shell .team-settings-page .member-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 6px; }
.workbench-shell .team-settings-page .member-links a { display: inline-flex; min-height: 44px; align-items: center; }
.workbench-shell .team-settings-page .member-management { min-width: 260px; }
.workbench-shell .team-settings-page .member-management .fields { max-width: none; margin-top: 12px; }
.workbench-shell .team-settings-page .member-management details + details { border-top: 1px solid var(--line-soft); margin-top: 10px; }
.workbench-shell .team-settings-page .member-positions { min-width: 0; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; }
.workbench-shell .team-settings-page .member-positions > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px 14px; }
.workbench-shell .team-settings-page .member-positions label,
.workbench-shell .team-settings-page .permission-option > label { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; margin: 0; padding: 10px 0; line-height: 1.65; font-weight: 400; cursor: pointer; }
.workbench-shell .team-settings-page .member-positions input[type="checkbox"],
.workbench-shell .team-settings-page .permission-option input[type="checkbox"] { flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; margin: 2px 0 0; padding: 0; }
.workbench-shell .team-settings-page .permission-option { padding: 6px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.workbench-shell .team-settings-page .permission-option:focus-within { border-color: var(--brand); }
.workbench-shell .team-settings-page .project-form { margin: 18px 0 0; }
.workbench-shell .team-settings-page .table-scroll { margin-top: 18px; }
@media (max-width: 1100px) {
  .workbench-shell .workspace.team-settings-page .member-table td.member-management { display: block; min-width: 0; padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--line-soft); }
  .workbench-shell .workspace.team-settings-page .member-table td.member-management::before { display: block; margin-bottom: 4px; }
  .workbench-shell .workspace.team-settings-page .member-management > details { max-width: none; }
}
@media (max-width: 650px) {
  .workbench-shell .team-settings-page .member-positions > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 360px) {
  .workbench-shell .team-settings-page .member-positions > div { grid-template-columns: minmax(0,1fr); }
}
/* Password and removal forms keep an explicit, unsubmitted exit. */
html body .auth-account-layout .account-back,
html body .account-password-page .account-back,
html body .auth-account-layout .account-cancel,
html body .account-password-page .account-cancel,
html body.workbench-shell .record-removal-page .project-actions a.secondary-action {
  display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;
  min-height:48px;padding:10px 16px;border:1px solid var(--line);border-radius:8px;
  background:#fff;color:var(--brand-2);font-size:14px;line-height:1.5;text-decoration:none;
}
html body .account-form-actions {display:flex;align-items:stretch;gap:12px;}
html body .account-form-actions .auth-submit {flex:1;width:auto;min-width:0;min-height:48px;margin-top:0;}
html body .account-form-actions .account-cancel {flex:0 0 auto;}
html body.workbench-shell .record-removal-page .form-confirm label {
  display:flex;align-items:center;gap:10px;min-height:44px;box-sizing:border-box;cursor:pointer;
}
html body.workbench-shell .record-removal-page .form-confirm input[type="checkbox"] {
  width:20px;height:20px;min-height:20px;margin:0;flex:0 0 20px;
}
html body .auth-account-layout .account-back:focus,
html body .account-password-page .account-back:focus,
html body .account-form-actions .account-cancel:focus,
html body.workbench-shell .record-removal-page .form-confirm label:focus-within,
html body.workbench-shell .record-removal-page .project-actions a.secondary-action:focus {
  outline:3px solid var(--brand);outline-offset:2px;
}
