/* Rapports financiers — styles strictement isolés de l'application. */
#reports.reports-workspace {
  --report-primary: #6258ed;
  --report-primary-dark: #4f46d8;
  --report-primary-soft: #f0efff;
  --report-ink: #141927;
  --report-muted: #717b8f;
  --report-line: #e7e9f0;
  --report-surface: #fff;
  --report-soft: #f7f8fc;
  --report-success: #07966d;
  --report-success-soft: #eaf9f3;
  --report-danger: #df4654;
  --report-danger-soft: #fff0f2;
  --report-warning: #bd7607;
  --report-warning-soft: #fff6e4;
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  color: var(--report-ink);
}

#reports.reports-workspace,
#reports.reports-workspace * {
  box-sizing: border-box;
}

#reports .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#reports .reports-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 138px;
  margin-bottom: 18px;
  padding: 24px 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 20%, rgba(255, 255, 255, .2), transparent 28%),
    linear-gradient(130deg, #282461 0%, #5148d8 53%, #756cff 100%);
  box-shadow: 0 18px 42px rgba(56, 48, 157, .15);
  color: #fff;
}

#reports .reports-hero-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

#reports .reports-hero-tools {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

#reports .reports-hero::after {
  content: "";
  position: absolute;
  right: -55px;
  bottom: -92px;
  width: 240px;
  height: 240px;
  border: 42px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
  pointer-events: none;
}

#reports .reports-hero::before {
  content: "";
  position: absolute;
  top: -80px;
  left: 34%;
  width: 260px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .055);
  filter: blur(2px);
  pointer-events: none;
}

#reports .reports-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 670px;
  flex: 1 1 430px;
}

#reports .reports-hero-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .09));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 24px rgba(25, 20, 91, .16);
  backdrop-filter: blur(12px);
}

#reports .reports-hero-icon svg {
  width: 24px;
  height: 24px;
}

#reports .reports-hero-copy .eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #dcd9ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

#reports .reports-hero-copy h2,
#reports .reports-hero-copy h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 850;
  letter-spacing: -.045em;
  line-height: 1.12;
}

#reports .reports-hero-copy p {
  max-width: 580px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: 13px;
  line-height: 1.55;
}

#reports .report-currency-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin-top: 0;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .045em;
  backdrop-filter: blur(10px);
}

#reports .report-currency-badge small {
  color: rgba(255, 255, 255, .64);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

#reports .report-currency-badge b {
  color: #fff;
  font-size: 11px;
}

#reports .report-currency-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #67e7bb;
  box-shadow: 0 0 0 4px rgba(103, 231, 187, .14);
}

#reports .report-export-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

#reports .report-export-actions button,
#reports .report-export-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 12px;
  background: rgba(255, 255, 255, .13);
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}

#reports .report-export-actions button:hover,
#reports .report-export-actions a:hover {
  border-color: rgba(255, 255, 255, .48);
  background: rgba(255, 255, 255, .22);
  transform: translateY(-1px);
}

#reports .report-export-actions button:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

#reports .report-export-actions button.is-exporting {
  position: relative;
  overflow: hidden;
  opacity: .82;
}

#reports .report-export-actions button.is-exporting::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 22%, rgba(255, 255, 255, .42) 48%, transparent 74%);
  transform: translateX(-110%);
  animation: report-export-shimmer 1s linear infinite;
}

#reports .report-export-actions #report-export-excel:not(:disabled) {
  border-color: #fff;
  background: #fff;
  color: #4f46cf;
  box-shadow: 0 8px 22px rgba(24, 20, 92, .16);
}

#reports .report-export-actions #report-export-excel:not(:disabled):hover {
  background: #f7f6ff;
}

#reports .report-export-actions svg {
  width: 16px;
  height: 16px;
}

#reports .report-filter-panel,
#reports .report-breakdown,
#reports .report-table-panel {
  border: 1px solid var(--report-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 8px 28px rgba(25, 31, 48, .045);
}

#reports .report-filter-panel {
  margin-bottom: 16px;
  padding: 15px 16px 16px;
}

#reports .report-filter-heading,
#reports .report-filter-heading > div,
#reports .report-filter-heading > div > div {
  display: flex;
  align-items: center;
}

#reports .report-filter-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
}

#reports .report-filter-heading > div {
  gap: 11px;
}

#reports .report-filter-heading > div > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--report-primary-soft);
  color: var(--report-primary);
}

#reports .report-filter-heading > div > span svg {
  width: 17px;
  height: 17px;
}

