.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;
  transition: 0.2s ease;
  backdrop-filter: blur(10px);
  min-width: 190px;
  height: 44px;
}

.filter-select-modern:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

.filter-select-modern:focus {
  outline: none;
  border-color: rgba(236, 72, 153, 0.35);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

.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;
  transition: 0.2s ease;
  backdrop-filter: blur(10px);
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.action-btn.primary,
.action-btn.active {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.24), rgba(139, 92, 246, 0.24));
  border-color: rgba(236, 72, 153, 0.35);
  box-shadow: 0 10px 25px rgba(236, 72, 153, 0.15);
  color: #fff;
}

.orders-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 22px;
  margin-bottom: 22px;
}

.main > .card,
.order-form-card,
.orders-kpi-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(236, 72, 153, 0.1), transparent 45%),
    radial-gradient(120% 120% at 100% 0%, rgba(59, 130, 246, 0.1), transparent 45%),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.main > .card::after,
.order-form-card::after,
.orders-kpi-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.order-form-card h3,
.orders-kpi-card h3,
.table-head h3,
.card > h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.orders-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.orders-form-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.orders-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 600;
}

.orders-form input,
.orders-form select,
.orders-form 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);
}

.orders-form textarea {
  padding: 12px 14px;
  min-height: 110px;
  resize: vertical;
}

.orders-form input:focus,
.orders-form select:focus,
.orders-form textarea:focus {
  border-color: rgba(236, 72, 153, 0.35);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

.orders-form select option {
  background: #0f172a;
  color: #fff;
}

.orders-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.kpi-list,
.accounting-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.accounting-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.kpi-item:hover {
  transform: translateY(-2px);
  border-color: rgba(236, 72, 153, 0.28);
  box-shadow: 0 12px 30px rgba(236, 72, 153, 0.14);
}

.kpi-item span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.7);
}

.kpi-item strong {
  color: #f8fafc;
  font-size: 24px;
  line-height: 1.1;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.12);
}

.kpi-item.kpi-good {
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 10px 28px rgba(34, 197, 94, 0.16);
}

.kpi-item.kpi-good strong {
  color: #86efac;
  text-shadow: 0 0 14px rgba(34, 197, 94, 0.28);
}

.kpi-item.kpi-warn {
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: 0 10px 28px rgba(251, 191, 36, 0.15);
}

.kpi-item.kpi-warn strong {
  color: #fde68a;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.26);
}

.kpi-item.kpi-bad {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.16);
}

.kpi-item.kpi-bad strong {
  color: #fca5a5;
  text-shadow: 0 0 14px rgba(239, 68, 68, 0.24);
}

.kpi-meter {
  margin-top: 2px;
  height: 7px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.kpi-meter-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.8), rgba(226, 232, 240, 0.8));
  transition: width 0.35s ease;
}

.kpi-item.kpi-good .kpi-meter-fill {
  background: linear-gradient(90deg, #34d399, #22c55e);
}

.kpi-item.kpi-warn .kpi-meter-fill {
  background: linear-gradient(90deg, #f59e0b, #facc15);
}

.kpi-item.kpi-bad .kpi-meter-fill {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.documents-table-wrap {
  overflow-x: auto;
}

.documents-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.documents-table thead th {
  text-align: left;
  padding: 0 16px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  border-bottom: none;
  white-space: nowrap;
}

.documents-table tbody tr {
  transition: 0.2s ease;
}

.documents-table tbody tr:hover {
  transform: translateY(-1px);
}

.documents-table tbody td {
  padding: 16px;
  border: none;
  color: #fff;
  font-size: 14px;
  vertical-align: middle;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
}

.documents-table tbody td:first-child {
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

.documents-table tbody td:last-child {
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

.documents-table tbody tr:hover td {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.06);
}

.actions-col {
  text-align: right;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.status-pill[data-status="reglee"],
.status-pill[data-status="facturee"] {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.24), rgba(16, 185, 129, 0.22));
  border-color: rgba(34, 197, 94, 0.32);
  color: #86efac;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.2);
}

.status-pill[data-status="annulee"] {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.24), rgba(248, 113, 113, 0.2));
  border-color: rgba(239, 68, 68, 0.32);
  color: #fca5a5;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.18);
}

.status-pill[data-status="brouillon"] {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.3), rgba(100, 116, 139, 0.24));
  border-color: rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}

.status-pill[data-status="envoyee"] {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(59, 130, 246, 0.22));
  border-color: rgba(56, 189, 248, 0.34);
  color: #bae6fd;
}

.status-pill[data-status="confirmee"] {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(245, 158, 11, 0.22));
  border-color: rgba(251, 191, 36, 0.34);
  color: #fde68a;
}

.row-actions {
  display: inline-flex;
  gap: 6px;
}

.row-actions .project-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  backdrop-filter: blur(10px);
}

.row-actions .project-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.row-actions .delete-btn {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.24);
  color: #fca5a5;
}

.row-actions .delete-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fff;
}

.simple-breakdown {
  margin: 0;
  padding: 0 0 0 16px;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.simple-breakdown li strong {
  color: #f9a8d4;
}

.breakdown-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(120px, 2fr) auto;
  gap: 10px;
  align-items: center;
}

.breakdown-label {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.breakdown-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.breakdown-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.85), rgba(139, 92, 246, 0.75));
}

.breakdown-value {
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}

.direction-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.direction-in {
  color: #86efac;
}

.direction-pill.direction-in {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.24), rgba(16, 185, 129, 0.22));
  border-color: rgba(34, 197, 94, 0.35);
}

.direction-out {
  color: #fca5a5;
}

.direction-pill.direction-out {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.24), rgba(248, 113, 113, 0.2));
  border-color: rgba(239, 68, 68, 0.35);
}

@media (max-width: 1100px) {
  .orders-grid {
    grid-template-columns: 1fr;
  }
  .accounting-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .orders-form-row {
    grid-template-columns: 1fr;
  }
  .kpi-list,
  .accounting-kpis {
    grid-template-columns: 1fr;
  }
}
