:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6f8;
  color: #20242a;
  --brand-red: #a91927;
  --brand-red-hover: #86131f;
  --brand-gray: #70706f;
  --brand-gray-hover: #565655;
}

@view-transition {
  navigation: auto;
}

body {
  margin: 0;
}

.app-shell-body {
  background: #f4f6f8;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.app-shell.is-sidebar-collapsed {
  grid-template-columns: 56px minmax(0, 1fr);
}

.app-sidebar {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-right: 1px solid #d8dee8;
  box-sizing: border-box;
  height: 100vh;
  overflow-y: auto;
  padding: 14px 16px 12px;
  position: sticky;
  top: 0;
  view-transition-name: app-sidebar;
  scrollbar-width: none;
}

.app-sidebar::-webkit-scrollbar { display: none; }

.desktop-sidebar-toggle {
  align-items: center;
  background: #ffffff;
  border: 1px solid #c6ced9;
  border-radius: 6px;
  color: #344054;
  cursor: pointer;
  display: inline-flex;
  font-size: 22px;
  height: 32px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 10px;
  top: 10px;
  width: 32px;
}

.desktop-sidebar-toggle:hover {
  background: #eef2f6;
}

.app-shell.is-sidebar-collapsed .desktop-sidebar-toggle span {
  transform: rotate(180deg);
}

.app-shell.is-sidebar-collapsed .sidebar-brand,
.app-shell.is-sidebar-collapsed .workspace-nav,
.app-shell.is-sidebar-collapsed .sidebar-utilities {
  display: none;
}

.app-shell.is-sidebar-collapsed .app-sidebar {
  overflow: hidden;
  padding: 0;
}

.sidebar-brand {
  display: block;
  flex: 0 0 auto;
  margin: 0 2px 10px;
}

.sidebar-brand img {
  display: block;
  height: 66px;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  width: 100%;
}

.workspace-nav {
  align-content: start;
  display: grid;
  flex: 1 1 auto;
  gap: 7px;
  grid-auto-rows: max-content;
  min-height: 0;
}

.sidebar-utilities {
  flex: 0 0 auto;
  margin: 0 0 7px;
}

.sidebar-user {
  align-items: center;
  color: #344054;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 400;
  justify-content: space-between;
  list-style: none;
  overflow-wrap: anywhere;
  padding: 7px 10px;
}

.sidebar-user::-webkit-details-marker { display: none; }

.account-chevron {
  border-bottom: 1.5px solid #667085;
  border-right: 1.5px solid #667085;
  height: 6px;
  margin-left: 8px;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 150ms ease;
  width: 6px;
}

.sidebar-utilities[open] .account-chevron { transform: rotate(225deg) translate(-2px, -2px); }
.sidebar-account-menu { display: grid; gap: 1px; }

.sidebar-utilities form {
  margin: 0;
}

.sidebar-action {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.sidebar-action:hover {
  background: #eef2f6;
}

.workspace-company {
  border-top: 1px solid #e5e9ef;
  padding-top: 8px;
}

.workspace-data-group {
  border-top: 1px solid #e5e9ef;
  margin-top: 2px;
  padding-top: 8px;
}

.workspace-data-group > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  list-style: none;
  padding: 2px 8px 5px;
}

.workspace-data-group > summary::-webkit-details-marker { display: none; }
.workspace-data-group > summary span:first-child { color: #344054; font-size: 13px; font-weight: 400; }
.workspace-data-group[open] .company-chevron { transform: rotate(225deg) translate(-2px, -2px); }
.workspace-data-links { display: grid; gap: 1px; padding: 2px 0 2px 10px; }

.workspace-company > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  list-style: none;
  padding: 2px 8px 5px;
}

.workspace-company > summary::-webkit-details-marker {
  display: none;
}

