.financial-alerts-page {
  --financial-danger: #dc2626;
  --financial-warning: #d97706;
  --financial-violet: #7c3aed;
  color: #0f172a;
  background: #edf1f7;
}

.financial-alerts-main { padding: 30px clamp(20px, 3.5vw, 52px) 64px; }
.financial-alerts-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.financial-alerts-topbar h1 { margin: 4px 0 8px; font-size: clamp(30px, 4vw, 46px); line-height: 1; }
.financial-alerts-topbar .dashboard-intro { max-width: 780px; margin: 0; color: #64748b; font-size: 16px; line-height: 1.5; }

.financial-alert-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.financial-alert-kpis article {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
  padding: 18px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}
.financial-alert-kpis article > div { display: grid; min-width: 0; gap: 5px; }
.financial-alert-kpis small { color: #64748b; font-size: 10px; font-weight: 900; letter-spacing: .05em; }
.financial-alert-kpis strong { overflow: hidden; color: #111827; font-size: clamp(21px, 2.4vw, 30px); line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.financial-kpi-icon {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 20px;
  font-weight: 900;
}
.financial-kpi-danger { color: #b91c1c; background: #fee2e2; }
.financial-kpi-warning { color: #b45309; background: #fef3c7; }
.financial-kpi-violet { color: #6d28d9; background: #ede9fe; }

.financial-alert-panel {
  overflow: hidden;
  border: 1px solid #b8c3d3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}
.financial-alert-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(230px, 1.25fr) repeat(2, minmax(150px, .8fr));
  align-items: end;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid #cbd5e1;
  background: #f8fafc;
}
.financial-alert-heading h2 { margin: 3px 0 0; font-size: 22px; }
.financial-alert-toolbar label { display: grid; min-width: 0; gap: 6px; color: #334155; font-size: 12px; font-weight: 850; }
.financial-alert-toolbar input,
.financial-alert-toolbar select,
.financial-alert-dialog input,
.financial-alert-dialog select,
.financial-alert-dialog textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #94a3b8;
  border-radius: 10px;
  color: #0f172a;
  background: #fff;
  font: inherit;
  font-size: 15px;
}
.financial-alert-toolbar input:focus,
.financial-alert-toolbar select:focus,
.financial-alert-dialog input:focus,
.financial-alert-dialog select:focus,
.financial-alert-dialog textarea:focus { border-color: #4f46e5; outline: 3px solid rgba(79, 70, 229, .18); }
.financial-alert-due-filter {
  grid-column: 2 / -1;
  display: flex !important;
  width: fit-content;
  align-items: center;
  gap: 9px !important;
  cursor: pointer;
}
.financial-alert-due-filter input { width: 19px; min-height: 19px; margin: 0; accent-color: #4f46e5; }
.financial-alert-panel > .dashboard-status { margin: 20px; }

.financial-alert-table-wrap { overflow-x: auto; }
.financial-alert-table { width: 100%; min-width: 1080px; border-collapse: collapse; }
.financial-alert-table th {
  padding: 13px 16px;
  border-bottom: 2px solid #94a3b8;
  color: #334155;
  background: #eef2f7;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-align: left;
  text-transform: uppercase;
}
.financial-alert-table td { padding: 15px 16px; border-bottom: 1px solid #dbe2ea; vertical-align: top; }
.financial-alert-table tbody tr:nth-child(even) { background: #f8fafc; }
.financial-alert-table tbody tr:hover { background: #eef2ff; }
.financial-client, .financial-order, .financial-payment, .financial-followup { display: grid; gap: 4px; }
.financial-client strong, .financial-payment strong { color: #111827; font-size: 16px; }
.financial-client small, .financial-order small, .financial-payment small, .financial-followup small { color: #64748b; line-height: 1.35; }
.financial-payment strong { color: #b91c1c; }
.financial-payment span { color: #475569; font-size: 13px; font-weight: 800; }
.financial-order-badge, .financial-followup-badge, .financial-priority-badge, .financial-due-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  color: #334155;
  background: #e2e8f0;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.financial-order-badge[data-tone="danger"], .financial-due-badge { color: #991b1b; background: #fee2e2; }
.financial-order-badge[data-tone="warning"] { color: #92400e; background: #fef3c7; }
.financial-order-badge[data-tone="success"] { color: #166534; background: #dcfce7; }
.financial-followup-badge[data-status="promesse_paiement"] { color: #5b21b6; background: #ede9fe; }
.financial-followup-badge[data-status="contacte"] { color: #1d4ed8; background: #dbeafe; }
.financial-followup-badge[data-status="sans_suite"] { color: #475569; background: #e2e8f0; }
.financial-priority-badge[data-priority="haute"] { color: #92400e; background: #fef3c7; }
.financial-priority-badge[data-priority="critique"] { color: #991b1b; background: #fee2e2; }
.financial-manage-button {
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #4f46e5;
  font-weight: 850;
  cursor: pointer;
}
.financial-manage-button:hover { background: #3730a3; }
.financial-alert-empty { padding: 42px !important; color: #64748b; text-align: center; }
.financial-alert-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 20px; border-top: 1px solid #cbd5e1; color: #64748b; font-size: 13px; }
.financial-alert-footer strong { color: #334155; }

.financial-alert-dialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 30px); padding: 0; overflow: hidden; border: 0; border-radius: 18px; box-shadow: 0 30px 80px rgba(15, 23, 42, .34); }
.financial-alert-dialog::backdrop { background: rgba(15, 23, 42, .68); backdrop-filter: blur(3px); }
.financial-alert-dialog-shell { display: grid; max-height: calc(100vh - 30px); grid-template-rows: auto minmax(0, 1fr) auto; margin: 0; }
.financial-alert-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px; color: #fff; background: #111827; }
.financial-alert-dialog-header h2 { margin: 4px 0 5px; color: #fff; font-size: 27px; }
.financial-alert-dialog-header p { margin: 0; color: #cbd5e1; }
.financial-alert-dialog-close { width: 42px; height: 42px; border: 1px solid #475569; border-radius: 11px; color: #fff; background: #1e293b; font-size: 25px; cursor: pointer; }
.financial-alert-dialog-content { display: grid; gap: 18px; padding: 22px 24px; overflow-y: auto; background: #edf1f7; }
.financial-alert-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.financial-alert-summary > div { display: grid; gap: 5px; padding: 14px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; }
.financial-alert-summary small { color: #64748b; font-size: 10px; font-weight: 900; letter-spacing: .04em; }
.financial-alert-summary strong { font-size: 18px; }
.financial-alert-form-section, .financial-alert-history-section { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(0, 1.7fr); gap: 20px; padding: 20px; border: 1px solid #cbd5e1; border-radius: 14px; background: #fff; }
.financial-alert-form-section h3, .financial-alert-history-section h3 { margin: 0 0 5px; font-size: 19px; }
.financial-alert-form-section p, .financial-alert-history-section p { margin: 0; color: #64748b; font-size: 13px; line-height: 1.45; }
.financial-alert-form-section > label, .financial-alert-form-grid > label { display: grid; gap: 6px; color: #334155; font-size: 13px; font-weight: 850; }
.financial-alert-form-section label small { color: #b91c1c; font-size: 13px; }
.financial-alert-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.financial-alert-contact-check { display: flex !important; align-items: center; gap: 9px !important; cursor: pointer; }
.financial-alert-contact-check input { width: 20px; min-height: 20px; margin: 0; accent-color: #4f46e5; }
.financial-alert-note { grid-column: 1 / -1; }
.financial-alert-note textarea { resize: vertical; }
.financial-alert-history { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.financial-alert-history li { display: grid; gap: 3px; padding: 11px 13px; border-left: 4px solid #818cf8; border-radius: 8px; background: #f8fafc; }
.financial-alert-history strong { color: #1e293b; }
.financial-alert-history small { color: #64748b; }
.financial-alert-dialog-footer { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 24px; border-top: 1px solid #cbd5e1; background: #fff; }
.financial-alert-dialog-footer > div { display: flex; gap: 10px; }
.financial-alert-dialog-footer p { margin: 0; color: #b91c1c; font-weight: 800; }
.financial-alert-cancel, .financial-alert-save { min-height: 44px; padding: 0 16px; border-radius: 10px; font-weight: 850; cursor: pointer; }
.financial-alert-cancel { border: 1px solid #94a3b8; color: #334155; background: #fff; }
.financial-alert-save { border: 0; color: #fff; background: #4f46e5; }

@media (max-width: 1180px) {
  .financial-alert-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .financial-alert-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .financial-alert-due-filter { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .financial-alerts-main { padding: 22px 14px 48px; }
  .financial-alerts-topbar { align-items: stretch; flex-direction: column; }
  .financial-alerts-topbar .dashboard-refresh { width: 100%; }
  .financial-alert-kpis, .financial-alert-toolbar, .financial-alert-summary, .financial-alert-form-grid { grid-template-columns: 1fr; }
  .financial-alert-due-filter, .financial-alert-note { grid-column: 1; }
  .financial-alert-form-section, .financial-alert-history-section { grid-template-columns: 1fr; }
  .financial-alert-dialog-footer { align-items: stretch; flex-direction: column; }
  .financial-alert-dialog-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
  .financial-alert-footer { align-items: flex-start; flex-direction: column; }
}
