/* Context navigation is shared by all route families, not hidden in a catalogue. */
.workspace-notifications { display: grid; place-items: center; flex: 0 0 44px; min-height: 44px; border: 1px solid #dce6f0; border-radius: 12px; background: #fff; color: #3b5873; }
.workspace-shell--sidebar .workspace-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 24px;
  padding: 6px;
  border: 1px solid #dce6f0;
  border-radius: 16px;
  background: #eef4fa;
}
.workspace-section-nav > a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #405b73;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
}
.workspace-section-nav > a:hover { background: #f8fbff; color: #0757b1; }
.workspace-section-nav > a[aria-current] {
  background: #fff;
  color: #075fbf;
  border-color: #d8e6f5;
  box-shadow: 0 2px 5px rgb(34 70 110 / 7%);
}
.workspace-shell--sidebar .workspace-top-navigation > a[aria-current='location'] {
  color: #096acb;
  background: #eaf4ff;
  box-shadow: inset 3px 0 #087cf5;
}
.workspace-section-nav:focus-within { scroll-margin-top: 110px; }
.workspace-shell--sidebar .page-bank .bank-overview { padding: 20px; }
.page-bank .bank-overview > label { max-width: 660px; }
.page-bank .bank-overview > p { max-width: 900px; }
.bank-statement-totals { display: flex; flex-wrap: wrap; gap: 18px 48px; }
.bank-statement-totals p { display: grid; gap: 6px; margin: 10px 0; color: #526980; font-size: 12px; }
.bank-statement-totals strong { color: #162f46; font-size: 22px; font-variant-numeric: tabular-nums; }
.bank-attention { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; }
.workspace-shell--top .bank-attention > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  min-width: 0;
  padding: 14px 18px;
  text-align: left;
  white-space: normal;
  background: #fff;
  border: 1px solid #dce6f0;
  border-radius: 16px;
}
.bank-attention > button > span { color: #405b73; font-size: 13px; }
.bank-attention > button > strong { grid-column: 2; grid-row: 1 / 3; font-size: 28px; line-height: 1.2; color: #163852; font-variant-numeric: tabular-nums; }
.bank-attention > button > small { font-size: 12px; color: #275e90; line-height: 1.4; }
.workspace-shell--top .bank-attention > button:hover { border-color: #3987d4; background: #f5faff; }
.workspace-shell--sidebar .page-bank .bank-lines-card { padding: 20px; }
.bank-lines-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bank-lines-heading h2 { margin: 0; }
.workspace-shell--top .bank-lines-heading > button { min-height: 36px; padding: 7px 10px; font-size: 12px; }
.page-bank .bank-line-filters { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.workspace-shell--sidebar .page-bank .functional-tabs { flex-wrap: nowrap; }
.workspace-shell--sidebar .page-bank .functional-tabs [role='tab'] { flex: 0 0 auto; }
.page-bank .bank-lines-table { width: 100%; min-width: 874px; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.workspace-shell--top .page-bank .bank-lines-table :is(th, td) { padding: 10px; vertical-align: middle; }
.workspace-shell--top .page-bank .bank-lines-table .bank-sort-group > button {
  min-height: 36px;
  width: auto;
  padding: 4px 8px 4px 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  text-align: left;
  white-space: normal;
  color: #36516a;
  font-size: 12px;
}
.bank-sort-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
.page-bank .bank-requisites { margin-top: 5px; font-size: 10px; color: #526b80; }
.page-bank .bank-lines-table .bank-cell-text { line-height: 1.4; }
.page-bank .bank-lines-table .bank-purpose > .bank-cell-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.page-bank .bank-lines-table th:last-child,
.page-bank .bank-lines-table td.bank-reconcile-cell {
  position: sticky;
  right: 0;
  z-index: 1;
  background: #fff;
  box-shadow: -5px 0 9px rgb(23 54 82 / 6%);
}
.page-bank .bank-lines-table th:last-child { background: #eef4f8; z-index: 2; }
.workspace-shell--top .page-bank .bank-lines-table td.bank-reconcile-cell > button {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-height: 52px;
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #dce7f1;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  white-space: normal;
  box-shadow: none;
}
.bank-reconcile-cell button > small { color: #175b97; font-size: 11px; line-height: 1.3; }
.bank-reconcile-cell .bank-match-status { max-width: 100%; font-size: 11px; line-height: 1.3; }
.bank-lines-scroll:focus-visible { outline: 3px solid #1475cf; outline-offset: 2px; }
.bank-lines-title, #bank-lines-title { scroll-margin-top: 110px; }
.bank-detail-dialog {
  width: min(840px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #d7e3ef;
  border-radius: 20px;
  background: #fff;
  color: #18344d;
  box-shadow: 0 24px 90px rgb(14 39 62 / 25%);
}
.bank-detail-dialog::backdrop { background: rgb(16 36 55 / 40%); }
.bank-detail-dialog > header { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 22px; border-bottom: 1px solid #dce6ef; background: #fff; }
.bank-detail-dialog > header > h2 { margin: 0; font-size: 18px; }
.bank-detail-dialog [data-bank-detail-close] { flex: 0 0 44px; min-width: 44px; min-height: 44px; padding: 0; font-size: 24px; }
.bank-detail-dialog #bank-detail { min-width: 0; padding: 20px 22px; outline: none; }
.bank-detail-dialog #bank-detail > .card { padding: 0; border: 0; margin: 0; box-shadow: none; }
.bank-detail-dialog :is(p, small, strong, label, summary) { white-space: normal; overflow-wrap: anywhere; }
.bank-detail-dialog :is(input:not([type='checkbox']), select, textarea) { width: 100%; min-width: 0; }
.bank-detail-dialog form { max-width: 100%; }
.bank-detail-dialog #bank-detail-notice:not([hidden]) { margin: 16px 22px 0; padding: 12px; color: #9b3030; background: #fff0f0; border-radius: 10px; }
.bank-detail-dialog [data-inline-action] { margin-top: 20px; padding: 14px; border: 1px solid #c6d9ed; border-radius: 12px; }
.bank-detail-dialog [data-inline-action] > summary { cursor: pointer; font-weight: 700; }
@media (max-width: 900px) {
  .workspace-notifications { display: none; }
  .workspace-shell--sidebar .workspace-section-nav { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 18px; }
  .workspace-section-nav > a { flex: 0 0 auto; min-height: 44px; }
  .bank-attention { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
  .workspace-shell--top .bank-attention > button { grid-template-columns: minmax(0,1fr); align-items: start; gap: 6px; padding: 12px; }
  .bank-attention > button > span { font-size: 12px; }
  .bank-attention > button > strong { grid-column: 1; grid-row: 2; font-size: 24px; }
  .bank-attention > button > small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .page-bank .bank-quick-actions :is([data-bank-open='sources'],[data-bank-open='diadoc']) { display: none; }
  .page-bank .bank-overview > h2 { margin-block: 0 8px; font-size: 18px; }
  .page-bank .bank-overview > p { font-size: 12px; margin-block: 8px; }
  .workspace-shell--sidebar .page-bank .bank-overview, .workspace-shell--sidebar .page-bank .bank-lines-card { padding: 16px; }
  .page-bank .bank-lines-table td.bank-reconcile-cell { min-width: 150px; }
  .bank-detail-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  .bank-detail-dialog > header, .bank-detail-dialog #bank-detail { padding: 14px; }
  .bank-detail-dialog > header > h2 { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .workspace-section-nav, .bank-detail-dialog { scroll-behavior: auto; }
}