#reports .report-filter-heading > div > div {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
}

#reports .report-filter-heading h3,
#reports .report-filter-heading p {
  margin: 0;
}

#reports .report-filter-heading h3 {
  font-size: 13px;
}

#reports .report-filter-heading p {
  color: var(--report-muted);
  font-size: 10px;
}

#reports .report-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#reports .report-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #cbc7ff;
  border-radius: 10px;
  background: var(--report-primary-soft);
  color: var(--report-primary-dark);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

#reports .report-filter-toggle:hover,
#reports .report-filter-toggle[aria-expanded="true"] {
  border-color: #aaa4ff;
  background: #e8e5ff;
  box-shadow: 0 5px 14px rgba(98, 88, 237, .11);
}

#reports .report-filter-toggle svg {
  width: 15px;
  height: 15px;
}

#reports .report-filter-content:not([hidden]) {
  animation: report-filter-reveal .2s ease-out;
}

#reports .report-filter-panel.is-collapsed .report-filter-heading {
  margin-bottom: 0;
}

#reports .report-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid #eef0f4;
}

#reports .report-preset {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #e2e4eb;
  border-radius: 999px;
  background: #fff;
  color: #687287;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

#reports .report-preset:hover,
#reports .report-preset.is-active,
#reports .report-preset.active,
#reports .report-preset[aria-pressed="true"] {
  border-color: #c9c5ff;
  background: var(--report-primary-soft);
  color: var(--report-primary-dark);
  box-shadow: 0 4px 13px rgba(98, 88, 237, .09);
}

#reports .report-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(138px, .84fr)) repeat(3, minmax(148px, 1fr)) minmax(78px, .42fr);
  align-items: end;
  gap: 9px;
}

#reports .report-filter-field {
  position: relative;
  min-width: 0;
}

#reports .report-search-field {
  grid-column: auto;
}

#reports .report-filter-field > span {
  display: block;
  margin: 0 0 6px;
  color: #697386;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

#reports .report-filter-field.is-role-locked > span::after {
  content: "Caisse liée au rôle";
  float: right;
  color: #635bdf;
  font-size: 8px;
  letter-spacing: .02em;
  text-transform: none;
}

#reports .report-filter-field.is-role-locked,
#reports .report-filter-field[hidden] {
  display: none !important;
}

#reports .report-agent-combobox { position: relative; }
#reports .report-agent-combobox > i { position:absolute;z-index:2;left:13px;top:50%;width:16px;height:16px;color:#7b8498;transform:translateY(-50%);pointer-events:none; }
#reports .report-agent-combobox > input[type="search"] { width:100%;height:44px;margin:0;padding:0 38px 0 40px!important;border:1px solid var(--report-border);border-radius:11px;background:#fff;color:var(--report-ink);font:inherit; }
#reports .report-agent-combobox > input[type="search"]:focus { border-color:#7167f0;outline:3px solid rgba(99,91,223,.12); }
#reports #report-agent-clear { position:absolute;z-index:3;top:50%;right:8px;width:28px;height:28px;padding:0;border:0;border-radius:8px;background:#f1f2f7;color:#626b7e;font-size:18px;line-height:1;transform:translateY(-50%);cursor:pointer; }
#reports .report-agent-options { position:absolute;z-index:80;top:calc(100% + 7px);left:0;right:0;max-height:250px;padding:6px;overflow:auto;border:1px solid #e0e3eb;border-radius:13px;background:#fff;box-shadow:0 18px 48px rgba(17,24,39,.16); }
#reports .report-agent-options button { display:flex;align-items:center;gap:10px;width:100%;padding:9px 10px;border:0;border-radius:9px;background:#fff;color:var(--report-ink);text-align:left;cursor:pointer; }
#reports .report-agent-options button:hover,
#reports .report-agent-options button:focus-visible { background:#f4f3ff;outline:none; }
#reports .report-agent-options button > span:nth-child(2) { flex:1;min-width:0; }
#reports .report-agent-options b,
#reports .report-agent-options small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
#reports .report-agent-options b { font-size:12px; }
#reports .report-agent-options small { margin-top:2px;color:var(--report-muted);font-size:10px; }
#reports .report-agent-options em { color:#635bdf;font-size:9px;font-style:normal;font-weight:800; }

#reports .report-filter-field.is-role-locked select:disabled {
  border-color: #cfcaff;
  background: linear-gradient(135deg, #f7f6ff, #eeecff);
  color: #4f46c8;
  font-weight: 750;
  opacity: 1;
  cursor: not-allowed;
}

