.reports-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  background: rgba(241,245,249,.7);
  border: 1px solid var(--n-150);
  border-radius: 12px;
  padding: 4px 6px;
}

.reports-preset-btn {
  height: 28px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--n-500);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}

.reports-preset-btn:hover {
  background: var(--white);
  border-color: var(--n-200);
  color: var(--blue-800);
  box-shadow: 0 1px 4px rgba(15,23,42,.08);
}

.reports-preset-btn.active {
  background: var(--white);
  border-color: rgba(13, 148, 136, .28);
  color: #0f766e;
  box-shadow: 0 1px 6px rgba(13,148,136,.12);
  font-weight: 700;
}

.reports-section-head {
  display: grid;
  gap: 4px;
  margin-top: 2px;
}

.reports-section-kicker {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #0891b2;
}

.reports-section-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--blue-900);
}

.reports-section-copy {
  font-size: 13px;
  color: var(--n-500);
  max-width: 880px;
}

.btn-prestations {
  border: 1px solid rgba(13, 148, 136, .32);
  background: linear-gradient(135deg, #0f766e, #0891b2);
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 148, 136, .18);
}

.btn-prestations:hover {
  background: linear-gradient(135deg, #115e59, #0e7490);
  box-shadow: 0 6px 16px rgba(13, 148, 136, .26);
}

.prestations-overlay {
  position: fixed;
  inset: 0;
  z-index: 980;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(3px);
}

.prestations-modal {
  position: fixed;
  inset: 28px;
  z-index: 990;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 18px;
  background: #f8fafc;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}

.prestations-modal-header,
.prestations-modal-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.prestations-modal-header {
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--n-150);
  background: #fff;
}

.prestations-modal-kicker,
.prestations-report-kicker {
  color: #0891b2;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.prestations-modal-title {
  margin: 4px 0 0;
  color: var(--blue-900);
  font-size: 21px;
}

.prestations-modal-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--n-150);
  border-radius: 10px;
  background: #fff;
  color: var(--n-500);
  cursor: pointer;
}

.prestations-modal-close svg {
  width: 17px;
  height: 17px;
}

.prestations-modal-close:hover {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #ef4444;
}

.prestations-modal-filters {
  padding: 12px 20px;
  border-bottom: 1px solid var(--n-150);
  background: rgba(255,255,255,.92);
}

.prestations-modal-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.prestations-modal-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 12px 16px 18px;
}

.prestations-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  border: 1px solid rgba(14,165,233,.16);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff, #f0fdfa);
}

.prestations-report-head h3 {
  margin: 3px 0 0;
  color: var(--blue-900);
  font-size: 18px;
}

.prestations-report-head p {
  margin: 3px 0 0;
  color: var(--n-500);
  font-size: 12px;
}

.reports-card-title small {
  color: var(--n-500);
  font-size: 11px;
  font-weight: 600;
}

.prestations-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(118px, 168px));
  gap: 8px;
}

.prestations-kpis .reports-kpi {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
}

.prestations-kpis .reports-kpi-val {
  font-size: 23px;
}

.prestations-kpis .reports-kpi-lbl {
  margin-top: 3px;
  font-size: 10px;
}

