.compta-page .project-header {
  margin-bottom: 18px;
}

.filter-select-modern {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 14px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-width: 160px;
  height: 44px;
}

.filter-select-modern option {
  background: #0f172a;
  color: #fff;
}

.action-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 14px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.action-btn.primary {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.24), rgba(139, 92, 246, 0.24));
  border-color: rgba(236, 72, 153, 0.35);
}

.action-btn-soft {
  background: rgba(255, 255, 255, 0.04);
}

.compta-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compta-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.compta-kpi {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.compta-kpi-label {
  display: block;
  font-size: 13px;
  color: #9aa5d6;
  margin-bottom: 6px;
}

.compta-kpi strong {
  display: block;
  font-size: clamp(22px, 3vw, 28px);
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.compta-kpi-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.compta-kpi--danger,
.compta-kpi--outflow {
  border-color: rgba(231, 76, 60, 0.45);
  background: linear-gradient(145deg, rgba(231, 76, 60, 0.18), rgba(231, 76, 60, 0.04));
}

.compta-kpi--outflow strong,
.compta-kpi--danger strong {
  color: #ff8a80;
}

.compta-kpi--ok,
.compta-kpi--inflow {
  border-color: rgba(46, 204, 113, 0.45);
  background: linear-gradient(145deg, rgba(46, 204, 113, 0.18), rgba(46, 204, 113, 0.04));
}

.compta-kpi--inflow strong,
.compta-kpi--ok strong {
  color: #7dffb3;
}

.compta-kpi--warn {
  border-color: rgba(243, 156, 18, 0.35);
  background: linear-gradient(145deg, rgba(243, 156, 18, 0.12), rgba(255, 255, 255, 0.02));
}

.compta-kpi--neutral {
  border-color: rgba(52, 152, 219, 0.35);
  background: linear-gradient(145deg, rgba(52, 152, 219, 0.12), rgba(255, 255, 255, 0.02));
}

.compta-section {
  margin-bottom: 20px;
  padding: 20px 22px;
}

.compta-accordions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compta-page .compta-accordions .settings-panel {
  margin-bottom: 0;
}

.compta-page .settings-panel {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.compta-page .settings-panel-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px;
  user-select: none;
  transition: background 0.2s ease;
}

.compta-page .settings-panel-summary::-webkit-details-marker {
  display: none;
}

.compta-page .settings-panel-summary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.compta-page .settings-panel-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compta-page .settings-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.compta-page .settings-panel-desc {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

.compta-page .compta-panel-stat {
  color: rgba(236, 72, 153, 0.95);
  font-weight: 600;
}

.compta-page .settings-panel-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 15px;
  color: rgba(236, 72, 153, 0.95);
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.22);
}

.compta-page .settings-panel-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compta-page .settings-panel-chevron {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  transition: transform 0.25s ease, background 0.2s ease;
}

.compta-page .settings-panel-chevron::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 6px;
  height: 6px;
  border-right: 2px solid rgba(255, 255, 255, 0.65);
  border-bottom: 2px solid rgba(255, 255, 255, 0.65);
  transform: translate(-50%, -50%) rotate(45deg);
  transition: transform 0.25s ease;
}

.compta-page .settings-panel[open] > .settings-panel-summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.compta-page .settings-panel[open] .settings-panel-chevron {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.28);
}

.compta-page .settings-panel[open] .settings-panel-chevron::after {
  transform: translate(-50%, -30%) rotate(-135deg);
}

.compta-page .settings-panel-body {
  padding: 20px 22px 22px;
}

.compta-section-toolbar {
  margin-bottom: 16px;
}

.compta-section-toolbar.compta-section-head {
  justify-content: flex-end;
}

.compta-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 16px;
}

.compta-section h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #fff;
}

.compta-section-desc {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  max-width: 52rem;
  line-height: 1.45;
}

.compta-filters {
  display: flex;
  gap: 8px;
}

.compta-dropzone {
  position: relative;
  margin-bottom: 16px;
  padding: 28px 20px;
  border-radius: 16px;
  border: 2px dashed rgba(236, 72, 153, 0.35);
  background: rgba(236, 72, 153, 0.06);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}

.compta-dropzone:hover,
.compta-dropzone:focus-visible {
  border-color: rgba(236, 72, 153, 0.6);
  background: rgba(236, 72, 153, 0.1);
  outline: none;
}

.compta-dropzone.is-dragover {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.16);
}

.compta-dropzone-inner strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}

.compta-dropzone-inner span:last-child {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.compta-dropzone-icon {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
}

.compta-drop-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(10, 12, 22, 0.85);
  color: #fff;
  font-weight: 600;
}

.compta-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.compta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.compta-table th,
.compta-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.compta-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.2);
}

.compta-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.compta-table tbody tr.is-unpaid {
  background: rgba(231, 76, 60, 0.06);
}

.compta-table tbody tr.is-paid {
  background: rgba(46, 204, 113, 0.05);
}

.compta-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  padding: 28px 16px !important;
}

.compta-tfoot-row td {
  background: rgba(0, 0, 0, 0.25);
  border-bottom: none;
}

.compta-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.compta-status--paid {
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.35);
}

.compta-status--unpaid {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.12);
  border-color: rgba(231, 76, 60, 0.35);
}

.compta-status--reimbursed {
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.35);
}

