.nf-card {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.action-btn {
  appearance: none;
  border-radius: 14px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  text-decoration: none;
}

.action-btn:hover {
  transform: translateY(-1px);
}

.action-btn-soft {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.action-btn-soft:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

.action-btn-primary {
  border: 1px solid rgba(236, 72, 153, 0.35);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.24), rgba(139, 92, 246, 0.24));
  color: #fff;
  box-shadow: 0 10px 25px rgba(236, 72, 153, 0.15);
}

.action-btn-primary:hover {
  box-shadow: 0 14px 28px rgba(236, 72, 153, 0.18);
}

.nf-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.nf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.nf-grid .form-group.full {
  grid-column: 1 / -1;
}

.nf-subtitle {
  color: #aab3db;
  margin-top: 4px;
  margin-bottom: 10px;
}

.nf-grid .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nf-grid label {
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.74);
}

.nf-grid input:not([type="file"]),
.nf-grid select,
.nf-grid textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
  backdrop-filter: blur(8px);
}

.nf-grid input:not([type="file"]):focus,
.nf-grid select:focus,
.nf-grid textarea:focus {
  border-color: rgba(236, 72, 153, 0.35);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

.nf-grid input::placeholder,
.nf-grid textarea::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.nf-grid select option {
  background: #0f172a;
  color: #fff;
}

.nf-grid textarea {
  padding: 12px 14px;
  min-height: 110px;
  resize: vertical;
}

.nf-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 46px;
  box-sizing: border-box;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nf-file-row:focus-within {
  border-color: rgba(236, 72, 153, 0.35);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

.nf-file-pick-btn {
  flex-shrink: 0;
  padding: 9px 16px;
  font-size: 13px;
}

.nf-file-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nf-justificatif-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.nf-justificatif-actions .nf-file-pick-btn {
  flex: 1 1 auto;
  min-width: 0;
}

.nf-doc-scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
  box-sizing: border-box;
}

.nf-doc-scan-card {
  width: min(560px, 100%);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  background: rgba(12, 18, 34, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.nf-doc-scan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nf-doc-scan-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.nf-doc-scan-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.65);
}

.nf-doc-scan-status {
  margin: 0;
  padding: 10px 18px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.nf-doc-scan-stage {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 220px;
  max-height: 58vh;
  margin: 12px 18px 0;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.nf-doc-scan-video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 58vh;
  object-fit: contain;
}

.nf-doc-scan-overlay-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.nf-doc-scan-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.field-hint {
  margin-top: 6px;
  color: #8f9ccf;
  font-size: 12px;
}

.nf-modal {
  max-width: 760px;
  width: min(760px, 100%);
}

#expenseModal.project-modal-overlay {
  z-index: 4200;
}

#expenseModal .project-modal-card {
  width: min(760px, 100%);
}

#expenseModal .project-modal-body {
  padding-top: 14px;
}

#submitExpenseBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.nf-notes-main h2 {
  margin-bottom: 4px;
}

.nf-kpis-artificier {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.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: 26px;
  color: #fff;
}

.nf-kpi small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.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-empty-hint {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.02em;
  line-height: 1.55;
  margin: 0;
  max-width: 38em;
}

.nf-insights-content:has(.nf-empty-hint) {
  padding: 4px 0 2px;
}

.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-kpis-artificier {
    grid-template-columns: 1fr;
  }

  .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-extra-viz-card:has(#artExtraVizContent:empty) {
  display: none;
}

.nf-extra-viz-card {
  padding: 16px 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    155deg,
    rgba(18, 55, 75, 0.4) 0%,
    rgba(255, 255, 255, 0.03) 55%
  );
}

.nf-extra-stack {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.nf-extra-block {
  margin-bottom: 14px;
}

.nf-split-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  margin-top: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.nf-split-seg {
  display: block;
  height: 100%;
  min-width: 0;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.nf-split-pending {
  background: linear-gradient(90deg, #ff9f43, #ffb366);
}

.nf-split-reimbursed {
  background: linear-gradient(90deg, #27ae60, #58d68d);
}

.nf-split-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.nf-split-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nf-leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nf-leg-dot-pend {
  background: #ffb366;
  box-shadow: 0 0 8px rgba(255, 159, 67, 0.4);
}

.nf-leg-dot-rem {
  background: #58d68d;
  box-shadow: 0 0 8px rgba(46, 204, 113, 0.35);
}

.nf-facts-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.nf-fact {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.18);
}

.nf-fact-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 4px;
}

.nf-fact-val {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nf-fact-meta {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 4px;
}

.nf-extra-viz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 36px;
  align-items: start;
}

.nf-extra-panel .nf-cat-title {
  margin-bottom: 10px;
}

.nf-spectacle-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(64, 224, 208, 0.92), rgba(52, 152, 219, 0.88));
  transition: width 0.5s ease;
  min-width: 2px;
  box-shadow: 0 0 18px rgba(64, 224, 208, 0.28);
}

.nf-month-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  min-height: 148px;
  padding: 12px 10px 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nf-month-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.nf-month-bar-wrap {
  width: 100%;
  max-width: 52px;
  height: 118px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  border-radius: 10px 10px 4px 4px;
  background: rgba(255, 255, 255, 0.05);
}

.nf-month-bar {
  width: 100%;
  min-height: 0;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(
    180deg,
    rgba(236, 72, 153, 0.95),
    rgba(139, 92, 246, 0.8)
  );
  transition: height 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -6px 28px rgba(236, 72, 153, 0.22);
  align-self: flex-end;
}

.nf-month-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  line-height: 1.2;
  text-transform: capitalize;
}

@media (max-width: 900px) {
  .nf-extra-viz-grid {
    grid-template-columns: 1fr;
  }

  .nf-facts-row {
    grid-template-columns: 1fr;
  }

  .nf-fact-val {
    white-space: normal;
  }
}

.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;
}

@media (max-width: 980px) {
  .nf-grid {
    grid-template-columns: 1fr;
  }
}
