:root{
  --alert-preventive:#64813a;
  --alert-attention:#a67c00;
  --alert-urgent:#c76516;
  --alert-due-today:#c43d32;
  --alert-expired:#a92f2f;
}
.alert-legend{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0;padding:10px;border:1px solid #dce6e1;border-radius:12px;background:#f8fbf9}
.alert-chip,.badge{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:5px 9px;font-size:10px;font-weight:850;white-space:nowrap}
.alert-chip small{font-size:9px;font-weight:600;opacity:.85}
.alert-chip.preventive,.badge.PREVENTIVO{background:#edf4e4;color:var(--alert-preventive)}
.alert-chip.attention,.badge.ATENÇÃO{background:#fff5cf;color:var(--alert-attention)}
.alert-chip.urgent,.badge.URGENTE{background:#fff0e2;color:var(--alert-urgent)}
.alert-chip.due-today,.badge.VENCE-HOJE{background:#ffe5e2;color:var(--alert-due-today)}
.alert-chip.expired,.badge.VENCIDO{background:#fbe3e3;color:var(--alert-expired)}
.dot.PREVENTIVO{background:var(--alert-preventive)}.dot.ATENÇÃO{background:var(--alert-attention)}.dot.URGENTE{background:var(--alert-urgent)}.dot.VENCE-HOJE{background:var(--alert-due-today)}.dot.VENCIDO{background:var(--alert-expired)}
.deadline.PREVENTIVO{color:var(--alert-preventive)}.deadline.ATENÇÃO{color:var(--alert-attention)}.deadline.URGENTE{color:var(--alert-urgent)}.deadline.VENCE-HOJE{color:var(--alert-due-today)}.deadline.VENCIDO{color:var(--alert-expired)}
.calendar-event.alert-PREVENTIVO{border-left-color:var(--alert-preventive)}.calendar-event.alert-ATENÇÃO{border-left-color:var(--alert-attention)}.calendar-event.alert-URGENTE{border-left-color:var(--alert-urgent)}.calendar-event.alert-VENCE-HOJE{border-left-color:var(--alert-due-today)}.calendar-event.alert-VENCIDO{border-left-color:var(--alert-expired)}
@media(max-width:720px){.alert-legend{display:grid;grid-template-columns:1fr}.alert-chip{justify-content:space-between}}
@media print{.alert-legend{break-inside:avoid}.alert-chip{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