#reports .report-filter-control {
  position: relative;
  display: block;
  width: 100%;
}

#reports .report-filter-control > i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 12px;
  width: 17px;
  height: 17px;
  color: #9098a8;
  transform: translateY(-50%);
  pointer-events: none;
}

#reports .report-filter-control > i svg {
  width: 17px;
  height: 17px;
}

#reports .report-filter-field input,
#reports .report-filter-field select {
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #dde1e9;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: #222838;
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(17, 24, 39, .015), 0 1px 2px rgba(17, 24, 39, .02);
  transition: border-color .17s ease, box-shadow .17s ease, background-color .17s ease;
}

/* Déclaré après la règle générique : le texte et la date restent toujours
   distincts des icônes placées à gauche et du sélecteur natif à droite. */
#reports .report-filter-control > input {
  padding-left: 42px !important;
  padding-right: 36px;
}

#reports .report-filter-control > input[type="search"] {
  padding-right: 12px;
}

#reports .report-filter-field select {
  padding-right: 34px;
  text-overflow: ellipsis;
}

#reports .report-filter-control input[type="date"]::-webkit-calendar-picker-indicator {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 3px;
  opacity: .72;
  cursor: pointer;
}

#reports .report-filter-control input::placeholder {
  color: #667085;
  opacity: 1;
}

#reports .report-filter-field.has-icon input,
#reports .report-filter-field.has-icon select {
  padding-left: 39px;
}

#reports .report-filter-field input:focus,
#reports .report-filter-field select:focus {
  border-color: #918aff;
  box-shadow: 0 0 0 4px rgba(98, 88, 237, .1);
}

#reports .report-filter-control:focus-within > i {
  color: var(--report-primary);
}

#reports .report-filter-icon {
  position: absolute;
  z-index: 1;
  left: 13px;
  bottom: 14px;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  color: #9098a8;
  pointer-events: none;
}

#reports .report-filter-icon svg {
  width: 16px;
  height: 16px;
}

#reports .report-filter-field.has-icon:focus-within .report-filter-icon {
  color: var(--report-primary);
}

#reports .report-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  height: 40px;
  padding: 0 13px;
  border: 1px solid #e0e3ea;
  border-radius: 10px;
  background: #fafbfc;
  color: #687287;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}

#reports .report-reset svg {
  width: 14px;
  height: 14px;
}

#reports .report-reset:hover {
  border-color: #cbc7ff;
  background: #f4f2ff;
  color: var(--report-primary-dark);
}

#reports .report-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

#reports .report-summary-card {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 108px;
  padding: 16px 17px;
  overflow: hidden;
  border: 1px solid var(--report-line);
  border-radius: 15px;
  background: var(--report-surface);
  box-shadow: 0 7px 22px rgba(25, 31, 48, .04);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

#reports .report-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(25, 31, 48, .075);
}

#reports .report-summary-card::after {
  content: none;
}

#reports .report-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#reports .report-summary-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--report-primary-soft);
  color: var(--report-primary-dark);
}

#reports .report-summary-icon svg {
  width: 16px;
  height: 16px;
}

#reports .report-summary-card .summary-label,
#reports .report-summary-card > span:first-child {
  display: block;
  margin-bottom: 9px;
  color: var(--report-muted);
  font-size: 10px;
  font-weight: 750;
}

#reports .report-summary-head .summary-label {
  margin-bottom: 0;
}

#reports .report-summary-card .summary-value,
#reports .report-summary-card > strong {
  display: block;
  overflow: hidden;
  color: var(--report-ink);
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 850;
  letter-spacing: -.035em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#reports .report-summary-card small {
  display: block;
  margin-top: 7px;
  color: #8a93a4;
  font-size: 9px;
}

#reports .report-summary-card.is-positive,
#reports .report-summary-card.positive {
  border-color: #d7efe7;
}

#reports .report-summary-card.is-positive::after,
#reports .report-summary-card.positive::after {
  background: var(--report-success-soft);
}

#reports .report-summary-card.is-positive .report-summary-icon,
#reports .report-summary-card.positive .report-summary-icon {
  background: var(--report-success-soft);
  color: var(--report-success);
}

#reports .report-summary-card.is-positive .summary-value,
#reports .report-summary-card.positive .summary-value {
  color: var(--report-success);
}