.workspace-company > summary span:first-child {
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.company-chevron {
  border-bottom: 1.5px solid #667085;
  border-right: 1.5px solid #667085;
  height: 6px;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 150ms ease;
  width: 6px;
}

.workspace-company[open] .company-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.workspace-modules {
  display: grid;
  gap: 2px;
}

.workspace-module-group {
  border-left: 3px solid transparent;
  padding: 2px 0 2px 10px;
}

.workspace-module-group.is-current {
  border-left-color: var(--brand-red);
}

.workspace-module-title {
  align-items: center;
  color: #344054;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 400;
  gap: 8px;
  justify-content: space-between;
  list-style: none;
  margin-bottom: 1px;
  padding: 3px 8px 3px 0;
}

.workspace-module-title::-webkit-details-marker {
  display: none;
}

.module-chevron {
  border-bottom: 1.5px solid #667085;
  border-right: 1.5px solid #667085;
  height: 5px;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 150ms ease;
  width: 5px;
}

.workspace-module-group[open] .module-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.workspace-template-links {
  display: grid;
  gap: 1px;
  padding-left: 12px;
}

.workspace-template-link {
  border-radius: 5px;
  color: #667085;
  display: block;
  font-size: 13px;
  line-height: 1.35;
  padding: 5px 8px;
  text-decoration: none;
}

.workspace-template-link:hover {
  background: #eef2f6;
  color: #20242a;
}

.workspace-template-link.is-current {
  background: #e7e9ec;
  color: #20242a;
  font-weight: 400;
}

.workspace-module-direct {
  color: #344054;
  font-size: 13px;
  font-weight: 400;
  margin-left: 0;
  padding: 6px 8px 6px 10px;
}

.workspace-module-direct.is-current {
  border-left: 3px solid var(--brand-red);
  border-radius: 0 5px 5px 0;
  padding-left: 7px;
}

.workspace-link {
  border-radius: 6px;
  color: #344054;
  display: block;
  font-size: 14px;
  padding: 9px 10px;
  text-decoration: none;
}

.workspace-link:hover {
  background: #eef2f6;
}

.workspace-link.is-disabled {
  color: #98a2b3;
  cursor: not-allowed;
}

.app-content {
  box-sizing: border-box;
  min-width: 0;
  view-transition-name: app-content;
}

.workspace-heading span {
  color: #667085;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
}

.workspace-heading h1 {
  font-size: 22px;
}

.mobile-menu-button,
.sidebar-backdrop {
  display: none;
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .app-shell.is-sidebar-collapsed {
    display: block;
  }

  .app-sidebar {
    border-bottom: 0;
    border-right: 1px solid #d8dee8;
    height: 100vh;
    left: 0;
    max-width: 86vw;
    padding: 18px 16px;
    position: fixed;
    top: 0;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    width: 280px;
    z-index: 80;
    scrollbar-width: none;
  }

  .app-shell.is-sidebar-collapsed .sidebar-brand,
  .app-shell.is-sidebar-collapsed .workspace-nav,
  .app-shell.is-sidebar-collapsed .sidebar-utilities {
    display: initial;
  }

  .desktop-sidebar-toggle {
    display: none;
  }

  .app-sidebar.is-open {
    transform: translateX(0);
  }

  .workspace-nav {
    display: grid;
    gap: 7px;
  }

  .workspace-company {
    width: auto;
  }

  .mobile-menu-button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #c6ced9;
    border-radius: 6px;
    color: #344054;
    cursor: pointer;
    display: inline-flex;
    font-size: 22px;
    height: 40px;
    justify-content: center;
    padding: 0;
    width: 40px;
  }

  .sidebar-backdrop {
    background: rgba(32, 36, 42, 0.38);
    border: 0;
    display: block;
    inset: 0;
    padding: 0;
    position: fixed;
    z-index: 70;
  }

  body.menu-open {
    overflow: hidden;
  }
}

[hidden] {
  display: none !important;
}

.page {
  min-height: 100vh;
  padding: 28px;
}

.toolbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 0 0 18px;
}

.brand-link {
  display: inline-flex;
  flex: 0 0 auto;
}