.prestations-panel {
  padding: 10px 12px;
  border: 1px solid var(--n-150);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.prestations-panel .reports-card-title {
  margin-bottom: 8px;
}

.prestations-social-work-panel .reports-table-wrap {
  max-height: 174px;
  overflow: auto;
}

.prestations-social-work-panel .reports-table thead th {
  padding-top: 6px;
  padding-bottom: 6px;
}

.prestations-social-work-panel .reports-table tbody td {
  padding-top: 5px;
  padding-bottom: 5px;
}

.prestations-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.prestations-status.is-attended {
  color: #15803d;
}

.prestations-status.is-attended {
  background: #dcfce7;
}

.prestations-status.is-cancelled {
  color: #b91c1c;
}

.prestations-status.is-cancelled {
  background: #fee2e2;
}

.prestations-status.is-absent {
  color: #b45309;
}

.prestations-status.is-absent {
  background: #fef3c7;
}

.prestations-status.is-confirmed {
  color: #475569;
}

.prestations-status.is-confirmed {
  background: #e2e8f0;
}

.prestations-status.is-overbook {
  margin-left: 4px;
  background: #ede9fe;
  color: #6d28d9;
}

.reports-heatmap {
  display: grid;
  gap: 8px;
  align-items: stretch;
}

.reports-heatmap-corner,
.reports-heatmap-head,
.reports-heatmap-day,
.reports-heatmap-cell {
  min-height: 42px;
  border-radius: 12px;
}

.reports-heatmap-corner,
.reports-heatmap-head,
.reports-heatmap-day {
  display: grid;
  place-items: center;
  background: rgba(248, 250, 252, .92);
  border: 1px solid var(--n-150);
  color: var(--n-500);
  font-size: 11px;
  font-weight: 700;
}

.reports-heatmap-cell {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(241, 245, 249, .74);
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
}

.reports-heatmap-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.30), transparent 52%),
    linear-gradient(145deg, rgba(14, 165, 233, var(--heat-alpha, 0)), rgba(13, 148, 136, calc(var(--heat-alpha, 0) * .78)));
  pointer-events: none;
}

.reports-heatmap-cell span {
  position: relative;
  z-index: 1;
}

.reports-heatmap-cell.has-data {
  border-color: rgba(14, 165, 233, .20);
}

body.theme-dark .reports-presets {
  background: rgba(8, 18, 30, .60);
  border-color: rgba(143, 217, 224, .12);
}

body.theme-dark .reports-preset-btn {
  background: transparent;
  border-color: transparent;
  color: #94a3b8;
}

body.theme-dark .reports-preset-btn:hover {
  background: rgba(21, 39, 58, .90);
  border-color: rgba(143, 217, 224, .16);
  color: #e2e8f0;
  box-shadow: none;
}

body.theme-dark .reports-preset-btn.active {
  background: rgba(21, 39, 58, .95);
  border-color: rgba(45, 212, 191, .28);
  color: #5eead4;
  box-shadow: 0 1px 6px rgba(45,212,191,.10);
}

body.theme-dark .reports-section-title {
  color: #e2e8f0;
}

body.theme-dark .reports-section-copy {
  color: #94a3b8;
}

body.theme-dark .prestations-modal {
  border-color: rgba(148, 163, 184, .18);
  background: #0f172a;
}

body.theme-dark .prestations-modal-header,
body.theme-dark .prestations-modal-filters,
body.theme-dark .prestations-panel {
  border-color: rgba(148, 163, 184, .14);
  background: rgba(15, 23, 42, .96);
}

body.theme-dark .prestations-modal-title,
body.theme-dark .prestations-report-head h3 {
  color: #e2e8f0;
}

body.theme-dark .prestations-modal-close {
  border-color: rgba(148, 163, 184, .20);
  background: rgba(30, 41, 59, .92);
  color: #e2e8f0;
}

body.theme-dark .prestations-report-head {
  border-color: rgba(45, 212, 191, .16);
  background: linear-gradient(135deg, rgba(15,23,42,.96), rgba(17,94,89,.20));
}

body.theme-dark .reports-heatmap-corner,
body.theme-dark .reports-heatmap-head,
body.theme-dark .reports-heatmap-day {
  background: rgba(15, 23, 42, .76);
  border-color: rgba(148, 163, 184, .14);
  color: #94a3b8;
}

body.theme-dark .reports-heatmap-cell {
  background: rgba(15, 23, 42, .62);
  border-color: rgba(148, 163, 184, .14);
  color: #e2e8f0;
}

@media (max-width: 920px) {
  .reports-presets {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .prestations-modal {
    inset: 10px;
  }

  .prestations-modal-actions {
    width: 100%;
    margin-left: 0;
  }

  .prestations-modal-actions .btn {
    flex: 1;
  }

  .prestations-report-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .prestations-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-preset-btn {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  .reports-heatmap {
    gap: 6px;
  }

  .reports-heatmap-corner,
  .reports-heatmap-head,
  .reports-heatmap-day,
  .reports-heatmap-cell {
    min-height: 36px;
    border-radius: 10px;
  }
}