#reports .report-summary-card.is-negative,
#reports .report-summary-card.negative {
  border-color: #f4dadd;
}

#reports .report-summary-card.is-negative::after,
#reports .report-summary-card.negative::after {
  background: var(--report-danger-soft);
}

#reports .report-summary-card.is-negative .report-summary-icon,
#reports .report-summary-card.negative .report-summary-icon {
  background: var(--report-danger-soft);
  color: var(--report-danger);
}

#reports .report-summary-card.is-negative .summary-value,
#reports .report-summary-card.negative .summary-value {
  color: var(--report-danger);
}

#reports .report-summary-card.is-warning::after,
#reports .report-summary-card.warning::after {
  background: var(--report-warning-soft);
}

#reports .report-summary-card.is-primary::after,
#reports .report-summary-card.primary::after {
  background: var(--report-primary-soft);
}

#reports .report-breakdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 16px;
  overflow: hidden;
}

#reports .report-breakdown > * {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fff, #fdfdff);
}

#reports .report-breakdown strong {
  color: var(--report-ink);
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

#reports .report-generated-at {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid #e7e9ef;
  border-radius: 999px;
  background: #fafbfc;
  color: #7d8698;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

#reports .report-breakdown > * + * {
  border-left: 1px solid var(--report-line);
}

#reports .report-breakdown h3 {
  margin: 0 0 14px;
  color: var(--report-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.015em;
}

#reports .report-table-panel {
  position: relative;
  overflow: hidden;
}

#reports .report-table-panel > .table-wrap {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd0da transparent;
}

#reports .report-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 12px 17px;
  border-bottom: 1px solid var(--report-line);
}

#reports .report-table-toolbar h3 {
  margin: 0;
  color: var(--report-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.02em;
}

#reports .report-table-toolbar p,
#reports .report-table-toolbar small {
  margin: 4px 0 0;
  color: var(--report-muted);
  font-size: 9px;
}

#reports .report-table-toolbar select {
  width: auto;
  height: 36px;
  margin: 0;
  padding: 0 29px 0 10px;
  border: 1px solid #e0e3ea;
  border-radius: 9px;
  background-color: #fafbfc;
  color: #555f72;
  font-size: 10px;
  font-weight: 750;
}

#reports .report-table-wrap {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #c9c5ee #f3f4f8;
}

#reports .report-table-wrap:focus-visible {
  outline: 3px solid rgba(98, 88, 237, .22);
  outline-offset: -3px;
}

#reports .report-table-wrap::-webkit-scrollbar {
  height: 8px;
}

#reports .report-table-wrap::-webkit-scrollbar-track {
  background: #f3f4f8;
}

#reports .report-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #f3f4f8;
  border-radius: 999px;
  background: #bdb8e8;
}

#reports .report-table,
#reports .report-table.professional-table {
  width: 100%;
  min-width: 920px;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
}

#reports .report-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

#reports .report-table th {
  height: 40px;
  padding: 0 15px;
  border: 0;
  border-bottom: 1px solid #e4e7ee;
  background: #f7f8fb;
  color: #737d91;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .065em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

#reports .report-table td {
  height: 51px;
  padding: 7px 15px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
  color: #252b3a;
  font-size: 11px;
  vertical-align: middle;
}

#reports .report-table th:nth-child(6),
#reports .report-table th:nth-child(7),
#reports .report-table td:nth-child(6),
#reports .report-table td:nth-child(7) {
  text-align: right;
}

#reports .report-table .movement-date {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

#reports .report-table .movement-date b {
  color: #252b3a;
  font-size: 10px;
}

#reports .report-table .movement-date small {
  margin: 0;
  padding-left: 8px;
  border-left: 1px solid #e4e7ed;
  color: #8b94a5;
  font-size: 9px;
}

#reports .report-table .movement-ref {
  border: 1px solid #e7e9ef;
  background: #f7f8fa;
  color: #687185;
}

#reports .report-table .agent-cell b {
  color: #272d3b;
  font-size: 10px;
}

#reports .report-table .agent-cell small {
  color: #8b94a5;
  font-size: 8px;
}

#reports .report-table tbody tr:last-child td {
  border-bottom: 0;
}

#reports .report-table tbody tr:hover td {
  background: #fafaff;
}

#reports .report-table .transfer-row td,
#reports .report-table tr.transfer-row td {
  background: #fffbf1;
}

#reports .report-table .transfer-row:hover td,
#reports .report-table tr.transfer-row:hover td {
  background: #fff7e5;
}

