:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1b1f24;
  --muted: #667085;
  --line: #d8dee7;
  --accent: #2563eb;
  --accent-weak: #dbeafe;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page {
  align-items: center;
  display: flex;
  min-height: 100vh;
  justify-content: center;
  padding: 24px;
}

.login-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  min-width: min(360px, 100%);
  padding: 24px;
}

.login-form label {
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-weight: 650;
}

.login-form input,
.login-form select {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  padding: 9px 10px;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.setup-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
}

.setup-fieldset legend {
  color: var(--text);
  font-weight: 750;
  padding: 0 6px;
}

.setup-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-error {
  color: var(--danger);
  font-weight: 650;
}

.page {
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px;
}

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

.subscriptions-toolbar {
  align-items: stretch;
  display: grid;
  gap: 10px;
}

.toolbar-main {
  align-items: flex-end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.toolbar-search {
  display: flex;
}

.member-toolbar {
  align-items: stretch;
  display: grid;
  gap: 10px;
}

.member-toolbar-main {
  min-width: 0;
}

.member-toolbar .actions {
  justify-content: flex-end;
}

h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

h2 {
  font-size: 17px;
  margin: 0;
}

.title-row {
  align-items: baseline;
  display: flex;
  gap: 8px;
}

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

.meta-line {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

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

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

th {
  background: #eef2f7;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.filter-heading {
  align-items: center;
  display: flex;
  gap: 4px;
  position: relative;
}

.filter-heading > span {
  flex: 1 1 auto;
}

.filter-toggle,
.sort-toggle {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #344054;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  height: 24px;
  justify-content: center;
  min-width: 24px;
  padding: 0 6px;
}

.filter-toggle.active,
.sort-toggle.active {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-menu {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.18);
  color: var(--text);
  left: 0;
  min-width: 220px;
  padding: 8px;
  position: absolute;
  text-transform: none;
  top: calc(100% + 6px);
  z-index: 80;
}

.filter-menu-tools {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.filter-menu-tools button,
.filter-menu-tools a {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  border-color: var(--line);
  color: var(--accent);
  display: inline-flex;
  flex: 0 0 32px;
  font-size: 15px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  text-decoration: none;
}

.filter-value-list {
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
}

.filter-value-list label {
  align-items: center;
  display: flex;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

tbody tr:hover {
  background: var(--accent-weak);
}

.comment {
  white-space: normal;
  min-width: 320px;
}

.invoice {
  white-space: normal;
  min-width: 180px;
}

.invoice-item + .invoice-item {
  margin-top: 6px;
}

.invoice-badge.paid {
  background: #269b3b;
  color: white;
}

.invoice-badge.missing {
  background: #175cd3;
  color: white;
}

.invoice-badge.unpaid {
  background: #c83232;
  color: white;
}

.invoice-badge.amount {
  background: #e58a00;
  color: white;
}

.detail-invoice {
  margin-top: 6px;
  color: var(--muted);
}

.comment-line {
  font-weight: 650;
  white-space: normal;
}

.comment-line + .comment-line {
  margin-top: 2px;
}

.comment-line.error {
  color: var(--danger);
}

.comment-line.ok {
  color: #087443;
}

.comment-line.info {
  color: #175cd3;
}

.detail-comments {
  margin-top: 8px;
}

.compact-button {
  margin-top: 8px;
  padding: 5px 8px;
}

.actions {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.rpc-counter {
  align-items: center;
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  min-height: 34px;
  padding: 5px 8px;
}

.icon-link {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #344054;
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  font-weight: 700;
  height: 38px;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  width: 38px;
}

.icon-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-link:disabled {
  cursor: wait;
  opacity: 0.6;
}

.year-filter select {
  background: transparent;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 0 18px 0 0;
}

.tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.tab-button {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--muted);
  padding: 10px 14px;
}

.tab-button.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.tab-screen {
  display: none;
}

.tab-screen.active {
  display: block;
}

.search-input {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  min-width: min(420px, 100%);
  padding: 8px 10px;
}

.button,
button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  border-radius: 6px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary,
button.secondary {
  background: white;
  color: var(--accent);
}

button:disabled {
  border-color: var(--line);
  color: var(--muted);
  background: #f2f4f7;
  cursor: not-allowed;
}

.back-link {
  color: var(--accent);
  display: inline-block;
  margin-bottom: 6px;
  text-decoration: none;
}

.table-link {
  color: var(--accent);
  text-decoration: none;
}

.table-link.strong {
  font-weight: 700;
}

.table-link:hover,
.back-link:hover {
  text-decoration: underline;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 14px;
  background: #269b3b;
  color: white;
  font: inherit;
  font-weight: inherit;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.status-renewed {
  background: #667085;
}

.editable-table input,
.editable-table select {
  width: 100%;
  min-width: 130px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
  font: inherit;
  background: white;
}

.icon-button {
  border-color: #fecdca;
  background: white;
  color: var(--danger);
}

.status {
  min-height: 22px;
  margin-top: 12px;
  color: var(--muted);
  white-space: pre-line;
}

.status-entry {
  margin-top: 4px;
}

.status-entry.error {
  color: var(--danger);
}

.status-entry.ok {
  color: #087443;
}

.compta-page #status {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  bottom: 18px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .18);
  color: var(--text);
  left: auto;
  margin: 0;
  max-width: min(420px, calc(100vw - 32px));
  min-height: 0;
  padding: 10px 12px;
  position: fixed;
  right: 18px;
  z-index: 200;
}

.compta-page #status:empty {
  display: none;
}

.compta-page #status.status-entry.ok {
  border-color: #abefc6;
  color: #067647;
}

.compta-page #status.status-entry.error {
  border-color: #fecdca;
  color: #b42318;
}

.compta-page #status.status-entry.info {
  border-color: #b2ddff;
  color: #175cd3;
}

