html, body {
  margin: 0;
  background: var(--mud-palette-background, #F5F6F7);
}

.page {
  padding: 16px 24px;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.list-card {
  flex: 1 0 320px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.list-card > .mud-table {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.list-card > .mud-table > .mud-table-container {
  flex: 1;
  min-height: 0;
}

.list-search {
  max-width: 320px;
}

.nowrap-cell {
  white-space: nowrap;
}

.actions-cell {
  width: 1%;
  white-space: nowrap;
  text-align: right !important;
}

.info-item {
  min-width: 0;
  overflow-wrap: anywhere;
}

.image-slot {
  width: 220px;
}

.image-frame {
  height: 140px;
  border-style: dashed;
  background: var(--mud-palette-background-gray);
}

.amount input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.lines-grid td, .lines-grid th {
  vertical-align: top;
}

.lines-grid .form-field .mud-input-control {
  margin-top: 0;
}

.line-number {
  width: 1%;
  color: var(--mud-palette-text-secondary);
  text-align: right;
  padding-top: 18px !important;
}

.amount-cell {
  width: 160px;
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

.picker-cell {
  min-width: 260px;
}

.total-label, .total {
  font-weight: 600;
}

.picker-code {
  min-width: 48px;
  color: var(--mud-palette-text-secondary);
  font-variant-numeric: tabular-nums;
}

.status-chip {
  font-weight: 600;
}

.loading-screen {
  min-height: 60vh;
}

.boot-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #E2E5E8;
  border-top-color: #00693E;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.login-page {
  min-height: 100vh;
  box-sizing: border-box;
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 32px;
}

.attachment-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-preview {
  padding: 0;
}

.file-preview-frame {
  display: block;
  width: 100%;
  height: 75vh;
  border: 0;
}

.file-preview-image {
  display: block;
  max-width: 100%;
  max-height: 75vh;
  margin: 0 auto;
}

.tree-header {
  font-weight: 600;
}

.year-select {
  max-width: 160px;
}

.lines-grid {
  overflow-x: auto;
}

.lines-grid .mud-simple-table.mud-table-dense * tr td, .lines-grid .mud-simple-table.mud-table-dense * tr th {
  padding: 6px;
}

.lines-grid .amount-cell {
  width: 1%;
  min-width: 120px;
}

.lines-grid .picker-cell {
  width: 24%;
  min-width: 240px;
}

.lines-grid .text-cell {
  min-width: 180px;
}

.lines-grid .currency-cell {
  width: 1%;
}

.currency-cell {
  min-width: 115px;
}

.lines-grid .rate-cell {
  min-width: 100px;
}

.text-cell {
  min-width: 80px;
}

.ticket-cell {
  min-width: 320px;
}

.report-filters .form-field {
  width: 180px;
}

.report-filters .form-field.form-wide {
  width: 320px;
}

.report-filters > .mud-button-root,
.report-filters > .mud-tooltip-root {
  margin-top: 4px;
}

.report-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.report-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--mud-palette-surface);
  white-space: nowrap;
}

.report-table .mud-simple-table.mud-table-dense * tr td,
.report-table .mud-simple-table.mud-table-dense * tr th {
  padding: 6px 10px;
}

.report-table .header-row td {
  font-weight: 600;
}

.report-table .total-row td {
  font-weight: 600;
  border-top: 2px solid var(--mud-palette-lines-default);
}

.report-table .entry-row td {
  background: var(--mud-palette-background-gray);
  font-weight: 500;
}

.report-table .nowrap {
  white-space: nowrap;
}

.report-table .account-cell {
  min-width: 320px;
}

.report-table .amount-cell {
  width: 130px;
}

.report-table .group-cell {
  text-align: center !important;
  border-left: 1px solid var(--mud-palette-lines-default);
}

.report-table thead tr:first-child th {
  top: 0;
}

.report-table thead tr:nth-child(2) th {
  top: 37px;
}

.iban-cell {
  min-width: 290px;
}

.name-cell {
  min-width: 200px;
}

.code-cell {
  min-width: 170px;
}

.line-finding {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin-top: 4px;
  max-width: 360px;
}

.totals-table {
  max-width: 720px;
}

.statement-table .section-row td {
  padding-top: 14px !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
}

.statement-table .grand-total-row td {
  border-top: 3px double var(--mud-palette-lines-default);
}

.report-table .indent-cell {
  padding-left: 30px !important;
}

.report-table .muted {
  color: var(--mud-palette-text-secondary);
}

.app-search {
  flex: 0 1 480px;
  padding: 0 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
}

.app-search .mud-input,
.app-search .mud-input-adornment .mud-icon-root {
  color: var(--mud-palette-appbar-text);
}

.task-row .mud-chip {
  min-width: 36px;
  justify-content: center;
}

.tab-host {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--mud-appbar-height) + var(--mud-appbar-height) / 4);
}

.tab-header .mud-tab {
  text-transform: none;
}

.tab-panes {
  flex: 1;
  min-height: 0;
}

.tab-pane {
  height: 100%;
  overflow: auto;
}

.record-dialog-content {
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

.record-summary {
  padding-left: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.nav-search {
  padding: 12px 12px 4px;
}

.list-card .mud-table-root th,
.list-card .mud-table-root td {
  white-space: nowrap;
}

.list-card .mud-table-root td.wrap-cell {
  white-space: normal;
  min-width: 240px;
}

.mud-toolbar .mud-button-root {
  white-space: nowrap;
  flex-shrink: 0;
}

.list-card .mud-table-container {
  overflow-x: auto;
}

.list-card .mud-table-root .mud-table-cell {
  padding-left: 10px;
  padding-right: 10px;
}

.filter-drawer {
  display: flex;
  flex-direction: column;
}

.filter-drawer .mud-drawer-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.filter-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.filter-drawer .form-field {
  width: 100%;
}

.filter-chip {
  max-width: 320px;
}

.filter-drawer .year-select {
  max-width: none;
}

.filter-drawer .report-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-drawer .report-filters .form-field,
.filter-drawer .report-filters .form-field.form-wide {
  width: 100%;
}

.mud-toolbar .mud-chip {
  flex-shrink: 0;
}