.compta-status--pending {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.12);
  border-color: rgba(231, 76, 60, 0.35);
}

.compta-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compta-icon-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.compta-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.compta-icon-btn--ok {
  border-color: rgba(46, 204, 113, 0.45);
  background: rgba(46, 204, 113, 0.12);
  color: #2ecc71;
  font-weight: 600;
}

.compta-icon-btn--ok:hover {
  background: rgba(46, 204, 113, 0.22);
}

.compta-icon-btn--warn {
  border-color: rgba(243, 156, 18, 0.45);
  background: rgba(243, 156, 18, 0.12);
  color: #f39c12;
  font-weight: 600;
}

.compta-icon-btn--warn:hover {
  background: rgba(243, 156, 18, 0.22);
}

.compta-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compta-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.compta-form input,
.compta-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}

.compta-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.compta-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.compta-parse-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(52, 152, 219, 0.12);
  border: 1px solid rgba(52, 152, 219, 0.3);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

.compta-kpi-link-btn {
  margin-top: 8px;
  appearance: none;
  border: none;
  background: transparent;
  color: #ec4899;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.compta-kpi--bank {
  border-color: rgba(52, 152, 219, 0.35);
  background: linear-gradient(145deg, rgba(52, 152, 219, 0.12), rgba(255, 255, 255, 0.02));
}

.compta-section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.compta-source {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.compta-source--invoice {
  color: #3498db;
  background: rgba(52, 152, 219, 0.12);
  border: 1px solid rgba(52, 152, 219, 0.28);
}

.compta-source--manual {
  color: #ec4899;
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.28);
}

.compta-status--sent {
  color: #3498db;
  background: rgba(52, 152, 219, 0.12);
  border-color: rgba(52, 152, 219, 0.35);
}

.compta-section-desc a {
  color: #ec4899;
  text-decoration: none;
}

.compta-section-desc a:hover {
  text-decoration: underline;
}

.compta-row-actions .compta-icon-btn {
  text-decoration: none;
}

.compta-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(231, 76, 60, 0.35);
  background: rgba(231, 76, 60, 0.08);
}

.compta-bulk-bar[hidden] {
  display: none !important;
}

.compta-check-col,
.compta-check-cell {
  width: 44px;
  text-align: center;
  vertical-align: middle;
}

.compta-check,
.compta-row-check {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: #ec4899;
}

.compta-table tbody tr.is-selected {
  outline: 1px solid rgba(236, 72, 153, 0.35);
}

.compta-eye-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(93, 173, 226, 0.4);
  background: rgba(52, 152, 219, 0.12);
  color: #5dade2;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.compta-eye-btn:hover {
  background: rgba(52, 152, 219, 0.22);
  border-color: rgba(93, 173, 226, 0.65);
}

.compta-no-doc {
  color: rgba(255, 255, 255, 0.35);
}

.compta-doc-link,
.compta-doc-btn {
  color: #5dade2;
  text-decoration: none;
  font-size: 12px;
}

.compta-doc-btn {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.compta-doc-link:hover,
.compta-doc-btn:hover {
  text-decoration: underline;
}

.compta-associate-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(231, 76, 60, 0.35);
  background: rgba(231, 76, 60, 0.08);
  color: #e8ecff;
}

.compta-associate-summary strong {
  color: #fff;
  font-size: 18px;
}

.compta-associate-groups {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compta-associate-group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.compta-associate-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.08), rgba(255, 255, 255, 0.02));
}

.compta-associate-group-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #fff;
}

.compta-associate-group-meta {
  font-size: 12px;
  color: #9aa5d6;
}

.compta-associate-group-due {
  text-align: right;
  min-width: 140px;
}

.compta-associate-group-due > span:first-child {
  display: block;
  font-size: 12px;
  color: #9aa5d6;
  margin-bottom: 2px;
}

.compta-associate-group-due strong {
  display: block;
  font-size: 22px;
  color: #e74c3c;
}

.compta-associate-group-due-count {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #9aa5d6;
}

.compta-table--compact th,
.compta-table--compact td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.compta-director-rates {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  background: rgba(139, 92, 246, 0.08);
  font-size: 12px;
  color: #c4b5fd;
  line-height: 1.45;
}

.compta-director-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(231, 76, 60, 0.35);
  background: rgba(231, 76, 60, 0.08);
  color: #e8ecff;
}

.compta-director-summary strong {
  color: #fff;
  font-size: 18px;
}

.compta-director-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 8px 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(52, 152, 219, 0.35);
  background: rgba(52, 152, 219, 0.08);
}

.compta-director-preview span {
  display: block;
  font-size: 12px;
  color: #9aa5d6;
  margin-bottom: 4px;
}

.compta-director-preview strong {
  font-size: 18px;
  color: #fff;
}

.compta-director-period {
  font-size: 12px;
  color: #9aa5d6;
}

@media (max-width: 768px) {
  .compta-section-head {
    flex-direction: column;
  }

  .compta-page .settings-panel-summary {
    padding: 16px 18px;
  }

  .compta-page .settings-panel-body {
    padding: 16px 18px 18px;
  }

  .compta-associate-group-head {
    flex-direction: column;
  }

  .compta-associate-group-due {
    text-align: left;
  }

  .compta-table th:nth-child(n+4),
  .compta-table td:nth-child(n+4) {
    white-space: nowrap;
  }
}