.public-page {
  max-width: 1180px;
}

.public-toolbar {
  align-items: flex-start;
}

.public-members-table th,
.public-members-table td {
  white-space: normal;
}

.stats-panel {
  max-width: 900px;
}

.stats-table td:not(:first-child),
.stats-table th:not(:first-child) {
  text-align: right;
}

.stats-table tfoot th {
  background: #e6edf5;
  border-bottom: 0;
}

.muted-line {
  color: var(--muted);
  display: block;
  margin-top: 4px;
  white-space: normal;
}

.batch-panel {
  display: grid;
  gap: 16px;
  padding: 0;
}

.batch-actions-table td {
  white-space: normal;
}

.batch-buttons {
  white-space: nowrap;
}

.batch-result {
  border-top: 1px solid var(--line);
  min-width: 920px;
}

.batch-result-header {
  align-items: baseline;
  display: flex;
  gap: 10px;
  padding: 12px;
}

.batch-result-header span {
  color: var(--muted);
}

.action-log-section {
  border-top: 2px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
}

.section-heading {
  align-items: baseline;
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.section-heading p {
  margin: 0;
}

.action-log-panel td {
  white-space: normal;
}

.compta-page {
  max-width: 1600px;
}

.compta-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.compta-summary div {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

.compta-summary strong,
.compta-summary span {
  display: block;
}

.compta-summary span {
  color: var(--muted);
  margin-top: 4px;
  white-space: normal;
}

.compta-ledger-panel {
  overflow: visible;
  padding: 0;
}

.compta-table-header {
  justify-content: space-between;
}

.ledger-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ledger-year-selector {
  position: relative;
}

.ledger-year-selector summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  list-style: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ledger-year-selector summary::-webkit-details-marker {
  display: none;
}

.ledger-year-menu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 24px rgba(16, 24, 40, .14);
  display: grid;
  gap: 4px;
  min-width: 84px;
  padding: 6px;
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 90;
}

.ledger-year-menu a {
  align-items: center;
  background: transparent;
  border-radius: 4px;
  color: var(--text);
  display: flex;
  font-size: 13px;
  font-weight: 600;
  justify-content: flex-start;
  padding: 5px 8px;
  text-decoration: none;
}

.ledger-year-menu a:hover,
.ledger-year-menu a.active {
  background: #edf3f5;
  color: var(--accent);
}

.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 4px;
  max-width: 820px;
}