#reports .report-table .transfer-row td:first-child,
#reports .report-table tr.transfer-row td:first-child {
  box-shadow: inset 3px 0 0 #e6a72c;
}

#reports .report-operation,
#reports .report-cashbox-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

#reports .report-operation::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

#reports .report-operation.depot,
#reports .report-operation.encaissement {
  background: var(--report-success-soft);
  color: #087f60;
}

#reports .report-operation.retrait {
  background: var(--report-danger-soft);
  color: #cf3e4d;
}

#reports .report-operation.approvisionnement {
  background: var(--report-warning-soft);
  color: #a7690a;
}

#reports .report-operation.solde {
  background: var(--report-primary-soft);
  color: var(--report-primary-dark);
}

#reports .report-operation.operations {
  background: #eef7ff;
  color: #2f72b7;
}

#reports .report-breakdown-loading .report-skeleton:first-child {
  width: 48%;
}

#reports .report-breakdown-loading .report-skeleton:last-child {
  width: 32%;
  min-height: 17px;
}

#reports .report-cashbox-badge {
  background: #eff1f6;
  color: #5f687b;
}

#reports .report-cashbox-badge.entree {
  background: #eef7ff;
  color: #2f72b7;
}

#reports .report-cashbox-badge.sortie {
  background: #f2efff;
  color: #6356d9;
}

#reports .report-amount {
  color: var(--report-ink);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -.015em;
  white-space: nowrap;
}

#reports .report-amount.positive,
#reports .report-amount.is-positive {
  color: var(--report-success);
}

#reports .report-amount.negative,
#reports .report-amount.is-negative {
  color: var(--report-danger);
}

#reports .report-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 10px 17px;
  border-top: 1px solid var(--report-line);
  color: var(--report-muted);
  font-size: 10px;
}

#reports .report-pagination > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

#reports .report-pagination button {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #e0e3ea;
  border-radius: 9px;
  background: #fff;
  color: #5f697d;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

#reports .report-pagination button:hover:not(:disabled),
#reports .report-pagination button.is-active,
#reports .report-pagination button.active {
  border-color: #c8c4ff;
  background: var(--report-primary-soft);
  color: var(--report-primary-dark);
}

#reports .report-pagination button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

#reports .report-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  min-height: 230px;
  padding: 36px 20px;
  color: var(--report-muted);
  text-align: center;
}

#reports .report-empty > b {
  color: #303747;
  font-size: 13px;
}

#reports .report-empty > span {
  max-width: 420px;
  font-size: 11px;
  line-height: 1.55;
}

#reports .report-empty.error > b {
  color: var(--report-danger);
}

#reports .report-empty > div {
  max-width: 380px;
}

#reports .report-empty .report-empty-icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 15px;
  background: var(--report-primary-soft);
  color: var(--report-primary-dark);
}

#reports .report-empty .report-empty-icon svg {
  width: 21px;
  height: 21px;
}

#reports .report-empty-action {
  min-height: 38px;
  margin-top: 10px;
  padding: 0 14px;
  border: 1px solid #d8d5ff;
  border-radius: 10px;
  background: var(--report-primary-soft);
  color: var(--report-primary-dark);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

#reports .report-empty-action:hover {
  border-color: #bdb7ff;
  background: #e9e6ff;
}

#reports .report-empty strong {
  display: block;
  margin-bottom: 6px;
  color: #303747;
  font-size: 13px;
}

#reports .report-empty p {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
}

/* Le contenu reste en place durant un rafraîchissement AJAX : seule une barre
   de progression discrète est affichée, évitant tout clignotement de la table. */
#reports.reports-loading,
#reports.is-refreshing {
  cursor: progress;
}

#reports .reports-loading,
#reports .is-refreshing {
  position: relative;
}

#reports.reports-loading::before,
#reports.is-refreshing::before,
#reports .reports-loading::before,
#reports .is-refreshing::before {
  content: "";
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 34%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #756cff, transparent);
  animation: report-progress 1.05s linear infinite;
  pointer-events: none;
}

#reports .report-skeleton {
  display: block;
  min-height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eef0f5 0%, #f7f8fb 48%, #eef0f5 100%);
  background-size: 220% 100%;
  animation: report-skeleton 1.8s ease-in-out infinite;
}

#reports .report-summary-card.is-loading {
  pointer-events: none;
}

#reports .report-summary-card.is-loading > span {
  width: 42%;
  min-height: 10px;
}

