html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

body:has(.mutatie-overzicht),
body:has(.dashboard-overzicht),
body:has(.categorie-overzicht) {
  margin-bottom: 0;
  overflow: hidden;
}

.hoofdtabbladen .nav-link {
  border-radius: 0.25rem;
  padding: 0.35rem 0.75rem;
}

.hoofdtabbladen .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.totaal-vermogen-hoverzone {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.55rem;
  z-index: 40;
  cursor: default;
}

.totaal-vermogen-hoverzone:hover {
  height: 2.75rem;
}

.totaal-vermogen-popup {
  display: none;
  position: absolute;
  top: 0.4rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 0.75rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.12);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
  z-index: 41;
  pointer-events: none;
}

.totaal-vermogen-hoverzone:hover .totaal-vermogen-popup {
  display: block;
}

header {
  position: relative;
}

.mutatie-overzicht {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 6.5rem);
  max-height: calc(100vh - 6.5rem);
  min-height: 20rem;
  overflow: hidden;
}

body.heeft-subnav .mutatie-overzicht,
body.heeft-subnav .dashboard-overzicht,
body.heeft-subnav .categorie-overzicht {
  height: calc(100vh - 9.5rem);
  max-height: calc(100vh - 9.5rem);
}

.mutatie-overzicht-kop {
  flex-shrink: 0;
  padding-bottom: 0.5rem;
}

.login-scherm {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0.5rem 0 1.5rem;
}

.login-paneel {
  width: 100%;
  max-width: 22rem;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background-color: #fff;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.06);
}

.login-titel {
  margin: 0 0 1.25rem;
  font-size: 1.35rem;
  text-align: center;
}

.login-form {
  width: 100%;
}

.login-rij {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  column-gap: 0.5rem;
  align-items: center;
}

.login-rij-centrum {
  display: flex;
  justify-content: center;
}

.login-veld-label {
  text-align: left;
  margin-bottom: 0;
}

/* Formulieren: labels rechts, invoervelden links op één lijn */
.form-uitlijning {
  --form-label-breedte: 11rem;
  --form-kolom-gap: 0.5rem;
  --form-rij-gap: 0.75rem;
}

.form-uitlijning-sm {
  --form-label-breedte: 7rem;
}

.form-uitlijning-md {
  --form-label-breedte: 8rem;
}

.form-uitlijning-rij {
  display: grid;
  grid-template-columns: var(--form-label-breedte) minmax(0, 1fr);
  column-gap: var(--form-kolom-gap);
  row-gap: 0.25rem;
  align-items: center;
  margin-bottom: var(--form-rij-gap);
}

.form-uitlijning-rij-2 {
  display: grid;
  grid-template-columns: var(--form-label-breedte) minmax(0, 1fr);
  column-gap: var(--form-kolom-gap);
  row-gap: 0.25rem;
  align-items: center;
  margin-bottom: var(--form-rij-gap);
}

@media (min-width: 768px) {
  .form-uitlijning-rij-2 {
    grid-template-columns: var(--form-label-breedte) minmax(0, 1fr) var(--form-label-breedte) minmax(0, 1fr);
  }
}

.form-uitlijning-rij-start {
  align-items: start;
}

.form-uitlijning-label {
  text-align: left;
  margin-bottom: 0;
}

.form-uitlijning-veld {
  min-width: 0;
}

.form-uitlijning-veld .form-control,
.form-uitlijning-veld .form-select {
  width: 100%;
}

.login-paneel-2fa {
  max-width: 22rem;
}

.login-form-2fa .login-2fa-velden {
  display: grid;
  grid-template-columns: max-content 7rem;
  column-gap: 0.75rem;
  row-gap: 0.5rem;
  align-items: center;
  justify-items: start;
}

.login-form-2fa .login-2fa-onthoud {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.login-2fa-code {
  width: 100%;
}

.dashboard-overzicht {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 6.5rem);
  max-height: calc(100vh - 6.5rem);
  min-height: 20rem;
  overflow: hidden;
}

.dashboard-overzicht-kop {
  flex-shrink: 0;
  padding-bottom: 0.5rem;
}

.dashboard-categorie-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
}

.dashboard-categorie-scroll .table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: var(--bs-body-bg);
  box-shadow: inset 0 -1px 0 var(--bs-border-color);
}

.categorie-overzicht {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 6.5rem);
  max-height: calc(100vh - 6.5rem);
  min-height: 20rem;
  overflow: hidden;
}

.categorie-overzicht-kop {
  flex-shrink: 0;
  padding-bottom: 0.5rem;
}

.categorie-tabel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
}

.categorie-tabel-scroll .table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: var(--bs-body-bg);
  box-shadow: inset 0 -1px 0 var(--bs-border-color);
}