.filter-chip {
  align-items: center;
  background: #f2f4f7;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  color: #344054;
  display: inline-flex;
  font-size: 12px;
  font-weight: 650;
  gap: 5px;
  line-height: 1.2;
  max-width: 260px;
  padding: 4px 6px;
  text-decoration: none;
}

.filter-chip span:not(.filter-chip-key):not(.filter-chip-remove) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip-key {
  color: #667085;
  font-weight: 750;
}

.filter-chip-remove {
  color: #667085;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

.filter-chip:hover {
  background: #e6edf5;
  border-color: #98a2b3;
}

.pagination-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.page-size-link {
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  padding: 5px 8px;
  text-decoration: none;
}

.page-size-link.active {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 750;
}

.pagination-button {
  min-width: 34px;
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}

.column-header-link {
  align-items: center;
  color: inherit;
  display: inline-flex;
  flex: 1 1 auto;
  gap: 5px;
  min-width: 0;
  text-decoration: none;
}

.column-header-link:hover {
  color: var(--accent);
}

.sort-header-link.active {
  color: var(--accent);
  font-weight: 850;
}

.sort-direction {
  font-size: 10px;
  line-height: 1;
}

.compta-table th,
.compta-table td {
  vertical-align: middle;
}

.compta-table input,
.compta-table select {
  box-sizing: border-box;
  min-width: 120px;
  width: 100%;
}

.compta-table .date-column {
  width: 112px;
}

.compta-table .date-column input {
  min-width: 96px;
}

.compta-table .extract-column {
  min-width: 132px;
  width: 132px;
}

.compta-table .movement-column {
  min-width: 130px;
  width: 130px;
}

.compta-table .counterparty-column {
  min-width: 240px;
  width: 240px;
}

.compta-table .comment-column {
  min-width: 280px;
  width: 280px;
}

.compta-table .extract-column input,
.compta-table .movement-column input,
.compta-table .counterparty-column input,
.compta-table .comment-column input {
  min-width: 100%;
}

.compta-table .documents-column {
  min-width: 64px;
  text-align: center;
  width: 64px;
}

.document-link {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  margin: 1px;
  min-height: 24px;
  min-width: 22px;
  padding: 2px;
  text-decoration: none;
}

.document-link:hover {
  background: var(--accent-weak);
}

.document-file-icon {
  background: #fff;
  border: 1.6px solid #9ca3af;
  border-radius: 2px;
  display: inline-block;
  height: 19px;
  position: relative;
  width: 15px;
}

.document-file-icon::before {
  background: #f8fafc;
  border-bottom: 1.4px solid #9ca3af;
  border-left: 1.4px solid #9ca3af;
  content: "";
  height: 5px;
  position: absolute;
  right: -1.6px;
  top: -1.6px;
  width: 5px;
}

.document-file-icon::after {
  background:
    linear-gradient(currentColor, currentColor) 2px 4px / 8px 1.4px no-repeat,
    linear-gradient(currentColor, currentColor) 2px 8px / 10px 1.4px no-repeat,
    linear-gradient(currentColor, currentColor) 2px 12px / 7px 1.4px no-repeat;
  color: #9ca3af;
  content: "";
  inset: 4px 1px 2px;
  position: absolute;
}

.document-link-pdf .document-file-icon {
  border-color: #d92d20;
  color: #d92d20;
}

.document-link-pdf .document-file-icon::before {
  border-color: #d92d20;
}

.document-link-word .document-file-icon {
  border-color: #2563eb;
  color: #2563eb;
}

.document-link-word .document-file-icon::before {
  border-color: #2563eb;
}

.document-link-missing {
  cursor: help;
}

.document-link-missing .document-file-icon {
  border-color: #f79009;
  color: #f79009;
}

.document-link-missing .document-file-icon::before {
  border-color: #f79009;
}

.document-link-missing .document-file-icon::after {
  background:
    radial-gradient(circle, currentColor 0 1.5px, transparent 1.8px) 7px 12px / 4px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 7px 4px / 2px 7px no-repeat;
}

.document-upload-cell {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(44px, 1fr) auto auto;
}

.extract-document-links {
  align-items: center;
  display: inline-flex;
  gap: 2px;
  min-width: 24px;
}

.document-upload-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  font-size: 16px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 24px;
}