#reports .report-summary-card.is-loading > strong {
  width: 72%;
  min-height: 25px;
  margin-top: 15px;
}

#reports .report-summary-card.is-loading > small {
  width: 58%;
  min-height: 9px;
  margin-top: 10px;
}

#reports .report-loading-row .report-skeleton {
  min-width: 62px;
}

@keyframes report-progress {
  from { transform: translateX(-100%); }
  to { transform: translateX(295%); }
}

@keyframes report-skeleton {
  from { background-position: 100% 0; }
  to { background-position: -120% 0; }
}

@keyframes report-export-shimmer {
  to { transform: translateX(110%); }
}

@keyframes report-filter-reveal {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1400px) {
  #reports .report-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #reports .report-search-field {
    grid-column: span 2;
  }
}

@media (max-width: 1250px) {
  #reports .reports-hero {
    grid-template-columns: 1fr;
  }

  #reports .reports-hero-tools {
    justify-content: space-between;
  }
}

@media (max-width: 1000px) {
  #reports .reports-hero {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  #reports .reports-hero-tools {
    align-items: flex-start;
    flex-direction: column;
  }

  #reports .report-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #reports .report-search-field {
    grid-column: span 2;
  }

  #reports .report-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #reports .reports-hero {
    display: block;
    gap: 15px;
    min-height: 0;
    padding: 23px;
    border-radius: 18px;
  }

  #reports .reports-hero-main {
    align-items: flex-start;
  }

  #reports .reports-hero-icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  #reports .report-currency-badge {
    align-self: flex-start;
  }

  #reports .report-export-actions {
    justify-content: flex-start;
    margin-top: 0;
  }

  #reports .reports-hero-tools {
    margin-top: 18px;
  }

  #reports .report-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #reports .report-search-field {
    grid-column: 1 / -1;
  }

  #reports .report-reset {
    width: 100%;
  }

  #reports .report-filter-heading {
    align-items: stretch;
    flex-direction: column;
  }

  #reports .report-filter-actions {
    width: 100%;
    justify-content: stretch;
  }

  #reports .report-filter-actions .report-reset,
  #reports .report-filter-actions .report-filter-toggle {
    width: auto;
    flex: 1;
  }

  #reports .report-breakdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #reports .report-breakdown > * + * {
    border-left: 0;
  }

  #reports .report-breakdown > *:nth-child(even) {
    border-left: 1px solid var(--report-line);
  }

  #reports .report-breakdown > *:nth-child(n + 3) {
    border-top: 1px solid var(--report-line);
  }

  #reports .report-table-toolbar,
  #reports .report-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  #reports .report-pagination > div {
    width: 100%;
  }

  #reports .report-table th:first-child,
  #reports .report-table td:first-child {
    position: sticky;
    left: 0;
  }

  #reports .report-table th:first-child {
    z-index: 4;
  }

  #reports .report-table td:first-child {
    z-index: 1;
    box-shadow: 8px 0 12px -12px rgba(20, 25, 39, .55);
  }
}

@media (max-width: 520px) {
  #reports .reports-hero {
    margin-bottom: 12px;
    padding: 20px;
  }

  #reports .reports-hero-main {
    gap: 12px;
  }

  #reports .reports-hero-tools,
  #reports .report-export-actions {
    width: 100%;
  }

  #reports .reports-hero-copy h2,
  #reports .reports-hero-copy h3 {
    font-size: 23px;
  }

  #reports .report-export-actions button,
  #reports .report-export-actions a {
    flex: 1 1 calc(50% - 5px);
    padding: 0 10px;
  }

  #reports .report-filter-panel {
    padding: 14px;
    border-radius: 15px;
  }

  #reports .report-filter-grid,
  #reports .report-summary-grid {
    grid-template-columns: 1fr;
  }

  #reports .report-search-field {
    grid-column: auto;
  }

  #reports .report-summary-card {
    min-height: 98px;
  }

  #reports .report-breakdown {
    grid-template-columns: 1fr;
  }

  #reports .report-breakdown > *:nth-child(even) {
    border-left: 0;
  }

  #reports .report-breakdown > *:nth-child(n + 2) {
    border-top: 1px solid var(--report-line);
  }

  #reports .report-table-toolbar,
  #reports .report-pagination {
    padding-right: 14px;
    padding-left: 14px;
  }

  #reports .report-pagination > div {
    justify-content: stretch;
  }

  #reports .report-pagination button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  #reports *,
  #reports *::before,
  #reports *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