.brand-logo {
  display: block;
  height: 88px;
  max-width: min(420px, 46vw);
  object-fit: contain;
  object-position: left center;
  width: auto;
}

h1 {
  font-size: 26px;
  margin: 0;
}

h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

.panel {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  overflow: visible;
}

.controls {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  padding: 18px;
}

.workspace-controls {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.configuration-control-hidden {
  display: none !important;
}

label span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

select,
input[type="search"],
input[type="date"],
input[type="text"],
input[type="password"],
textarea {
  background: #ffffff;
  border: 1px solid #c6ced9;
  border-radius: 6px;
  box-sizing: border-box;
  color: #20242a;
  font-size: 15px;
  height: 40px;
  padding: 0 10px;
  width: 100%;
}

textarea {
  height: auto;
  line-height: 1.4;
  min-height: 88px;
  padding: 10px;
  resize: vertical;
}

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

.logout-form {
  margin: 0;
}

.user-badge {
  background: #eef2f6;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
}

.auth-page {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-panel {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  box-sizing: border-box;
  display: grid;
  gap: 16px;
  margin: 0 auto;
  max-width: 380px;
  padding: 24px;
  width: 100%;
}

.auth-panel .button {
  width: 100%;
}

.auth-logo {
  display: block;
  height: auto;
  margin: 0 auto 4px;
  max-width: 290px;
  width: 100%;
}

.auth-actions {
  display: grid;
  gap: 10px;
}

.session-summary {
  border: 1px solid #e5e9ef;
  border-radius: 6px;
  margin: 0;
  overflow: hidden;
}

.session-summary div {
  display: grid;
  gap: 8px;
  grid-template-columns: 130px 1fr;
  padding: 10px 12px;
}

.session-summary div + div {
  border-top: 1px solid #e5e9ef;
}

.session-summary dt {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.session-summary dd {
  font-size: 13px;
  margin: 0;
  overflow-wrap: anywhere;
}

.auth-logout {
  margin: 12px auto 0;
  max-width: 380px;
  width: 100%;
}

.auth-logout .button {
  width: 100%;
}

.audit-filter-panel {
  margin-bottom: 16px;
}

.audit-filters {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) minmax(140px, 0.8fr) 150px 150px auto;
  padding: 18px;
}

.filter-actions {
  align-items: end;
  display: flex;
  gap: 10px;
}

.audit-section {
  margin-top: 16px;
}

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

.section-title {
  align-items: center;
  display: flex;
  gap: 8px;
}

.section-title h2 {
  margin: 0;
}

.section-heading span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.audit-table {
  min-width: 1280px;
}

.generation-table {
  min-width: 1560px;
}

.detail-cell {
  max-width: 420px;
  min-width: 280px;
}

.detail-cell pre {
  background: #f8fafc;
  border: 1px solid #e5e9ef;
  border-radius: 6px;
  box-sizing: border-box;
  color: #344054;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  max-height: 140px;
  overflow: auto;
  padding: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.selection-bar {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid #d8dee8;
  border-top: 1px solid #d8dee8;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 18px;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
}

.selection-generate {
  margin-left: auto;
  white-space: nowrap;
}

.select-all {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.select-all span {
  margin: 0;
}

.guide-providence {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.guide-providence[hidden] {
  display: none;
}

.guide-providence span {
  margin: 0;
  white-space: nowrap;
}

.guide-providence select {
  min-width: 310px;
}

.office-controls {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(260px, 520px);
  padding: 18px;
}

.office-selection-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.office-selection-actions .button {
  box-sizing: border-box;
  justify-content: center;
  min-width: 110px;
  text-align: center;
}

.data-filter {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(280px, 560px) auto auto 1fr;
  margin-bottom: 12px;
  padding: 14px 18px;
}

.data-filter label {
  display: grid;
  gap: 6px;
}

.data-table {
  min-width: 1050px;
}

.data-obligations {
  max-height: 280px;
  overflow: auto;
  padding: 8px 18px 14px 54px;
}

.data-editor { margin: 12px 0; }
.data-editor > summary { cursor: pointer; font-weight: 700; padding: 12px 14px; }
.data-editor.compact { border: 1px solid #d8dee8; background: #fff; }
.data-edit-grid { box-sizing: border-box; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px; width: 100%; }
.data-edit-grid label { min-width: 0; }
.data-edit-grid label span { display: block; margin-bottom: 5px; font-weight: 600; }
.data-edit-grid input, .data-edit-grid select, .data-confirm-form input {
  background: #fff;
  border: 1px solid #c6ced9;
  border-radius: 6px;
  box-sizing: border-box;
  font: inherit;
  height: 40px;
  min-width: 0;
  padding: 0 10px;
  width: 100%;
}
.data-edit-grid .wide { grid-column: 1 / -1; }
.data-form-actions { display: flex; justify-content: flex-end; }
.obligation-form { width: 100%; }
@media (max-width: 900px) { .data-edit-grid { grid-template-columns: 1fr; } .data-edit-grid .wide { grid-column: auto; } }

.data-row-actions { align-items: center; display: flex; gap: 6px; white-space: nowrap; }
.icon-button.danger-icon {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}
.icon-button.danger-icon:hover {
  background: var(--brand-red-hover);
  border-color: var(--brand-red-hover);
  color: #fff;
}
.data-dialog {
  border: 0;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(16, 24, 40, 0.24);
  box-sizing: border-box;
  max-height: min(88vh, 760px);
  max-width: 820px;
  overflow: auto;
  padding: 0;
  width: min(820px, calc(100vw - 40px));
}
.data-dialog::backdrop { background: rgba(16, 24, 40, 0.48); }
.data-dialog-header {
  align-items: center;
  border-bottom: 1px solid #d8dee8;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}
.data-dialog-header h2 { font-size: 18px; margin: 0; }
.data-confirm-dialog { max-width: 520px; }
.data-confirm-form { display: grid; gap: 14px; padding: 16px; }
.data-confirm-form p { margin: 0; }

.data-import-dialog { max-width: 620px; }
.data-dialog-header p { color: var(--muted); font-size: 13px; margin: 3px 0 0; }
.data-import-form { display: grid; gap: 16px; padding: 16px; }
.data-import-form > p { color: var(--muted); margin: 0; }
.data-import-form .data-form-actions { gap: 8px; }
.import-preview { margin-bottom: 16px; padding: 16px; }
.import-preview-heading { align-items: center; display: flex; justify-content: space-between; gap: 16px; }
.import-preview-heading > div > span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.import-preview-heading h2 { font-size: 17px; margin: 3px 0 0; overflow-wrap: anywhere; }
.status-badge { background: #e9f5ee; border: 1px solid #9fd2b2; border-radius: 999px; color: #166534; font-size: 12px; font-weight: 700; padding: 4px 9px; }
.import-summary-grid { display: grid; gap: 8px; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 16px; }
.import-summary-grid > div { background: var(--surface-muted); border: 1px solid var(--border); border-radius: 5px; display: grid; gap: 3px; padding: 12px; }
.import-summary-grid strong { font-size: 20px; }
.import-summary-grid span { color: var(--muted); font-size: 12px; }
.import-summary-grid .is-new strong { color: #166534; }
.import-summary-grid .is-updated strong { color: #175a95; }
.import-summary-grid .is-warning strong { color: #9a6700; }
.import-preview-note { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.import-preview-actions { align-items: end; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; padding-top: 16px; }
.import-confirm-form { align-items: end; display: flex; gap: 10px; }
.import-confirm-form label { display: grid; gap: 5px; }
.import-confirm-form label span { font-size: 13px; font-weight: 600; }
.import-confirm-form input { min-width: min(360px, 40vw); }

@media (max-width: 1100px) {
  .import-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .import-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-preview-actions, .import-confirm-form { align-items: stretch; flex-direction: column; }
  .import-preview-actions form, .import-confirm-form input, .import-preview-actions .button { width: 100%; }
}

.data-obligations table {
  min-width: 760px;
  width: 100%;
}

@media (max-width: 760px) {
  .data-filter {
    grid-template-columns: 1fr auto;
  }

  .data-filter label {
    grid-column: 1 / -1;
  }

  .data-obligations { padding-left: 8px; padding-right: 8px; }
  .data-dialog { width: calc(100vw - 20px); }
}

.institution-selector {
  border: 0;
  border-top: 1px solid #d8dee8;
  margin: 0;
  padding: 14px 18px 18px;
}

.institution-selector legend {
  font-size: 14px;
  font-weight: 700;
  padding: 0 6px;
}

.institution-grid {
  display: grid;
  gap: 10px 18px;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.checkbox-line {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.checkbox-line span {
  margin: 0;
}

.office-documents-row > td {
  padding: 0 12px 12px 72px;
}

.office-documents-row.is-collapsed {
  display: none;
}

.office-row-controls {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.office-documents-table {
  table-layout: fixed;
  width: 100%;
}

.office-documents-table th:first-child {
  width: 245px;
}

.office-documents-table th:last-child {
  width: 190px;
}

.office-actions {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 5px;
  white-space: nowrap;
}

.danger-icon {
  color: #b42318;
}

.office-modal-card {
  max-width: 680px;
}

.office-modal-card form {
  display: grid;
  gap: 14px;
}

.office-detail {
  display: grid;
  grid-template-columns: 120px 1fr;
  margin: 0;
}

.office-detail dt,
.office-detail dd {
  border-bottom: 1px solid #e1e6ee;
  margin: 0;
  padding: 8px;
}

@media (max-width: 900px) {
  .office-controls,
  .institution-grid {
    grid-template-columns: 1fr;
  }
}

.button {
  align-items: center;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  padding: 0 14px;
  text-decoration: none;
}

.button.primary {
  background: var(--brand-gray);
  border: 1px solid var(--brand-gray);
  color: #ffffff;
}

.button.primary:hover:not(:disabled) {
  background: var(--brand-gray-hover);
  border-color: var(--brand-gray-hover);
}

.button.secondary {
  background: #f5f5f4;
  border: 1px solid #c8c8c6;
  color: var(--brand-gray-hover);
}

.button.secondary:hover:not(:disabled) {
  background: #e8e8e6;
  border-color: #a9a9a8;
  color: #3f3f3e;
}

.button.danger {
  background: var(--brand-red);
  border: 1px solid var(--brand-red);
  color: #ffffff;
}

.button.danger:hover:not(:disabled) {
  background: var(--brand-red-hover);
  border-color: var(--brand-red-hover);
}

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

.icon-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #b9c3d0;
  border-radius: 6px;
  box-sizing: border-box;
  color: #20242a;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  text-decoration: none;
  width: 30px;
}

.icon-button:hover {
  background: #f2f2f1;
  border-color: var(--brand-gray);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

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

.pagination-bar {
  min-height: 58px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
  background: #fff;
}

.pagination-bar-top {
  border-top: 0;
  border-bottom: 1px solid var(--border);
}

.pagination {
  min-height: 62px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  gap: 16px;
  background: var(--surface);
}

.pagination-link {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  background: #fff;
}

.pagination-link:hover,
.pagination-link.is-current {
  border-color: #9ca3ab;
  background: #e6e8ea;
}

.pagination-link.is-current {
  border-color: #737980;
  font-weight: 700;
}

.pagination-link.is-disabled {
  pointer-events: none;
  opacity: 0.4;
}

.pagination-summary {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.pagination-summary strong {
  color: var(--text);
  font-weight: 600;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: center;
}

.pagination-direction {
  color: var(--muted);
}

.pagination-page {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  background: #fff;
}

.pagination-page:hover,
.pagination-page.is-current {
  border-color: #8f959c;
  background: #e6e8ea;
}

.pagination-page.is-current {
  font-weight: 700;
}

.pagination-pages .is-disabled {
  pointer-events: none;
  opacity: 0.35;
}

.pagination-size {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.pagination .pagination-size {
  gap: 4px;
}

.pagination .pagination-size > span {
  margin-right: 6px;
  white-space: nowrap;
}

.pagination-size select {
  width: 76px;
}

@media (max-width: 760px) {
  .pagination-bar,
  .pagination {
    grid-template-columns: 1fr;
  }

  .pagination-pages,
  .pagination-size {
    justify-self: start;
  }
}

table {
  border-collapse: collapse;
  min-width: 1180px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e5e9ef;
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #eef2f6;
  font-size: 13px;
}

td {
  font-size: 14px;
}

tbody tr:hover {
  background: #f7fbff;
}

.record-row {
  background: #ffffff;
}

.row-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.collapse-toggle {
  background: #ffffff;
  border: 1px solid #b9c3d0;
  border-radius: 6px;
  color: #20242a;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  height: 28px;
  line-height: 1;
  padding: 0;
  width: 28px;
}

.collapse-toggle:hover {
  background: #eef2f6;
}

.titles-row.is-collapsed {
  display: none;
}

.titles-row > td {
  background: #fbfcfe;
  padding-bottom: 16px;
  padding-top: 0;
}

.titles-table {
  border: 1px solid #dde3ec;
  border-radius: 6px;
  min-width: 1120px;
  overflow: hidden;
}

.titles-table th {
  background: #f4f7fb;
}

.titles-table th,
.titles-table td {
  font-size: 13px;
  padding: 8px 10px;
}

.titles-table tr:last-child td {
  border-bottom: 0;
}

.title-row.is-disabled {
  color: #8a94a6;
}

.title-row.has-document {
  background: #fbfcfe;
}

.title-check:disabled,
.record-check:disabled {
  cursor: not-allowed;
}

.document-actions {
  align-items: center;
  display: flex;
  gap: 6px;
}

.document-pending {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.modal-backdrop {
  align-items: center;
  background: rgba(32, 36, 42, 0.42);
  bottom: 0;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 24px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(32, 36, 42, 0.22);
  box-sizing: border-box;
  max-height: calc(100vh - 48px);
  max-width: 520px;
  overflow-y: auto;
  padding: 18px;
  width: 100%;
}

.modal-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.document-detail-list {
  border: 1px solid #e5e9ef;
  border-radius: 6px;
  margin: 0;
  overflow: hidden;
}

.document-detail-list div {
  display: grid;
  gap: 10px;
  grid-template-columns: 140px 1fr;
  padding: 10px 12px;
}

.document-detail-list div + div {
  border-top: 1px solid #e5e9ef;
}

.document-detail-list dt {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.document-detail-list dd {
  font-size: 13px;
  margin: 0;
  overflow-wrap: anywhere;
}

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

.version-list {
  border: 1px solid #e5e9ef;
  border-radius: 6px;
  max-height: 240px;
  overflow-y: auto;
}

.version-item {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
}

.version-item + .version-item {
  border-top: 1px solid #e5e9ef;
}

.version-link {
  color: #0b5cab;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.version-badge {
  background: #eef6ff;
  border: 1px solid #bdd7f3;
  border-radius: 999px;
  color: #185a9d;
  font-size: 11px;
  font-weight: 700;
  justify-self: start;
  padding: 2px 8px;
}

.version-meta,
.version-reason,
.version-empty {
  color: #667085;
  font-size: 12px;
  margin: 0;
}

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

.upload-field {
  display: grid;
  gap: 6px;
}

.upload-field span {
  color: #242933;
  font-size: 13px;
  font-weight: 700;
}

.upload-field input,
.upload-field textarea {
  border: 1px solid #c9d2df;
  border-radius: 6px;
  box-sizing: border-box;
  color: #242933;
  font: inherit;
  padding: 9px 10px;
  width: 100%;
}

.upload-field textarea {
  min-height: 78px;
  resize: vertical;
}

.empty {
  color: #667085;
  padding: 24px;
  text-align: center;
}

.alert {
  background: #fff4df;
  border: 1px solid #e6b75f;
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.alert ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.notice {
  background: #eaf8f0;
  border: 1px solid #8ed0aa;
  border-radius: 8px;
  color: #115c33;
  font-weight: 700;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.void-filter-panel {
  margin-bottom: 16px;
}

.void-filters {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(200px, 1fr) minmax(160px, 0.8fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(140px, 0.7fr) 130px auto;
  padding: 18px;
}

.void-selection-panel {
  margin-top: 16px;
}

.selection-note {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  margin-left: auto;
}

.void-reason-panel {
  border-bottom: 1px solid #d8dee8;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.8fr) auto;
  padding: 16px 18px;
}

.void-reason-panel textarea {
  min-height: 74px;
}

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

.checkbox-line input {
  flex: 0 0 auto;
}

.checkbox-line span {
  margin: 0;
}

.void-action-buttons {
  align-items: end;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.status-badge {
  background: #eef2f6;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
}

.status-badge.active {
  background: #eaf8f0;
  border-color: #8ed0aa;
  color: #115c33;
}

.status-badge.voided {
  background: #fff4df;
  border-color: #e6b75f;
  color: #875000;
}

.void-group-table {
  min-width: 1160px;
}

.void-documents-table {
  border: 1px solid #dde3ec;
  border-radius: 6px;
  min-width: 920px;
  overflow: hidden;
}

.void-documents-table th {
  background: #f4f7fb;
}

.void-documents-table th,
.void-documents-table td {
  font-size: 13px;
  padding: 8px 10px;
}

.void-documents-row.is-collapsed {
  display: none;
}

.void-documents-row > td {
  background: #fbfcfe;
  padding-bottom: 16px;
  padding-top: 0;
}

.void-group-controls {
  align-items: center;
  display: flex;
  gap: 10px;
}

.void-group-check {
  cursor: pointer;
  height: 16px;
  margin: 0;
  width: 16px;
}

.void-group-check:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.title-number-cell {
  max-width: 360px;
  overflow-wrap: anywhere;
}

.filename-cell {
  max-width: 520px;
  overflow-wrap: anywhere;
}

.document-row.is-disabled {
  color: #8a94a6;
}

.void-limit-note {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 18px 16px;
  text-align: right;
}

.void-confirmation-summary {
  background: #fff8e8;
  border-bottom: 1px solid #e6c675;
  color: #5f4300;
  padding: 12px 18px;
}

.void-confirmation-summary ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.guide-void-filters {
  grid-template-columns: minmax(180px, 1fr) minmax(200px, 1fr) minmax(180px, 1fr) 130px minmax(130px, 0.7fr) 120px auto;
}

.guide-void-table {
  min-width: 1500px;
}

@media (max-width: 760px) {
  .page {
    padding: 18px;
  }

  .toolbar,
  .selection-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-logo {
    height: 72px;
    max-width: 100%;
  }

  .guide-providence {
    align-items: stretch;
    flex-direction: column;
    margin-left: 0;
  }

  .selection-generate {
    margin-left: 0;
    width: 100%;
  }

  .office-selection-actions {
    margin-left: 0;
    width: 100%;
  }

  .office-selection-actions .button {
    flex: 1 1 0;
  }

  .guide-providence select {
    min-width: 0;
  }

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

  .audit-filters {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .session-summary div {
    grid-template-columns: 1fr;
  }

  .document-detail-list div {
    grid-template-columns: 1fr;
  }

  .void-filters,
  .void-reason-panel {
    grid-template-columns: 1fr;
  }

  .selection-note {
    margin-left: 0;
  }

  .void-action-buttons {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
