:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #182230;
  --muted: #667085;
  --line: #d9e1ec;
  --soft: #eef4ff;
  --accent: #1570ef;
  --accent-strong: #175cd3;
  --success: #067647;
  --danger: #b42318;
  --warning: #b54708;
  --shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 0 16px;
}

button:hover,
.button:hover {
  background: var(--accent-strong);
}

.button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: #344054;
}

.button.secondary:hover {
  border-color: #84caff;
  background: var(--soft);
  color: var(--accent-strong);
}

button.danger,
.button.danger {
  border: 1px solid #fecdca;
  background: #fef3f2;
  color: var(--danger);
}

button.danger:hover,
.button.danger:hover {
  background: #fee4e2;
  color: #912018;
}

button:disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 9px 10px;
}

textarea {
  resize: vertical;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 272px;
  border-right: 1px solid var(--line);
  background: rgba(245, 245, 247, 0.94);
  backdrop-filter: blur(18px);
  padding: 18px 16px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 16px;
}

.brand small {
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.nav-module {
  border-radius: 18px;
  padding: 4px;
}

.nav-module[open],
.nav-module.active {
  background: rgba(255, 255, 255, 0.44);
}

.nav-module summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  border-radius: 14px;
  color: #182230;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.28;
  list-style: none;
  padding: 10px 34px 10px 12px;
  user-select: none;
}

.nav-module summary::-webkit-details-marker {
  display: none;
}

.nav-module summary::after {
  content: "";
  position: absolute;
  right: 14px;
  width: 7px;
  height: 7px;
  border-right: 2px solid #98a2b3;
  border-bottom: 2px solid #98a2b3;
  transform: rotate(45deg);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.nav-module[open] summary::after {
  transform: rotate(225deg);
}

.nav-module.active > summary {
  color: var(--accent-strong);
}

.nav-module.active > summary::after {
  border-color: var(--accent-strong);
}

.nav-module summary:hover {
  background: rgba(255, 255, 255, 0.72);
}

.nav-section {
  display: grid;
  gap: 5px;
}

.nav-section-title {
  color: #98a2b3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0 10px;
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
  border-radius: 14px;
  color: #344054;
  font-weight: 650;
  line-height: 1.28;
  margin-top: 4px;
  padding: 10px 12px 10px 30px;
  transition: background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
}

.nav a.active {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.06);
}

.nav a.active::before {
  content: "";
  position: absolute;
  left: 14px;
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
}

.workspace {
  margin-left: 272px;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 251, 0.88);
  backdrop-filter: blur(18px);
  padding: 18px 28px;
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.userbox {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.role-pill {
  border: 1px solid #b2ddff;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
}

.content {
  width: min(1480px, calc(100% - 40px));
  margin: 22px auto 64px;
}

.modal-open {
  overflow: hidden;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric,
.panel,
.action-card,
.login-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-height: 116px;
  overflow: hidden;
  padding: 18px;
}

.metric span,
.metric em,
.section-title span,
.empty,
.empty-cell,
.field small {
  color: var(--muted);
}

.metric em {
  font-size: 13px;
  font-style: normal;
  font-weight: 650;
}

.metric strong {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
}

.metric-drilldown {
  width: 100%;
  display: grid;
  justify-content: stretch;
  gap: 10px;
  min-height: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.metric-drilldown:hover {
  background: transparent;
  color: var(--accent-strong);
}

.metric-drilldown strong {
  color: var(--text);
}

.metric-drilldown:hover strong {
  color: var(--accent-strong);
}

.balance-metric {
  gap: 8px;
}

.metric-breakdown {
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line);
  margin-top: 2px;
  padding-top: 8px;
}

.metric-breakdown span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}

.metric-breakdown b {
  color: var(--text);
  font-weight: 800;
}

.manager-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.manager-metrics .metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
  border-color: #e6edf7;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.045);
  min-height: 166px;
  padding: 16px 18px;
}

.manager-metrics .metric-primary {
  min-height: 166px;
}

.manager-metrics .metric-compact {
  min-height: 150px;
}

.manager-metrics .metric-alert {
  min-height: 150px;
}

