.pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff2e6e;
  color: #fff;
  font-size: 11px;
  margin-left: 6px;
}

.nf-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.projets-page > .nf-grid {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 14px;
}

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

.projets-topbar .filter-select-modern {
  min-width: 190px;
}

.nf-kpi {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.nf-kpi h3 {
  margin: 0;
  color: #9aa5d6;
  font-size: 14px;
}

.nf-kpi p {
  margin: 8px 0 2px;
  font-size: 28px;
  color: #fff;
}

.nf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.nf-chip-btn {
  height: 44px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 14px;
}

.nf-insights-card {
  padding: 16px 18px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
}

.nf-insights-content {
  min-height: 0;
}

.nf-insights-empty {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
}

.nf-insights-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.nf-ins-metric {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.2);
}

.nf-ins-metric span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 6px;
}

.nf-ins-metric strong {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.nf-cat-block {
  padding-top: 2px;
}

.nf-cat-title {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 10px;
}

.nf-cat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nf-cat-row {
  display: grid;
  grid-template-columns: minmax(80px, 140px) 1fr minmax(72px, auto);
  align-items: center;
  gap: 10px 12px;
  font-size: 13px;
}

.nf-cat-name {
  color: rgba(255, 255, 255, 0.82);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nf-cat-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nf-cat-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.85), rgba(139, 92, 246, 0.75));
  transition: width 0.45s ease;
  min-width: 2px;
}

.nf-cat-val {
  text-align: right;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

@media (max-width: 900px) {
  .nf-insights-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .nf-cat-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .nf-cat-name {
    white-space: normal;
  }

  .nf-cat-val {
    text-align: left;
  }
}

.nf-breakdown-modal {
  max-width: 560px;
  width: min(560px, 100%);
}

.nf-breakdown-scroll {
  max-height: min(58vh, 480px);
  overflow-y: auto;
  padding-top: 4px;
  margin: 0 -4px 0 0;
}

.nf-list-modal {
  margin-bottom: 0;
}

.nf-list-modal .nf-row:last-child {
  border-bottom: none;
}

#nfByArtificierModal.project-modal-overlay,
#nfByProjectModal.project-modal-overlay {
  z-index: 4000;
}

#confirmDeleteModalAdmin.project-modal-overlay {
  z-index: 4300;
}

.nf-list {
  margin-bottom: 16px;
}

.nf-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nf-link {
  color: #8ac4ff;
}

.nf-muted {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

.nf-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.nf-status.pending {
  background: rgba(255, 165, 0, 0.2);
  color: #ffbf69;
}

.nf-status.done {
  background: rgba(46, 204, 113, 0.2);
  color: #82f7ba;
}

.nf-empty {
  color: #aab3db;
  padding: 10px 0;
}

.nf-rembourse-btn {
  min-width: 0;
  width: 100%;
  max-width: 240px;
  box-sizing: border-box;
  justify-content: center;
}

.nf-delete-btn {
  border-color: rgba(255, 99, 132, 0.25);
  color: #ff9eb2;
}

.nf-delete-btn:hover {
  border-color: rgba(255, 99, 132, 0.45);
  background: rgba(255, 99, 132, 0.12);
}

.nf-admin-queue-card {
  padding: 16px 18px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    165deg,
    rgba(40, 25, 45, 0.45) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
}

.nf-admin-queue-inner {
  min-height: 0;
}

.nf-queue-intro {
  margin: 0 0 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.45;
  max-width: 52em;
}

.nf-queue-intro strong {
  color: rgba(255, 200, 120, 0.95);
  font-weight: 600;
}

.nf-admin-queue-empty {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
}

.nf-aging-track {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.nf-aging-seg {
  display: block;
  height: 100%;
  min-width: 0;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.nf-aging-a {
  background: linear-gradient(90deg, #58d68d, #2ecc71);
}

.nf-aging-b {
  background: linear-gradient(90deg, #f39c12, #f1c40f);
}

.nf-aging-c {
  background: linear-gradient(90deg, #e74c3c, #ff6b6b);
}

.nf-aging-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 18px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.nf-aging-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nf-age-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nf-age-a {
  background: #2ecc71;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.45);
}

.nf-age-b {
  background: #f1c40f;
  box-shadow: 0 0 10px rgba(241, 196, 15, 0.35);
}

.nf-age-c {
  background: #e74c3c;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.4);
}

.nf-queue-subtitle {
  display: block;
  margin-top: 4px;
  margin-bottom: 10px;
}

.nf-queue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nf-queue-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px 16px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.2);
}

.nf-queue-row-watch {
  border-color: rgba(241, 196, 15, 0.35);
  background: rgba(241, 196, 15, 0.06);
}

.nf-queue-row-urgent {
  border-color: rgba(231, 76, 60, 0.45);
  background: rgba(231, 76, 60, 0.08);
}

.nf-queue-who {
  min-width: 0;
}

.nf-queue-who strong {
  display: block;
  font-size: 14px;
  color: #fff;
  margin-bottom: 2px;
}

.nf-queue-who span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.48);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nf-queue-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
}

.nf-queue-row-urgent .nf-queue-badge {
  background: rgba(231, 76, 60, 0.25);
  color: #ffb4b4;
}

.nf-queue-amt {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

@media (max-width: 720px) {
  .nf-queue-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .nf-queue-row .nf-queue-badge {
    justify-self: flex-start;
  }

  .nf-queue-amt {
    text-align: left;
  }
}

/* Table admin : ne pas hériter des largeurs .projects-table-modern (fiche projets : 34px sur les 2 premières colonnes). */
.nf-detail-card .projects-table-modern {
  table-layout: auto;
  min-width: 900px;
}

.nf-detail-card .projects-table-modern thead th {
  width: auto !important;
  min-width: 72px;
}

.nf-detail-card .projects-table-modern tbody td:first-child {
  width: auto !important;
  min-width: 96px;
}

.nf-detail-card .projects-table-modern td:nth-child(8) {
  white-space: normal !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  font-variant-numeric: normal !important;
}

.nf-detail-card .projects-table-modern tbody td.nf-admin-actions-cell {
  vertical-align: top;
  white-space: normal !important;
}

.nf-admin-actions-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.nf-admin-actions-inner .nf-delete-btn {
  width: 100%;
  max-width: 240px;
  box-sizing: border-box;
  justify-content: center;
}