.dashboard-filter-datum {
  width: 9rem;
}

.dashboard-filter-rekening {
  min-width: 9.5rem;
  max-width: 14rem;
}

.dashboard-filter-weergave .form-select {
  min-width: 7.5rem;
}

.dashboard-grafiek-paneel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  padding: 0.75rem;
  background-color: var(--bs-body-bg);
}

.dashboard-grafiek-container {
  position: relative;
  flex: 1 1 auto;
  min-height: 18rem;
  width: 100%;
}

.mutatie-filter-datum-bedrag {
  display: grid;
  grid-template-columns: 5.25rem 9rem auto 9rem;
  column-gap: 0.25rem;
  row-gap: 0.5rem;
  align-items: center;
}

.mutatie-filter-datum-bedrag .mutatie-filter-rij {
  display: contents;
}

.mutatie-filter-datum-rij {
  flex-wrap: nowrap;
}

.mutatie-filter {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mutatie-filter-velden {
  gap: 0.5rem 0.75rem;
}

.mutatie-filter-check {
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: 0.25rem;
}

.mutatie-filter-rij {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mutatie-filter-veld-label {
  min-width: 5.25rem;
  flex-shrink: 0;
}

.mutatie-filter-tm {
  min-width: auto;
  flex-shrink: 0;
  padding-left: 0.15rem;
}

.mutatie-filter-invoer-datum {
  width: 9rem;
}

.mutatie-filter-invoer-bedrag {
  width: 6rem;
}

.mutatie-filter-tegenpartij .mutatie-filter-rij {
  min-width: 13.5rem;
}

.mutatie-filter-invoer-categorie {
  min-width: 9.5rem;
  max-width: 11rem;
}

.mutatie-filter-acties {
  flex-shrink: 0;
  margin-left: auto;
}

.mutatie-filter-overig {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.mutatie-filter-presets {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.mutatie-filter-presets-trigger {
  position: relative;
  margin-top: 0.35rem;
}

.mutatie-filter-presets-label {
  line-height: 1.2;
  cursor: default;
  user-select: none;
  white-space: nowrap;
}

.mutatie-filter-presets-popup {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.15rem;
  padding: 0.5rem 0.75rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  z-index: 20;
}

.mutatie-filter-presets-trigger:hover .mutatie-filter-presets-popup,
.mutatie-filter-presets-trigger:focus-within .mutatie-filter-presets-popup {
  display: block;
}

.mutatie-filter-reset {
  flex-shrink: 0;
}

.mutatie-filter-weergave {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  flex-shrink: 0;
  min-width: 7.5rem;
}

.mutatie-tabel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
}

.mutatie-paginering {
  flex-shrink: 0;
  padding-top: 0.5rem;
}

.mutatie-tabel-scroll .table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: var(--bs-body-bg);
  box-shadow: inset 0 -1px 0 var(--bs-border-color);
}

.mutatie-tabel-scroll .mutatie-tabel {
  table-layout: fixed;
  width: 100%;
}

.mutatie-tabel-scroll .mutatie-tabel th,
.mutatie-tabel-scroll .mutatie-tabel td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.mutatie-tabel-scroll .mutatie-kolom-datum {
  width: 5.5rem;
}

.mutatie-tabel-scroll .mutatie-kolom-rekening {
  width: 6rem;
}

.mutatie-tabel-scroll .mutatie-kolom-tegenrekening {
  width: 10rem;
}

.mutatie-tabel-scroll .mutatie-kolom-naam {
  width: 20rem;
}

.mutatie-tabel-scroll .mutatie-kolom-bedrag {
  width: 7rem;
}

.mutatie-tabel-scroll .mutatie-kolom-categorie {
  width: 9rem;
}

.mutatie-tabel-scroll .mutatie-kolom-actie {
  width: 5.75rem;
  overflow: visible;
  text-overflow: clip;
}

.mutatie-tabel-scroll .mutatie-tabel td.mutatie-kolom-omschrijving {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
  vertical-align: top;
}

.mutatie-tabel-scroll .mutatie-tabel thead .mutatie-kolom-omschrijving {
  white-space: nowrap;
  vertical-align: middle;
}

.mutatie-tabel-scroll thead .mutatie-kolom-sepa {
  width: 8rem;
  white-space: normal;
  line-height: 1.2;
  vertical-align: bottom;
}

.mutatie-tabel-scroll tbody .mutatie-kolom-sepa {
  width: 8rem;
}

.sectie-inklappen {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.sectie-inklappen::before {
  content: "▸";
  display: inline-block;
  transition: transform 0.15s ease;
}

.sectie-inklappen:not(.collapsed)::before {
  transform: rotate(90deg);
}