.manager-metrics .metric > span:first-child,
.manager-metrics .metric-drilldown span {
  color: #667085;
  font-size: 14px;
  font-weight: 800;
}

.manager-metrics .metric strong {
  font-size: 28px;
  line-height: 1;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.manager-metrics .metric-compact strong,
.manager-metrics .metric-alert strong {
  font-size: 30px;
}

.manager-metrics .metric em {
  color: #667085;
  margin-top: 2px;
}

.manager-metrics .metric-breakdown {
  border-top: 0;
  border-radius: 12px;
  background: #f8fafc;
  margin-top: 2px;
  padding: 7px 10px;
}

.manager-metrics .balance-metric .metric-breakdown {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
}

.manager-metrics .metric-breakdown span {
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: normal;
  white-space: nowrap;
}

.manager-metrics .metric-breakdown b {
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .manager-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.quick-actions,
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.quick-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.action-card {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 18px;
}

.action-card:hover {
  border-color: #84caff;
}

.action-card strong {
  font-size: 18px;
}

.action-card span {
  color: var(--muted);
}

.panel {
  margin-top: 16px;
  padding: 17px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.table-wrap {
  overflow-x: auto;
}

.table-scroll-shell {
  position: relative;
  min-width: 0;
}

.table-scroll {
  max-height: min(64vh, 620px);
  overflow: auto;
}

.top-scrollbar {
  height: 14px;
  margin: 0 0 8px;
  overflow-x: auto;
  overflow-y: hidden;
}

.top-scrollbar > div {
  height: 1px;
}

.sticky-table {
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
}

.sticky-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--panel);
  box-shadow: inset 0 -1px 0 var(--line);
}

.record-table-scroll {
  max-height: min(66vh, 620px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.record-table {
  min-width: 1040px;
}

.record-table-wealth {
  min-width: 1220px;
}

.record-table th {
  top: 0;
  background: #f8fafc;
  box-shadow: inset 0 -1px 0 var(--line), 0 2px 4px rgba(16, 24, 40, 0.04);
}

.record-table td,
.record-table th {
  height: 44px;
}

.sticky-col,
.sticky-action {
  position: sticky;
  z-index: 2;
  background: var(--panel);
}

.sticky-table th.sticky-col,
.sticky-table th.sticky-action,
.sticky-table th.sticky-left-action {
  z-index: 5;
}

.sticky-left-action {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 116px;
  min-width: 116px;
  background: var(--panel);
  box-shadow: 1px 0 0 var(--line);
}

.sticky-left-action .button {
  white-space: nowrap;
}

.sticky-col-1 {
  left: 0;
  min-width: 150px;
}

.sticky-col-2 {
  left: 150px;
  min-width: 250px;
  box-shadow: 1px 0 0 var(--line);
}

.sticky-action {
  right: 0;
  min-width: 250px;
  box-shadow: -1px 0 0 var(--line);
}

.bank-accounts-table {
  min-width: 1160px;
}

.account-identity-cell {
  min-width: 210px;
  max-width: 280px;
  white-space: normal;
}

.maintenance-table {
  min-width: 980px;
}

.action-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.subtle-text {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.is-muted-row td {
  color: var(--muted);
}

.inline-edit-form {
  display: contents;
}

.campus-summary-scroll {
  max-height: min(66vh, 720px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.campus-accordion-list {
  display: grid;
  gap: 0;
  min-width: 920px;
}

.campus-summary-header {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(210px, 1.3fr) repeat(4, minmax(120px, 1fr));
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 10px 14px 10px 38px;
}

.campus-accordion {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fbfcff;
  overflow: hidden;
}

.campus-accordion summary {
  position: relative;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(210px, 1.3fr) repeat(4, minmax(120px, 1fr));
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 12px 14px 12px 38px;
}

.campus-accordion summary::-webkit-details-marker {
  display: none;
}

.campus-accordion summary::before {
  content: "›";
  position: absolute;
  left: 16px;
  top: 50%;
  color: var(--accent-strong);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-50%);
}

.campus-accordion[open] summary::before {
  transform: translateY(-50%) rotate(90deg);
}

.campus-accordion summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.campus-accordion summary b,
.campus-summary-name {
  color: var(--text);
  font-size: 13px;
}

.campus-summary-name em {
  color: var(--muted);
  font-style: normal;
  font-weight: 750;
}

.account-detail-wrap {
  border-top: 1px solid var(--line);
  background: #fff;
  max-height: 360px;
  overflow: auto;
}

.account-detail-table {
  min-width: 1080px;
}

.account-detail-table th {
  top: 0;
  z-index: 6;
  background: var(--panel);
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.42);
  padding: 24px;
}

.drilldown-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1180px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  max-height: min(760px, calc(100vh - 48px));
  border: 0;
  border-radius: 16px;
  outline: none;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(16, 24, 40, 0.26);
}

.confirm-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(680px, calc(100vw - 40px));
  max-height: min(620px, calc(100vh - 40px));
  border: 0;
  border-radius: 16px;
  outline: none;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(16, 24, 40, 0.26);
}

.dialog-head,
.dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.dialog-head {
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.dialog-head h2 {
  margin: 0;
  font-size: 18px;
}

.dialog-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.dialog-body {
  min-height: 0;
  overflow: hidden;
  padding: 0 18px 16px;
}

.confirm-dialog-body {
  overflow: auto;
  padding-top: 16px;
}

.change-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.change-list li {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  list-style: none;
  padding: 10px 12px;
}

.change-list strong {
  color: #344054;
}

.change-list span,
.confirm-message {
  overflow-wrap: anywhere;
}

.dialog-foot {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.drilldown-table-wrap {
  height: 100%;
  max-height: min(520px, calc(100vh - 230px));
  overflow: auto;
}

.drilldown-table-wrap table {
  min-width: 1080px;
}

.drilldown-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
}

.status-pill.success {
  background: #ecfdf3;
  color: var(--success);
}

.status-pill.warning {
  background: #fffaeb;
  color: var(--warning);
}

.status-pill.danger {
  background: #fef3f2;
  color: var(--danger);
}

.inline-status-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
}

.maintenance-create-panel {
  padding: 0;
}

.maintenance-summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  list-style: none;
  padding: 17px;
}

.maintenance-summary::-webkit-details-marker {
  display: none;
}

.maintenance-summary::before {
  content: "+";
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-strong);
  margin-right: 8px;
}

