/* Tab-first workspace. Patterns follow Ant Design Layout and shadcn/ui Tabs. */
:root {
  --bg: #f6f7f9;
  --ink: #222229;
  --text: #4c4c57;
  --muted: #777782;
  --line: #e7e7eb;
  --green: #74256a;
  --green-deep: #582051;
  --green-soft: #f7eef6;
  --radius: 8px;
  --shadow: none;
}
[hidden] { display: none !important; }
html { scroll-padding-top: 132px; }
.app-shell-v6 { min-height: 100vh; min-height: 100dvh; font-size: 14px; }
.app-shell-v6 :is(button, a, input, select, textarea) { scroll-margin-top: 132px; }
.app-shell-v6 h1 { font-size: 22px; line-height: 1.45; font-weight: 600; color: var(--ink); letter-spacing: -.25px; }
.app-shell-v6 h2 { font-size: 16px; line-height: 1.55; font-weight: 600; }
.app-shell-v6 h3 { font-size: 15px; line-height: 1.6; font-weight: 600; }
.app-shell-v6 .app-header {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 max(24px, calc((100% - 1392px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 21;
}
.app-shell-v6 .app-header .brand { gap: 10px; flex-shrink: 0; }
.app-shell-v6 .app-header .school-seal { width: 36px; height: 36px; }
.app-shell-v6 .app-header .brand-title { color: #29262c; font-size: 17px; font-weight: 600; letter-spacing: 0; }
.app-shell-v6 .app-header .brand-caption { font-size: 10px; line-height: 1.5; letter-spacing: .4px; color: #92909a; }
.app-shell-v6 .header-context { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; min-width: 0; padding-left: 24px; border-left: 1px solid var(--line); }
.app-shell-v6 .header-context > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-shell-v6 .header-context strong { font-size: 12px; font-weight: 500; color: #62616b; }
.app-shell-v6 .header-context .period { border: 0; padding: 0; background: transparent; color: #777782; }
.app-shell-v6 .header-account { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; flex-shrink: 0; }
.app-shell-v6 .header-account .avatar { width: 30px; height: 30px; min-width: 30px; min-height: 30px; font-size: 11px; color: var(--green); background: var(--green-soft); }
.app-shell-v6 .header-account .identity { max-width: 160px; }
.app-shell-v6 .header-account .identity strong { font-size: 12px; font-weight: 500; }
.app-shell-v6 .header-account .identity small { font-size: 11px; }
.app-shell-v6 .header-account > strong { font-size: 13px; font-weight: 500; }
.app-shell-v6 .header-account .icon-btn { width: 34px; height: 36px; min-height: 36px; border-radius: 6px; color: #85828b; }
.app-shell-v6 .header-account .icon-btn .icon { width: 17px; height: 17px; }
.app-shell-v6 .workspace-tabs {
  display: flex;
  align-items: stretch;
  gap: 30px;
  min-height: 50px;
  padding: 0 max(24px, calc((100% - 1392px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 64px;
  z-index: 20;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}
.app-shell-v6 .workspace-tabs::-webkit-scrollbar { display: none; }
.app-shell-v6 .workspace-tabs > button { position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 7px; padding: 0 1px; min-height: 50px; color: #6e6d77; white-space: nowrap; font-size: 14px; font-weight: 500; border-radius: 0; }
.app-shell-v6 .workspace-tabs > button .icon { width: 16px; height: 16px; }
.app-shell-v6 .workspace-tabs > button:hover { color: var(--green); }
.app-shell-v6 .workspace-tabs > button:is(.active, [aria-selected="true"]) { color: var(--green); font-weight: 600; }
.app-shell-v6 .workspace-tabs > button:is(.active, [aria-selected="true"])::after { content: ''; position: absolute; height: 2px; background: var(--green); left: 0; right: 0; bottom: 0; border-radius: 2px 2px 0 0; }
.app-shell-v6 .workspace-tabs .count { display: inline-grid; place-items: center; padding: 0 5px; min-width: 18px; height: 18px; border-radius: 4px; background: #f1eff3; color: #8b818b; font-size: 10px; font-weight: 500; }
.app-shell-v6 .workspace-tabs > button.active .count { background: #f0e2ed; color: var(--green); }
.app-shell-v6 .workspace-tabs > button:focus-visible { outline-offset: -4px; outline-width: 2px; border-radius: 4px; }
.app-shell-v6 .app-main { min-width: 0; margin: 0; }
.app-shell-v6 .page { max-width: 1440px; padding: 26px 24px 24px; }
.app-shell-v6 .page-header { margin-bottom: 20px; gap: 16px; }
.app-shell-v6 .page-header p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.app-shell-v6 .page-header > .btn { flex-shrink: 0; }
.app-shell-v6 :is(.panel, .catalog-rule-panel) { border-color: var(--line); border-radius: 8px; box-shadow: none; }
.app-shell-v6 .panel-head { padding: 16px 20px; }
.app-shell-v6 .panel-head h2 { font-size: 15px; }
.app-shell-v6 .panel-head p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.app-shell-v6 .panel-content { padding: 0 20px 20px; }
.app-shell-v6 .btn { border-radius: 6px; min-height: 36px; padding: 7px 13px; font-size: 13px; }
.app-shell-v6 .btn.sm { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.app-shell-v6 .btn.primary { box-shadow: none; }
.app-shell-v6 .btn .icon { width: 16px; height: 16px; }
.app-shell-v6 .btn.ghost { border-color: transparent; }
.app-shell-v6 :is(.notice, .notice.info) { padding: 10px 14px; border-radius: 6px; margin-bottom: 18px; font-size: 12px; line-height: 1.75; }
.app-shell-v6 .notice .icon { width: 16px; height: 16px; margin-top: 3px; }
.app-shell-v6 .notice.info { background: #faf7fb; border-color: #ebdfec; color: #7b5f79; }
.app-shell-v6 .footer { padding-top: 20px; font-size: 11px; color: #aaa8af; }
.app-shell-v6 .footer span:last-child { font-size: 11px; }

/* An overview is one queue with a compact summary, rather than stacked cards. */
.app-shell-v6 .overview-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.app-shell-v6 .overview-header > div { min-width: 0; }
.app-shell-v6 .overview-header > .btn { flex-shrink: 0; }
.app-shell-v6 .overview-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 14px; margin-top: 7px; font-size: 12px; color: var(--muted); }
.app-shell-v6 .overview-meta .dot { width: 5px; height: 5px; }
.app-shell-v6 .overview-meta .pill { font-size: 11px; line-height: 1.5; border: 0; padding: 2px 6px; }
.app-shell-v6 .summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 22px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px 0; }
.app-shell-v6 .summary-stat { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 0 24px; border-right: 1px solid var(--line); }
.app-shell-v6 .summary-stat:last-child { border-right: 0; }
.app-shell-v6 .summary-stat :is(label, .label, small), .app-shell-v6 .summary-stat > span { color: var(--muted); font-size: 12px; font-weight: 400; }
.app-shell-v6 .summary-stat :is(strong, .value) { display: block; color: #302d35; font-size: 28px; font-weight: 550; font-variant-numeric: tabular-nums; line-height: 1.4; letter-spacing: -.5px; }
.app-shell-v6 .summary-stat :is(strong, .value) small { display: inline; margin-left: 5px; letter-spacing: 0; }
.app-shell-v6 .overview-worklist { margin-bottom: 16px; }
.app-shell-v6 .overview-worklist .panel-head { min-height: 54px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.app-shell-v6 .overview-worklist .panel-head .tab-strip { margin: 0; border: 0; }
.app-shell-v6 .overview-worklist .panel-head .link { flex-shrink: 0; font-size: 11px; }
.app-shell-v6 .overview-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 12px; padding: 0 2px; }
.app-shell-v6 .overview-footer > div { display: flex; align-items: center; gap: 8px; }
.app-shell-v6 .overview-footer .btn { font-size: 12px; min-height: 32px; }
.app-shell-v6 .overview-worklist > .overview-footer { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 11px; }
.app-shell-v6 .overview-footer .link { display: inline-flex; align-items: center; gap: 4px; color: #886680; font-size: 11px; }
.app-shell-v6 .overview-footer .link .icon { width: 14px; height: 14px; }

/* Main dimensions use the familiar underline pattern; nested filters are quiet. */
:is(.app-shell-v6, dialog) .tab-strip { display: flex; align-items: stretch; gap: 26px; grid-template-columns: none; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: #e3dce3 transparent; border-bottom: 1px solid var(--line); padding: 0; margin: 0 0 18px; background: transparent; border-radius: 0; min-width: 0; max-width: 100%; }
:is(.app-shell-v6, dialog) .tab-strip > button { position: relative; display: inline-flex; flex-direction: row; align-items: center; justify-content: center; flex-shrink: 0; gap: 7px; min-height: 45px; padding: 9px 2px; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: #74707a; font-size: 13px; font-weight: 400; white-space: nowrap; }
:is(.app-shell-v6, dialog) .tab-strip > button:hover { background: transparent; color: var(--green); }
:is(.app-shell-v6, dialog) .tab-strip > button:is(.active, [aria-selected="true"]) { color: var(--green); font-weight: 600; background: transparent; border: 0; box-shadow: none; }
:is(.app-shell-v6, dialog) .tab-strip > button:is(.active, [aria-selected="true"])::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; width: auto; height: 2px; background: var(--green); border-radius: 2px 2px 0 0; }
:is(.app-shell-v6, dialog) .tab-strip > button > strong { font-size: 14px; font-weight: inherit; }
:is(.app-shell-v6, dialog) .tab-strip > button > small { display: inline; background: #efedf1; color: #96909b; border-radius: 4px; padding: 0 5px; font-size: 10px; font-weight: 400; line-height: 18px; letter-spacing: 0; }
:is(.app-shell-v6, dialog) .tab-strip > button.active > small { color: #976b90; background: #efdfec; }
:is(.app-shell-v6, dialog) .tab-strip > button:focus-visible { outline-width: 2px; outline-offset: -3px; border-radius: 4px; }
:is(.app-shell-v6, dialog) .sub-tabs { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; min-width: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 0 0 4px; margin: 0 0 16px; border: 0; scrollbar-width: thin; scrollbar-color: #e3dce3 transparent; }
:is(.app-shell-v6, dialog) .sub-tabs > button { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; min-height: 34px; padding: 6px 12px; border-radius: 6px; border: 1px solid transparent; color: #74707a; background: transparent; font-size: 12px; line-height: 1.5; white-space: nowrap; }
:is(.app-shell-v6, dialog) .sub-tabs > button:hover { background: #efedf1; }
:is(.app-shell-v6, dialog) .sub-tabs > button:is(.active, [aria-selected="true"]) { color: var(--green); background: #f1e5ef; font-weight: 500; }
:is(.app-shell-v6, dialog) .sub-tabs > button::after { display: none; }
:is(.app-shell-v6, dialog) .sub-tabs > button small { background: transparent; color: inherit; font-size: 10px; opacity: .7; padding: 0; }
:is(.app-shell-v6, dialog) .tab-panel { min-width: 0; }
.app-shell-v6 .status-tabs { display: flex; gap: 18px; align-items: stretch; padding: 0 20px; margin: 0; overflow-x: auto; max-width: 100%; scrollbar-width: thin; border-bottom: 1px solid var(--line); }
.app-shell-v6 .status-tabs > button { flex-shrink: 0; font-size: 12px; min-height: 44px; padding: 12px 0; }
.app-shell-v6 .status-tabs > button small { padding: 1px 4px; background: #f1eff3; font-size: 10px; margin-left: 5px; }
.app-shell-v6 .compact-context { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 16px; }
.app-shell-v6 .compact-context > div { min-width: 0; }
.app-shell-v6 .compact-context h2 { font-size: 15px; }
.app-shell-v6 .compact-context p { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.75; }
.app-shell-v6 .compact-context > .btn { flex-shrink: 0; }
.app-shell-v6 .catalog-results { margin-top: 0; }
.app-shell-v6 .catalog-workspace > .dimension-tabs { padding: 0 20px; margin: 0; gap: 30px; }
.app-shell-v6 .catalog-workspace > .dimension-tabs > button { min-height: 50px; }
.app-shell-v6 .catalog-workspace .sub-tabs { padding: 13px 20px 12px; margin: 0; background: #fcfcfd; border-bottom: 1px solid var(--line); }
.app-shell-v6 .catalog-workspace .compact-context { padding: 14px 20px 0; margin-bottom: 10px; flex-wrap: wrap; }
.app-shell-v6 .catalog-workspace .compact-context > strong { font-size: 13px; font-weight: 500; color: #6c626f; }
.app-shell-v6 .catalog-workspace .compact-context > .reference-details { border: 0; padding: 0; margin: 0 0 0 auto; }
.app-shell-v6 .catalog-workspace .compact-context > .reference-details > summary { padding: 0; font-size: 11px; }
.app-shell-v6 .catalog-workspace .compact-context > .reference-details[open] { flex-basis: 100%; }
.app-shell-v6 .catalog-workspace .compact-context > .reference-details[open] > summary { margin-bottom: 7px; }
.app-shell-v6 .catalog-workspace .compact-context > .reference-details > p { margin-bottom: 5px; }
.app-shell-v6 .catalog-rule-content .panel-head { padding-top: 21px; padding-bottom: 20px; align-items: flex-start; }
.app-shell-v6 .catalog-rule-content .panel-head h2 { font-size: 17px; }
.app-shell-v6 .catalog-rule-content .panel-head p { margin-top: 7px; font-size: 13px; line-height: 1.85; }
.app-shell-v6 .catalog-rule-content .panel-head > .btn { flex-shrink: 0; }
.app-shell-v6 .catalog-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; padding: 0 0 20px; }
.app-shell-v6 .catalog-rule-grid > div { min-width: 0; }
.app-shell-v6 .catalog-rule-grid .section-heading { font-size: 13px; margin-bottom: 9px; color: #665d6b; }
.app-shell-v6 .catalog-rule-grid p { font-size: 13px; color: #817687; line-height: 1.9; }
.app-shell-v6 .catalog-rule-grid p.small { margin-top: 6px; font-size: 11px; color: #a095a5; }
.app-shell-v6 .catalog-rule-content .review-reference { padding: 14px 16px; border-radius: 6px; background: #fcfafd; border-color: #eee7ef; color: #8b7488; }
.app-shell-v6 .catalog-rule-content .review-reference > strong { color: #736473; font-size: 13px; }
.app-shell-v6 .catalog-rule-content .review-reference .rule-note { margin-top: 8px; padding-top: 0; border: 0; font-size: 11px; color: #a193a3; }
.app-shell-v6 .catalog-rule-content .review-reference .pill { margin-left: 5px; padding: 1px 5px; border: 0; font-size: 10px; }
.app-shell-v6 .toolbar { padding: 13px 20px; gap: 10px; }
.app-shell-v6 .search-box { max-width: 300px; min-height: 34px; border-radius: 6px; }
.app-shell-v6 .search-box input { padding: 6px 0; font-size: 12px; }
.app-shell-v6 .filter-select { min-height: 34px; padding: 6px 28px 6px 10px; font-size: 12px; border-radius: 6px; }
.app-shell-v6 th { padding: 11px 20px; background: #fafafb; color: #85818b; font-size: 11px; }
.app-shell-v6 td { padding: 13px 20px; color: #605a66; font-size: 14px; }
.app-shell-v6 td strong { font-size: 14px; color: #45404a; }
.app-shell-v6 .title-cell small { font-size: 12px; color: #817989; }
.app-shell-v6 .file-icon { width: 30px; height: 35px; border-radius: 5px; background: #f4eff5; }
.app-shell-v6 .file-icon .icon { width: 16px; height: 16px; }
.app-shell-v6 .material-title { gap: 10px; }
.app-shell-v6 .row-action { min-height: 34px; font-size: 13px; }
.app-shell-v6 .status { padding: 3px 7px; font-size: 11px; border-radius: 4px; }
.app-shell-v6 .category-text { font-size: 11px; padding: 3px 6px; background: #f4f2f5; color: #8c7889; border-radius: 4px; }
.app-shell-v6 .table-foot, .app-shell-v6 .pagination { padding: 11px 20px; font-size: 11px; color: #92909b; }
.app-shell-v6 .empty { padding: 48px 20px; }
.app-shell-v6 .empty .empty-icon { width: 45px; height: 45px; border-radius: 10px; background: #f5f2f6; margin-bottom: 12px; }
.app-shell-v6 .empty .empty-icon .icon { width: 23px; height: 23px; }
.app-shell-v6 .empty strong { font-size: 14px; color: #69616e; }
.app-shell-v6 .empty p { font-size: 13px; margin-bottom: 15px; color: #817989; }

/* Rules and secondary context stay close to the currently selected tab. */
:is(.app-shell-v6, dialog) .reference-details { padding: 0; border-top: 1px solid var(--line); margin-top: 18px; font-size: 12px; color: var(--muted); line-height: 1.8; }
:is(.app-shell-v6, dialog) .reference-details > summary { cursor: pointer; padding: 12px 0; color: #7b6c7a; font-size: 12px; list-style-position: inside; }
:is(.app-shell-v6, dialog) .reference-details > summary:hover { color: var(--green); }
:is(.app-shell-v6, dialog) .reference-details > :not(summary) { margin: 0 0 14px; }
.app-shell-v6 .rules-workspace { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.app-shell-v6 .rules-workspace .sub-tabs { margin-bottom: 20px; }
.app-shell-v6 .rule-content { min-width: 0; }
.app-shell-v6 .rule-content > h2 { font-size: 17px; margin-bottom: 7px; }
.app-shell-v6 .rule-content > p { color: #78707d; font-size: 13px; line-height: 1.8; }
.app-shell-v6 .rule-content .proof-guide { margin: 18px 0; border-radius: 6px; color: #776070; background: #fbf8fb; border-color: #eee5ed; padding: 13px 15px; }
.app-shell-v6 .rule-basis { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; font-size: 13px; color: #7b737f; line-height: 1.8; }
.app-shell-v6 .rule-basis h3 { margin-bottom: 6px; font-size: 14px; color: #57505e; }
.app-shell-v6 .rule-basis .rule-note { margin: 8px 0 0; padding: 0; border: 0; font-size: 12px; color: #928997; }
.app-shell-v6 .bucket-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 20px; overflow: hidden; background: #fff; }
.app-shell-v6 .bucket-card { padding: 18px 20px; border: 0; border-right: 1px solid var(--line); border-radius: 0; }
.app-shell-v6 .bucket-card:last-child { border-right: 0; }
.app-shell-v6 .bucket-card > h3 { font-size: 12px; color: #79717f; }
.app-shell-v6 .bucket-value { font-size: 26px; line-height: 1.5; margin-top: 7px; color: #3f3543; }
.app-shell-v6 .bucket-card > p { font-size: 10px; color: #a49ba8; }
.app-shell-v6 .caps-note { background: #fcfbfd; padding: 10px 20px; font-size: 11px; color: #998e9c; }
.app-shell-v6 .settings-grid { gap: 20px; }
.app-shell-v6 .settings-body { max-width: 850px; }
.app-shell-v6 .audit-item { padding: 14px 20px; font-size: 13px; }
.app-shell-v6 .audit-item p { font-size: 12px; }

/* Dialog tabs reveal one section without dropping the surrounding form state. */
dialog .dialog-tabs { margin-bottom: 18px; }
dialog .modal-tabs { margin-bottom: 18px; }
dialog .compact-review-context { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
dialog .compact-review-context > div { min-width: 0; }
dialog .compact-review-context > .status { flex-shrink: 0; }
dialog .compact-review-context .detail-meta { margin-bottom: 0; }
dialog .review-sidebar > .reference-details { margin-top: 0; border-top: 0; }
dialog .review-sidebar > .reference-details > summary { padding-top: 0; }
dialog .catalog-picker-list { display: grid; }
dialog .catalog-picker-option { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 12px; text-align: left; border-bottom: 1px solid var(--line); border-radius: 0; }
dialog .catalog-picker-option:last-child { border-bottom: 0; }
dialog .catalog-picker-option:hover { background: #faf7fb; }
dialog .catalog-picker-option > span { min-width: 0; }
dialog .catalog-picker-option strong { display: block; font-size: 14px; color: #62505f; font-weight: 550; }
dialog .catalog-picker-option small { display: block; margin-top: 5px; color: #998a98; font-size: 12px; line-height: 1.8; }
dialog .catalog-picker-option > .icon { color: #b5a2b3; width: 17px; height: 17px; }
dialog .tab-panel > .rule-edit { border: 0; padding: 0; margin: 0 0 20px; }
dialog .tab-panel > .form-section:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
dialog .tab-panel .form-section { margin-top: 18px; padding-top: 18px; }
dialog .tab-panel .form-grid { gap: 16px; }
dialog .tab-panel .policy-fields { margin-top: 18px; }
dialog .submission-context { background: #faf8fb; border-color: #ede7ef; padding: 12px 15px; margin-bottom: 16px; }
dialog .submission-context h3 { font-size: 16px; }
dialog .submission-context small { margin-top: 0; font-size: 11px; color: #9b8496; }
dialog .submission-context .pill { font-size: 10px; border: 0; margin-top: 0; }
dialog .form-actions { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
dialog .section-heading { font-size: 14px; margin-bottom: 14px; }
dialog .score-guidance { padding: 10px 12px; font-size: 11px; border-radius: 6px; color: #938094; }
dialog .review-reference { font-size: 12px; background: #fbf9fc; border-color: #eee7ef; border-radius: 6px; padding: 12px 14px; color: #8b7488; }
dialog .review-layout { gap: 24px; grid-template-columns: minmax(0, 1fr) 300px; }
dialog .review-sidebar { top: 0; }
dialog .review-sidebar .review-form { padding: 16px; background: #fbfafc; }
dialog .review-sidebar .review-form > h3 { font-size: 15px; margin-bottom: 12px; }
dialog .review-checklist { padding: 10px 12px; margin: 12px 0; border-radius: 6px; }
dialog .review-check { font-size: 12px; min-height: 32px; }
dialog .detail-fields { padding: 0 15px; gap: 0 18px; margin-top: 0; margin-bottom: 16px; }
dialog .detail-fields > div { padding: 11px 0; }
dialog .detail-fields dd, dialog .detail-fields strong { font-size: 13px; }
dialog .detail-title { font-size: 19px; line-height: 1.55; }
dialog .detail-meta { margin-top: 7px; margin-bottom: 16px; font-size: 12px; }
dialog .detail-description { font-size: 13px; line-height: 1.85; }
dialog .proof-guide { padding: 12px 14px; border-radius: 6px; margin-bottom: 16px; }
dialog .upload-zone { padding: 18px; margin-top: 16px; }
dialog .review-sidebar .field textarea { min-height: 90px; }
dialog .review-sidebar .form-actions { margin-top: 14px; padding-top: 14px; }
dialog .catalog-picker .item-grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin-bottom: 0; }
dialog .catalog-picker .item-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 15px 0; background: transparent; box-shadow: none; }
dialog .catalog-picker .item-card:last-child { border-bottom: 0; }
dialog .catalog-picker .item-card-actions { border-top: 0; padding-top: 0; margin-top: 10px; }

@media (max-width: 1080px) {
  .app-shell-v6 .header-context { padding-left: 18px; gap: 9px; }
  .app-shell-v6 .header-context > :last-child:not(:only-child) { display: none; }
  .app-shell-v6 .workspace-tabs { gap: 25px; }
  .app-shell-v6 .bucket-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app-shell-v6 .bucket-card:nth-child(3) { border-right: 0; }
  .app-shell-v6 .bucket-card:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .app-shell-v6 .header-context { display: none; }
  .app-shell-v6 .app-header { gap: 16px; padding: 0 20px; }
  .app-shell-v6 .workspace-tabs { padding: 0 20px; gap: 24px; }
  .app-shell-v6 .page { padding: 22px 20px; }
  .app-shell-v6 .summary-stat { padding: 0 20px; }
  dialog .review-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  dialog .review-sidebar { position: static; }
  dialog .review-sidebar .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .app-shell-v6 .app-header { padding: 0 16px; gap: 10px; }
  .app-shell-v6 .app-header .brand { gap: 8px; }
  .app-shell-v6 .app-header .school-seal { width: 32px; height: 32px; }
  .app-shell-v6 .app-header .brand-title { font-size: 15px; }
  .app-shell-v6 .app-header .brand-caption { font-size: 9px; }
  .app-shell-v6 .header-account { gap: 6px; }
  .app-shell-v6 .header-account .identity { max-width: 60px; }
  .app-shell-v6 .header-account .identity small { display: none; }
  .app-shell-v6 .header-account .avatar { width: 28px; height: 28px; min-width: 28px; min-height: 28px; }
  .app-shell-v6 .header-account .icon-btn { width: 36px; min-height: 40px; }
  .app-shell-v6 .workspace-tabs { padding: 0 16px; gap: 24px; }
  .app-shell-v6 .workspace-tabs > button { font-size: 13px; }
  .app-shell-v6 .workspace-tabs > button .icon { width: 15px; height: 15px; }
  .app-shell-v6 .page { padding: 20px 16px; }
  .app-shell-v6 .page-header { align-items: flex-start; gap: 12px; }
  .app-shell-v6 .page-header h1, .app-shell-v6 h1 { font-size: 21px; }
  .app-shell-v6 .page-header p { font-size: 12px; max-width: none; }
  .app-shell-v6 .page-header > .btn { font-size: 12px; max-width: 145px; white-space: normal; }
  .app-shell-v6 .overview-header { align-items: flex-start; margin-bottom: 18px; gap: 12px; }
  .app-shell-v6 .overview-header > .btn { font-size: 12px; }
  .app-shell-v6 .overview-meta { gap: 5px 8px; font-size: 11px; }
  .app-shell-v6 .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; margin-bottom: 18px; }
  .app-shell-v6 .summary-stat { padding: 15px 18px; gap: 3px; }
  .app-shell-v6 .summary-stat:nth-child(even) { border-right: 0; }
  .app-shell-v6 .summary-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .app-shell-v6 .summary-stat :is(strong, .value) { font-size: 26px; }
  .app-shell-v6 .summary-stat :is(label, .label, small) { font-size: 11px; }
  .app-shell-v6 .overview-footer { gap: 8px; align-items: flex-start; font-size: 11px; }
  .app-shell-v6 .panel-head { padding: 14px 16px; }
  .app-shell-v6 .overview-worklist .panel-head { padding: 0 16px; gap: 12px; }
  .app-shell-v6 .overview-worklist .panel-head .tab-strip { gap: 18px; }
  .app-shell-v6 .overview-worklist .panel-head .link { max-width: 24px; overflow: hidden; font-size: 0; padding-left: 3px; }
  .app-shell-v6 .overview-worklist .panel-head .link .icon { width: 18px; height: 18px; }
  .app-shell-v6 .overview-worklist > .overview-footer { padding: 11px 16px; }
  .app-shell-v6 .panel-content { padding: 0 16px 16px; }
  .app-shell-v6 .toolbar { padding: 12px 16px; }
  .app-shell-v6 .search-box { min-width: 140px; max-width: none; flex-basis: 100%; }
  .app-shell-v6 .search-box input, .app-shell-v6 .field :is(input,select,textarea) { font-size: 16px; }
  .app-shell-v6 .search-box, .app-shell-v6 .filter-select { min-height: 40px; }
  .app-shell-v6 .btn, .app-shell-v6 .btn.sm { min-height: 40px; }
  .app-shell-v6 .status-tabs { gap: 20px; padding: 0 16px; }
  .app-shell-v6 .status-tabs > button { font-size: 12px; }
  .app-shell-v6 .compact-context { flex-wrap: wrap; gap: 10px; }
  .app-shell-v6 .compact-context h2 { font-size: 14px; }
  .app-shell-v6 .catalog-workspace > .dimension-tabs { padding: 0 16px; gap: 25px; }
  .app-shell-v6 .catalog-workspace .sub-tabs { padding: 11px 16px; }
  .app-shell-v6 .catalog-workspace .compact-context { padding: 12px 16px 0; }
  .app-shell-v6 .catalog-rule-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .app-shell-v6 .catalog-rule-content .panel-head { padding-top: 18px; padding-bottom: 18px; }
  .app-shell-v6 .catalog-rule-content .panel-head h2 { font-size: 16px; }
  .app-shell-v6 .materials-table tr { padding: 16px; gap: 10px 16px; }
  .app-shell-v6 .materials-table td { padding: 0; }
  .app-shell-v6 .materials-table .material-title { gap: 10px; }
  .app-shell-v6 .materials-table .title-cell strong { font-size: 14px; }
  .app-shell-v6 .materials-table .title-cell small { font-size: 12px; }
  .app-shell-v6 .materials-table .row-action { min-height: 40px; padding: 8px 12px; font-size: 12px; border-radius: 6px; }
  .app-shell-v6 .table-foot, .app-shell-v6 .pagination { padding: 11px 16px; }
  .app-shell-v6 .rules-workspace { padding: 16px; }
  .app-shell-v6 .rule-content > h2 { font-size: 16px; }
  .app-shell-v6 .bucket-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-shell-v6 .bucket-card { padding: 15px 16px; border-right: 1px solid var(--line); }
  .app-shell-v6 .bucket-card:nth-child(3) { border-right: 1px solid var(--line); }
  .app-shell-v6 .bucket-card:nth-child(even) { border-right: 0; }
  .app-shell-v6 .bucket-card:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  :is(.app-shell-v6, dialog) .tab-strip { gap: 24px; margin-bottom: 14px; }
  :is(.app-shell-v6, dialog) .tab-strip > button { min-height: 44px; }
  :is(.app-shell-v6, dialog) .tab-strip > button > strong { font-size: 13px; }
  :is(.app-shell-v6, dialog) .sub-tabs { gap: 4px; margin-bottom: 14px; }
  :is(.app-shell-v6, dialog) .sub-tabs > button { min-height: 40px; padding: 8px 10px; }
  dialog .review-sidebar .form-grid, dialog .tab-panel .form-grid { grid-template-columns: minmax(0, 1fr); }
  dialog .detail-fields { gap: 0 14px; }
  dialog .detail-title { font-size: 17px; }
  dialog .review-check { min-height: 40px; font-size: 13px; }
  dialog .form-actions { margin-top: 16px; padding-top: 16px; }
  dialog .submission-context { padding: 11px 13px; }
}
@media (max-width: 360px) {
  .app-shell-v6 .app-header { padding: 0 12px; }
  .app-shell-v6 .app-header .brand-caption { letter-spacing: 0; }
  .app-shell-v6 .header-account .identity { max-width: 48px; }
  .app-shell-v6 .header-account .identity { display: none; }
  .app-shell-v6 .header-account .identity strong { font-size: 11px; }
  .app-shell-v6 .workspace-tabs { padding: 0 12px; gap: 22px; }
  .app-shell-v6 .workspace-tabs > button .icon { display: none; }
  .app-shell-v6 .page { padding: 18px 12px; }
  .app-shell-v6 .page-header { flex-wrap: wrap; }
  .app-shell-v6 .page-header > div { flex-basis: auto; }
  .app-shell-v6 .page-header > .btn { max-width: none; }
  .app-shell-v6 .overview-header { flex-wrap: wrap; }
  .app-shell-v6 .overview-header > .btn { margin-left: auto; }
  .app-shell-v6 .summary-stat { padding: 13px 15px; }
  .app-shell-v6 .summary-stat :is(strong, .value) { font-size: 24px; }
  .app-shell-v6 .status-tabs { gap: 18px; padding: 0 13px; }
  .app-shell-v6 .panel-head, .app-shell-v6 .toolbar { padding-left: 13px; padding-right: 13px; }
  .app-shell-v6 .materials-table tr { padding: 15px 13px; }
  .app-shell-v6 .rules-workspace { padding: 14px; }
  .app-shell-v6 .catalog-workspace > .dimension-tabs { padding: 0 13px; gap: 22px; }
  .app-shell-v6 .catalog-workspace .sub-tabs { padding-left: 13px; padding-right: 13px; }
  .app-shell-v6 .catalog-workspace .compact-context { padding-left: 13px; padding-right: 13px; }
  :is(.app-shell-v6, dialog) .tab-strip { gap: 22px; }
  dialog .detail-fields { grid-template-columns: minmax(0, 1fr); }
  dialog .detail-fields > div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

/* Keep the account action explicit, including on compact headers. */
.app-shell-v6 .header-account .password-button {
  min-height: 36px;
  padding: 7px 12px;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}
.app-shell-v6 .header-account .password-button .icon { width: 16px; height: 16px; }
@media (max-width: 640px) {
  .app-shell-v6 .header-account .avatar,
  .app-shell-v6 .header-account .identity { display: none; }
  .app-shell-v6 .header-account .password-button { min-height: 40px; }
}
@media (max-width: 360px) {
  .app-shell-v6 .app-header .brand { gap: 6px; }
  .app-shell-v6 .app-header .school-seal { width: 28px; height: 28px; }
  .app-shell-v6 .app-header .brand-title { font-size: 14px; }
  .app-shell-v6 .header-account .password-button { padding-inline: 10px; }
  .app-shell-v6 .header-account .password-button .icon { display: none; }
  .app-shell-v6 .header-account .icon-btn { width: 32px; }
}

.member-actions { display: flex; align-items: center; gap: 18px; white-space: nowrap; }
.member-actions .icon { width: 15px; height: 15px; }
.members-table td { white-space: nowrap; }
.reset-member-summary { display: grid; gap: 4px; margin-bottom: 20px; }
.reset-member-summary strong { font-size: 17px; color: var(--ink); }
.reset-member-summary span { color: var(--muted); font-size: 13px; }


/* Roles share a single member list; audit history remains readable on narrow screens. */
.app-shell-v6 .member-tabs { padding: 0 20px; margin-bottom: 0; }
.app-shell-v6 .member-tabs > button { min-height: 48px; }
.app-shell-v6 .member-tabs > button > small { margin-left: 7px; font-size: 11px; font-weight: 400; }
.app-shell-v6 .audit-filter { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; min-width: 0; }
.app-shell-v6 .audit-filter .filter-select { min-width: 230px; max-width: 100%; }
.app-shell-v6 .audits-table { table-layout: fixed; width: 100%; }
.app-shell-v6 .audits-table th:first-child { width: 215px; }
.app-shell-v6 .audits-table th:last-child { width: 185px; }
.app-shell-v6 .audits-table td { vertical-align: top; }
.app-shell-v6 .audit-actor strong, .app-shell-v6 .audit-actor span { display: block; overflow-wrap: anywhere; }
.app-shell-v6 .audit-actor span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.app-shell-v6 .audit-content { overflow-wrap: anywhere; }
.app-shell-v6 .audit-content p { margin-top: 5px; line-height: 1.8; color: var(--muted); font-size: 13px; white-space: pre-line; }
.app-shell-v6 .audit-content .row-action { margin-top: 3px; }
.app-shell-v6 .audit-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 900px) {
  .app-shell-v6 .audits-table th:first-child { width: 175px; }
  .app-shell-v6 .audits-table th:last-child { width: 160px; }
}
@media (max-width: 640px) {
  .app-shell-v6 .member-tabs { padding: 0 16px; margin-bottom: 0; }
  .app-shell-v6 .audit-filter { width: 100%; gap: 10px; }
  .app-shell-v6 .audit-filter > span { flex-shrink: 0; }
  .app-shell-v6 .audit-filter .filter-select { min-width: 0; width: 100%; font-size: 14px; }
  .app-shell-v6 .audits-table, .app-shell-v6 .audits-table tbody { display: block; min-width: 0; }
  .app-shell-v6 .audits-table thead { display: none; }
  .app-shell-v6 .audits-table tr { display: grid; grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 9px; border-bottom: 1px solid var(--line); }
  .app-shell-v6 .audits-table tr:last-child { border-bottom: 0; }
  .app-shell-v6 .audits-table td { display: block; padding: 0; border: 0; white-space: normal; }
  .app-shell-v6 .audit-actor { display: flex !important; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
  .app-shell-v6 .audit-actor span { margin-top: 0; }
  .app-shell-v6 .audit-content p { margin-top: 4px; }
  .app-shell-v6 .audit-time { font-size: 11px; }
}


/* Audit filters commit together with the matching server results. */
.app-shell-v6 .audit-category-tabs { padding: 0 20px; margin-bottom: 0; }
.app-shell-v6 .audit-category-tabs > button { min-height: 48px; }
.app-shell-v6 .audit-toolbar { gap: 12px 16px; }
.app-shell-v6 .audit-search-form { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; min-width: 0; max-width: 440px; }
.app-shell-v6 .audit-search-form .search-box { flex: 1; min-width: 0; max-width: none; }
.app-shell-v6 .audit-search-form > .btn { flex-shrink: 0; }
.app-shell-v6 .audit-filter { gap: 8px; }
.app-shell-v6 .audit-filter > span { white-space: nowrap; }
.app-shell-v6 .audit-filter .filter-select { min-width: 120px; }
.app-shell-v6 .audit-person-filter .filter-select { min-width: 210px; max-width: 280px; }
.app-shell-v6 .audit-clear { color: var(--muted); padding-inline: 6px; }
.app-shell-v6 .audit-clear:hover { color: var(--green); }
.app-shell-v6 .audit-panel[aria-busy="true"] #audit-results { opacity: .6; }
@media (max-width: 640px) {
  .app-shell-v6 .audit-category-tabs { padding: 0 16px; margin-bottom: 0; gap: 24px; }
  .app-shell-v6 .audit-search-form { flex-basis: 100%; max-width: none; }
  .app-shell-v6 .audit-search-form .search-box { flex-basis: auto; min-width: 0; }
  .app-shell-v6 .audit-filter > span { width: 56px; }
  .app-shell-v6 .audit-filter .filter-select { flex: 1; min-width: 0; max-width: none; }
  .app-shell-v6 .audit-clear { margin-left: auto; }
}


.material-row-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.material-row-actions .row-action { white-space: nowrap; }
dialog .review-reference-list { margin: 0 0 14px; padding-left: 18px; }
dialog .review-reference-list li + li { margin-top: 6px; }
@media (max-width: 640px) {
  .material-row-actions { align-items: flex-end; gap: 6px; }
}


/* Feedback corrections are separate from the decision and score controls. */
dialog .review-feedback-box { display: block; margin-top: 20px; }
dialog .review-feedback-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
dialog .review-feedback-heading > strong { font-size: 13px; font-weight: 600; }
dialog .review-feedback-heading .btn { margin-left: auto; white-space: nowrap; }
dialog .feedback-text { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
dialog .feedback-edit-context { display: grid; gap: 5px; margin-bottom: 20px; }
dialog .feedback-edit-context strong { font-size: 16px; overflow-wrap: anywhere; }
dialog .feedback-edit-context span, dialog .feedback-edit-note { color: var(--muted); font-size: 12px; }
dialog .feedback-edit-note { margin-top: 10px; margin-bottom: 16px; }
dialog #edited-review-feedback { min-height: 150px; }


.review-correction-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-left: auto; }
dialog .review-feedback-heading .review-correction-actions .btn { margin-left: 0; }
dialog #edited-result-feedback { min-height: 140px; }
dialog #review-result-impact { min-height: 20px; line-height: 1.7; }
@media (max-width: 640px) {
  .review-correction-actions { flex-basis: 100%; margin-left: 0; }
  dialog .review-feedback-heading .review-correction-actions .btn { min-height: 40px; padding-inline: 10px; }
}


.detail-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
dialog .detail-heading-actions .btn { white-space: nowrap; }
dialog .reclassify-origin { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; padding: 12px 14px; margin-bottom: 18px; background: var(--green-soft); border-radius: 6px; font-size: 13px; }
dialog .reclassify-origin > span { color: var(--muted); }
dialog .reclassify-origin > strong { font-weight: 500; overflow-wrap: anywhere; }
dialog #reclassify-fields { margin: 20px 0; }
dialog #reclassify-fields > h3 { font-size: 14px; margin-bottom: 14px; }
dialog #reclassify-fields .policy-fields { margin-top: 0; }
dialog #reclassify-warning { margin-top: 12px; }
@media (max-width: 640px) {
  dialog .detail-heading-actions { flex-shrink: 1; }
  dialog .detail-heading-actions .btn { min-height: 40px; }
}

/* Keep navigation feedback visible while a slow request is pending. */
.workspace-tabs button.is-loading::after { content: '…'; margin-left: 4px; }
.workspace-tabs button.is-loading { cursor: progress; }