.document-upload-button::-webkit-details-marker {
  display: none;
}

.document-upload-menu {
  position: relative;
}

.document-upload-menu[open] .document-upload-button {
  background: var(--accent-weak);
  border-color: #b2ddff;
}

.document-upload-button:hover {
  background: var(--accent-weak);
  border-color: #b2ddff;
}

.document-upload-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.document-upload-options {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .16);
  display: grid;
  min-width: 158px;
  padding: 4px;
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 20;
}

.document-upload-options button {
  background: #fff;
  border: 0;
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 7px 8px;
  text-align: left;
}

.document-upload-options button:hover {
  background: var(--accent-weak);
}

.document-upload-options button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: .55;
}

.document-folder-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.document-folder-link {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  display: inline-flex;
  font-size: 12px;
  font-weight: 650;
  gap: 5px;
  min-height: 28px;
  padding: 4px 8px;
  text-decoration: none;
}

.document-folder-link svg {
  fill: #f5b544;
  height: 15px;
  stroke: #b7791f;
  stroke-width: .8;
  width: 15px;
}

.document-folder-link:hover {
  background: var(--accent-weak);
  border-color: #b2ddff;
}

.document-folder-link.missing {
  color: var(--muted);
  opacity: .64;
}

.counterparty-combo {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 24px;
}

.counterparty-combo .counterparty-input {
  min-width: 0;
}

.counterparty-input.counterparty-valid {
  border-color: #12b76a;
  box-shadow: 0 0 0 1px rgba(18, 183, 106, .22);
  color: #067647;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.counterparty-input.counterparty-invalid {
  border-color: #f04438;
  box-shadow: 0 0 0 1px rgba(240, 68, 56, .22);
  color: #b42318;
}

.odoo-counterparty-link {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--accent);
  display: inline-flex;
  font-size: 16px;
  font-weight: 850;
  height: 24px;
  justify-content: center;
  text-decoration: none;
  width: 24px;
}

.odoo-counterparty-link img {
  display: block;
  height: 16px;
  width: 16px;
}

.odoo-counterparty-link.odoo-counterparty-view {
  border-color: #abefc6;
}

.odoo-counterparty-link.odoo-counterparty-create {
  border-color: #fecdca;
  color: #b42318;
}

.compta-table .analytic-column {
  min-width: var(--analytic-column-width);
  width: var(--analytic-column-width);
}

.compta-table .rubrique-column {
  min-width: var(--rubrique-column-width);
  width: var(--rubrique-column-width);
}

.compta-table .technical-operation-column {
  min-width: 92px;
  width: 92px;
}

.compta-table .analytic-column select {
  min-width: var(--analytic-column-width);
}

.compta-table .rubrique-column select {
  min-width: var(--rubrique-column-width);
}

.compta-table .account-column,
.compta-table .amount-cell {
  width: 74px;
}

.compta-table .amount-input {
  min-width: 68px;
  text-align: right;
}

.account-heading {
  align-items: center;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  min-width: 48px;
  text-transform: none;
}

.account-logo {
  align-items: center;
  background: #eef2f6;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #344054;
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  height: 20px;
  justify-content: center;
  line-height: 1;
  min-width: 34px;
  padding: 0 5px;
}

.account-logo img {
  display: block;
  height: 16px;
  width: 16px;
}

.account-logo.bank-card-logo {
  background: linear-gradient(135deg, #0a7d50, #075f3d);
  border-color: #075f3d;
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24);
  height: 24px;
  justify-content: flex-end;
  min-width: 40px;
  overflow: hidden;
  padding: 0 5px 0 15px;
  position: relative;
}