.maintenance-create-panel[open] .maintenance-summary::before {
  content: "−";
}

.embedded-form {
  max-width: none;
  border-top: 1px solid var(--line);
  padding: 17px;
}

.inline-confirm {
  min-width: 110px;
}

.inline-confirm summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  padding: 0 11px;
}

.inline-confirm summary::-webkit-details-marker {
  display: none;
}

.inline-confirm form {
  display: grid;
  gap: 8px;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  margin-top: 8px;
  padding: 10px;
}

.inline-status-form select {
  min-width: 120px;
  padding: 7px 9px;
}

button.compact,
.button.compact {
  min-height: 34px;
  padding: 0 11px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

td {
  font-size: 13px;
}

td a {
  color: var(--accent-strong);
  font-weight: 650;
}

.form-panel {
  max-width: 980px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.field em {
  color: var(--danger);
  font-style: normal;
  font-weight: 650;
}

.file-field {
  grid-column: 1 / -1;
}

.file-drop-zone {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 138px;
  place-items: center;
  border: 1.5px dashed #98a2b3;
  border-radius: 10px;
  background: #f8fbff;
  color: #344054;
  cursor: pointer;
  padding: 22px;
  text-align: center;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.file-drop-zone:hover,
.file-drop-zone:focus,
.file-drop-zone.is-dragging {
  border-color: var(--accent);
  background: var(--soft);
  box-shadow: 0 0 0 4px rgba(21, 112, 239, 0.10);
  outline: none;
}

.file-drop-zone.has-file {
  border-color: #12b76a;
  background: #ecfdf3;
}

.file-drop-zone strong {
  font-size: 16px;
}

.file-drop-zone small {
  color: var(--muted);
  font-weight: 600;
}

.file-name {
  border-radius: 999px;
  background: #fff;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  max-width: min(100%, 520px);
  overflow: hidden;
  padding: 6px 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  cursor: pointer;
  height: 100%;
  opacity: 0;
  width: 100%;
}

.recognition-upload-panel {
  max-width: 1080px;
}

.recognition-upload-grid,
.recognition-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.recognition-drop-zone {
  min-height: 260px;
}

.recognition-drop-zone strong {
  font-size: 20px;
}

.recognition-progress {
  margin-top: 14px;
}

.recognition-copy {
  display: grid;
  align-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 20px;
}

.recognition-copy span,
.result-list dt,
.candidate-list strong,
.raw-ocr-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.recognition-copy strong {
  font-size: 21px;
}

.recognition-copy p {
  margin: 0;
  color: var(--muted);
}

.file-field em {
  color: var(--danger);
  font-style: normal;
  font-weight: 650;
}

.screenshot-panel,
.recognition-result-panel {
  min-width: 0;
}

.screenshot-preview {
  display: block;
  width: 100%;
  max-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: #f8fafc;
}

.result-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.result-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 10px;
}

.result-list dt,
.result-list dd {
  margin: 0;
}

.result-list dd {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-weight: 750;
}

.business-result-list {
  grid-template-columns: 1fr;
}

.balance-confirm-form {
  display: grid;
  gap: 16px;
}

.compact-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.primary-balance-field {
  max-width: 420px;
}

.split-balance-toggle {
  width: fit-content;
}

.split-balance-fields[hidden] {
  display: none !important;
}

.exception-field {
  max-width: 680px;
}

.account-search-field {
  gap: 8px;
}

.account-search-input {
  width: 100%;
}

.account-search-field select {
  width: 100%;
}

.account-search-empty {
  color: var(--danger);
  font-weight: 700;
}

.inline-edit-details,
.collapsed-ocr-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.inline-edit-details {
  max-width: 360px;
  padding: 10px 12px;
}

.wealth-inline-details {
  max-width: none;
}

.inline-edit-details summary,
.collapsed-ocr-panel summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.inline-edit-details .field {
  margin-top: 10px;
}

.candidate-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.split-actions {
  justify-content: space-between;
}

.raw-ocr-panel pre {
  max-height: 260px;
  overflow: auto;
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  white-space: pre-wrap;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-field input {
  width: auto;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.toolbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.inline-form {
  display: inline-flex;
}

.inline-grid-form,
.filter-bar {
  display: grid;
  align-items: end;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
}

.filter-bar {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto auto;
  margin-bottom: 14px;
}

.filter-bar label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.detail-summary div {
  display: grid;
  gap: 6px;
}

.detail-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-summary strong {
  overflow-wrap: anywhere;
}

.admin-danger-zone {
  border-color: #fecdca;
}

.compact-admin-form {
  display: grid;
  gap: 12px;
  max-width: 720px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding: 14px 0 0;
}

.page-link {
  margin: 14px 0 0;
}

.page-link a {
  color: var(--accent-strong);
  font-weight: 700;
}

.notice {
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 11px 12px;
  font-weight: 700;
}

.notice.success {
  border: 1px solid #abefc6;
  background: #ecfdf3;
  color: var(--success);
}

.notice.error {
  border: 1px solid #fecdca;
  background: #fef3f2;
  color: var(--danger);
}

.notice.warning {
  border: 1px solid #fedf89;
  background: #fffaeb;
  color: var(--warning);
}

.notice.info {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.login-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: min(430px, 100%);
  padding: 24px;
}

.login-brand {
  margin-bottom: 20px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-weight: 700;
}

.login-help {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1180px) {
  .metrics {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .manager-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .workspace {
    margin-left: 0;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .content {
    width: min(100% - 24px, 1480px);
  }

  .manager-metrics {
    grid-template-columns: 1fr;
  }

  .manager-metrics .metric-primary,
  .manager-metrics .metric-compact,
  .manager-metrics .metric-alert,
  .manager-metrics .balance-metric {
    grid-column: 1 / -1;
  }

  .two-col,
  .form-grid,
  .inline-grid-form,
  .filter-bar,
  .detail-summary,
  .recognition-upload-grid,
  .recognition-review-grid,
  .result-list {
    grid-template-columns: 1fr;
  }

  .campus-accordion summary {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 620px) {
  .metrics,
  .nav {
    grid-template-columns: 1fr;
  }

  .userbox {
    flex-wrap: wrap;
  }
}
