.cfg-tabs {
  display: flex;
  align-items: center;
  gap: .125rem;
  overflow-x: auto;
  margin-bottom: .75rem;
}
.cfg-tabs a { color: var(--muted-foreground, var(--muted)); font-size: .8125rem; font-weight: 500; padding: .5rem .75rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.cfg-tabs a[aria-current="page"] { color: var(--primary, var(--teal)); border-bottom-color: currentColor; }
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1rem; }
.cfg-home .cfg-panel { margin-bottom: 0; }
.cfg-panel { min-width: 0; overflow: hidden; padding: 0; margin: 0 0 1rem; border-radius: .375rem; }
.cfg-panel h2 { color: inherit; font-size: .8125rem; font-weight: 600; margin: 0; }
.cfg-head, .cfg-import-row, .cfg-kv { display: flex; align-items: center; gap: .75rem; justify-content: space-between; }
.cfg-head { min-height: 2.25rem; padding: .5rem .875rem; flex-wrap: wrap; background: color-mix(in oklab, var(--secondary, #e9edf2) 60%, transparent); border-bottom: 1px solid var(--border, var(--line)); }
.cfg-head > .btn:only-child { margin-left: auto; }
.cfg-body { padding: .875rem; }
.cfg-body:has(> :is(.table-wrap, .cfg-info, .cfg-access-matrix, .cfg-campus-list):only-child) { padding: 0; }
.cfg-body .table-wrap { margin-inline: 0; border-radius: 0; }
.cfg-panel .table-wrap th, .cfg-panel .table-wrap td { padding: .375rem .75rem; font-size: .8125rem; }
.cfg-panel .table-wrap th { color: var(--muted-foreground, var(--muted)); background: color-mix(in oklab, var(--secondary, #e9edf2) 60%, transparent); font-size: .6875rem; font-weight: 600; letter-spacing: .025em; text-transform: uppercase; }
.cfg-panel .table-wrap tbody tr:nth-child(even) { background: color-mix(in oklab, var(--secondary, #e9edf2) 35%, transparent); }
.cfg-panel .table-wrap tbody tr:hover { background: color-mix(in oklab, var(--accent, #e7f3f1) 55%, transparent); }
.cfg-info { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem 2rem; margin: 0; padding: 1rem; font-size: .8125rem; }
.cfg-info dt { color: var(--muted-foreground, var(--muted)); font-size: .75rem; }
.cfg-info dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.cfg-kv { border-top: 1px solid var(--border, var(--line)); padding: .6rem 0; align-items: baseline; font-size: .8125rem; }
.cfg-kv strong { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.cfg-kv:first-child { border-top: 0; }
.cfg-kv span, .cfg-meta, .cfg-empty, .cfg-panel p { color: var(--muted-foreground, var(--muted)); }
.cfg-panel p, .cfg-step p { margin: .3rem 0; font-size: .8125rem; line-height: 1.45; }
.cfg-fields { display: grid; gap: .75rem; }
.cfg-fields small, .cfg-meta { font-size: .75rem; color: var(--muted-foreground, var(--muted)); }
.cfg-fields small { line-height: 1.5; }
.cfg-fields fieldset { min-width: 0; border: 1px solid var(--border, var(--line)); border-radius: .375rem; padding: .625rem .75rem; margin: 0; }
.cfg-fields fieldset legend { font-size: .875rem; padding: 0 .25rem; }
.cfg-step, .cfg-import-row { border-top: 1px solid var(--border, var(--line)); padding: .75rem 0; }
.cfg-step:first-child, .cfg-import-row:first-child { border-top: 0; }
.cfg-step { display: grid; align-items: center; grid-template-columns: 1.75rem minmax(0, 1fr) auto; gap: .75rem; }
.cfg-step-num { display: grid; place-items: center; height: 1.75rem; width: 1.75rem; border-radius: 50%; background: var(--accent, #e6f2ef); color: var(--primary, #14685b); font-weight: 650; }
.cfg-tags, .cfg-actions, .cfg-checks { display: flex; flex-wrap: wrap; gap: .5rem; }
.cfg-checks label { display: flex; gap: .375rem; align-items: center; padding: .25rem; font-size: .875rem; }
.cfg-notice { padding: .75rem; margin: 0 0 .75rem; border: 1px solid #eddab2; border-radius: .375rem; background: #fff1d3; color: #684900; }
.cfg-errors { color: #8e3027; }
.cfg-errors:empty, [data-review]:empty { display: none; }
.cfg-record { color: var(--primary, #12685d); font-weight: 600; text-decoration: none; }
.cfg-record:hover { text-decoration: underline; text-underline-offset: .15em; }
.cfg-amount { display: block; text-align: right; font-family: var(--font-mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cfg-campus-list :is(th, td):is(:nth-child(2), :nth-child(3)) { text-align: right; }
.cfg-access-matrix :is(td, th):not(:first-child) { text-align: center; }
.cfg-pill { display: inline-flex; align-items: center; white-space: nowrap; font-size: .6875rem; font-weight: 500; border-radius: .125rem; padding: .125rem .375rem; }
.cfg-pill-ok { color: #065f46; background: #ecfdf5; box-shadow: inset 0 0 0 1px #05966933; }
.dark .cfg-pill-ok { color: #6ee7b7; background: #10b9811a; box-shadow: inset 0 0 0 1px #34d39940; }
[data-review] { min-width: 0; }
[data-review] h4, [data-review] p, [data-review] .table-wrap { margin-bottom: .65rem; }
.cfg-print { border: 1px solid var(--border, var(--line)); border-top: 3px solid var(--primary, var(--teal)); border-radius: .375rem; padding: 1.25rem; }
.cfg-print h2 { font-size: 1.25rem; margin: .45rem 0 1rem; }
.cfg-print p { white-space: pre-line; overflow-wrap: anywhere; }
[data-cfg-print] { justify-self: start; }

@media (min-width: 40rem) { .cfg-info { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .cfg-info { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 42rem) {
  .cfg-import-row { align-items: flex-start; flex-direction: column; }
  .cfg-step { grid-template-columns: 1.75rem minmax(0, 1fr); }
  .cfg-step > .btn { grid-column: 2; justify-self: start; }
  .cfg-head { align-items: flex-start; }
}

@media print {
  body:has(.cfg-print) :is(.masthead, .module-navigation, .module-title, .he-header-sticky, .he-page-header, .he-footer, .workspace-task-head, [data-cfg-print], #notices) { display: none !important; }
  body:has(.cfg-print) :is(.workspace, .workspace-task, .workspace-task-fields, .cfg-print) { display: block; padding: 0; margin: 0; border: 0; box-shadow: none; }
}

.mig-form { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem 1rem; margin-top: 1rem; }
.mig-form .field { min-width: min(15rem, 100%); }
.mig-form input[type=file] { max-width: 100%; }
.mig-review:not(:empty) { border-top: 1px solid var(--border, var(--line)); margin-top: 1rem; padding-top: .75rem; }
.mig-review h3, .mig-period { font-size: .95rem; margin: .65rem 0; }
.mig-review details, .mig-review [data-apply-import] { margin-top: .75rem; }
[data-import-message]:not(:empty) { margin-top: .75rem; }
[data-import-history] summary, .mig-review summary { cursor: pointer; }
[data-import-history] li, .mig-review li { white-space: normal; overflow-wrap: anywhere; }
.mig-number { white-space: nowrap; font-variant-numeric: tabular-nums; }