.account-logo.bank-card-logo::before {
  background: linear-gradient(135deg, #f7d982, #c89b2f);
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(95, 68, 8, .22);
  content: "";
  height: 8px;
  left: 5px;
  position: absolute;
  top: 8px;
  width: 8px;
}

.account-logo.bank-card-logo img {
  height: 15px;
  object-fit: contain;
  position: relative;
  width: 15px;
  z-index: 1;
}

.account-logo.viva-card-logo {
  background: linear-gradient(135deg, #ffffff, #edf2f7);
  border-color: #cfd8e3;
}

.account-logo.viva-card-logo img {
  height: 16px;
  width: 18px;
}

.account-logo.piggy-bank-logo {
  background: #ffe7ef;
  border-color: #f7b8ca;
  border-radius: 999px 999px 999px 10px;
  height: 24px;
  min-width: 38px;
  overflow: visible;
  position: relative;
}

.account-logo.piggy-bank-logo::before {
  background: #ffd1df;
  border: 1px solid #f7b8ca;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  content: "";
  height: 8px;
  left: 7px;
  position: absolute;
  top: -5px;
  transform: rotate(-18deg);
  width: 8px;
}

.account-logo.piggy-bank-logo::after {
  background: #f7b8ca;
  border-radius: 999px;
  bottom: -4px;
  box-shadow: 20px 0 0 #f7b8ca;
  content: "";
  height: 4px;
  left: 9px;
  position: absolute;
  width: 5px;
}

.account-logo.piggy-bank-logo img {
  position: relative;
  z-index: 1;
}

.account-marker {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
}

.fortis-current-heading .account-logo,
.fortis-savings-heading .account-logo {
  background: #e7f6ec;
  border-color: #9bd4ad;
  color: #087443;
}

.vivawallet-heading .account-logo {
  background: #ecf4ff;
  border-color: #b2ccff;
  color: #175cd3;
}

.compta-total-row th {
  background: #e6edf5;
  border-top: 2px solid var(--line);
  bottom: 0;
  font-variant-numeric: tabular-nums;
  position: sticky;
  z-index: 5;
}

.compta-total-row th:not(:first-child) {
  text-align: right;
}

.compta-filter-heading {
  min-width: max-content;
}

.header-add-link {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--accent);
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  margin-left: 4px;
  min-width: 24px;
  text-decoration: none;
}

.filter-menu-holder {
  position: relative;
}

.filter-menu-holder summary {
  cursor: pointer;
  list-style: none;
}

.filter-menu-holder summary::-webkit-details-marker {
  display: none;
}

.compta-filter-menu {
  left: auto;
  right: 0;
  width: 280px;
}

.filter-menu-search {
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  font-size: 13px;
  margin-bottom: 8px;
  padding: 7px 8px;
  width: 100%;
}

.filter-menu-values {
  display: grid;
  gap: 1px;
  max-height: 260px;
  overflow: auto;
  padding-top: 2px;
}

.filter-menu-values label {
  align-items: center;
  display: grid;
  column-gap: 4px;
  font-size: 13px;
  font-weight: 500;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  min-height: 22px;
  padding: 1px 0;
  text-transform: none;
  white-space: nowrap;
}

.filter-menu-values input[type="checkbox"] {
  margin: 0;
}

.filter-menu-values span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-menu-values small {
  color: var(--muted);
  font-size: 11px;
}

.row-index-head,
.row-index-cell {
  text-align: center;
  white-space: nowrap;
  width: 72px;
}

.row-index-cell {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: center;
}

.row-index-value {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 24px;
}

.technical-id {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  width: 96px;
}

.id-upload-cell {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  white-space: nowrap;
}

.dirty {
  background: #fff8e8;
}

.row-actions {
  white-space: nowrap;
}

.reference-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(360px, 1fr) minmax(420px, 1.2fr);
}

.reference-panel {
  padding: 0;
}

.reference-table input {
  min-width: 260px;
  width: 100%;
}

.reference-table .reference-checkbox-cell {
  text-align: center;
  width: 120px;
}

.reference-table .reference-checkbox-cell input {
  min-width: 0;
  width: auto;
}

@media (max-width: 900px) {
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .actions {
    justify-content: flex-start;
  }

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

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