/* MONALISA_ALERTAS_V2 (20/10/2026) — cartão do Histórico, botão Alertas e aviso na tela. Tokens do dashboard.css; escopo .mo-avisos*. */
.mo-avisos { margin: 0 0 12px; padding: 14px 16px; box-sizing: border-box; min-width: 0; }
.mo-avisos[hidden] { display: none; }
.mo-avisos-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mo-avisos-titles { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 280px; }
.mo-avisos-title { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-primary, #0f1923); font-size: 15px; font-weight: 800; }
.mo-avisos-count { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: var(--accent, #1d6fd8); color: #fff; font-size: 11px; font-weight: 800; }
.mo-avisos-count[hidden] { display: none; }
.mo-avisos-sub { color: var(--text-secondary, #4a6080); font-size: 12px; line-height: 1.4; }
.mo-avisos-all[hidden], .mo-avisos-more[hidden] { display: none; }
.mo-avisos-status { margin: 10px 0 0; color: var(--amber, #b45309); font-size: 12.5px; }
.mo-avisos-status[hidden] { display: none; }
.mo-avisos-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mo-avisos-item { padding: 10px 12px; border: 1px solid var(--card-border, #dde4ee); border-left: 3px solid var(--accent, #1d6fd8); border-radius: var(--r-sm, 9px); background: var(--card-bg, #fff); min-width: 0; }
.mo-avisos-item.is-warn { border-left-color: var(--amber, #b45309); }
.mo-avisos-item.is-read { border-left-color: var(--card-border, #dde4ee); background: var(--surface-bg, #f4f7fb); }
.mo-avisos-item.is-read .mo-avisos-item-title, .mo-avisos-item.is-read .mo-avisos-msg { color: var(--text-secondary, #4a6080); }
.mo-avisos-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mo-avisos-tag { display: inline-flex; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #1d4ed8; background: rgba(37, 99, 235, .10); }
.mo-avisos-tag.is-warn { color: #9a3412; background: rgba(234, 88, 12, .12); }
.mo-avisos-item-title { color: var(--text-primary, #0f1923); font-size: 13.5px; overflow-wrap: anywhere; }
.mo-avisos-msg { margin: 6px 0 0; color: var(--text-primary, #0f1923); font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.mo-avisos-meta { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: var(--text-muted, #8a9ab5); font-size: 11.5px; }
.mo-avisos-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mo-avisos-actions button { min-height: 32px; padding: 4px 10px; font-size: 12px; }
.mo-avisos-empty { color: var(--text-secondary, #4a6080); font-size: 12.5px; padding: 6px 0; }
.mo-avisos-more { margin-top: 10px; }
.mo-avisos-foot { margin: 10px 0 0; color: var(--text-muted, #8a9ab5); font-size: 11.5px; line-height: 1.4; }
.hop-card.mo-avisos-flash { box-shadow: 0 0 0 3px var(--accent, #1d6fd8); transition: box-shadow .3s; }

/* Contador no menu e na barra do celular (os dois itens já são position: relative). */
.mo-avisos-badge { position: absolute; display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: #dc2626; color: #fff; font-size: 10.5px; font-weight: 800; line-height: 1; pointer-events: none; }
.mo-avisos-badge.is-menu { right: 8px; top: 50%; transform: translateY(-50%); }


/* Botão "Alertas" no cabeçalho: mesmo estilo do antigo (scanner-alerts-v74e.css); destaque com novos. */
#moAlertsLauncher.has-unread { border-color: #dc2626; color: #b91c1c; }
#moAlertsLauncher.has-unread span::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #dc2626; vertical-align: 1px; }
#topbar #moAlertsLauncher.has-unread { color: #fff; border-color: #f87171; }

/* Aviso na tela quando chega um alerta (como app de mensagens). */
.mo-alertas-toast { position: fixed; right: 16px; top: 16px; z-index: 9600; display: flex; flex-direction: column; gap: 6px; width: min(380px, calc(100vw - 32px)); box-sizing: border-box; padding: 12px 14px; border-radius: 14px; background: #0f1923; color: #fff; box-shadow: 0 14px 36px rgba(15, 25, 35, .32); animation: moAlertasIn .25s ease-out; }
.mo-alertas-toast[hidden] { display: none; }
.mo-alertas-toast-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.mo-alertas-toast-dot { width: 9px; height: 9px; border-radius: 50%; background: #60a5fa; flex: 0 0 auto; }
.mo-alertas-toast-dot.is-warn { background: #f59e0b; }
.mo-alertas-toast p { margin: 0; color: #cbd5e1; font-size: 12.5px; line-height: 1.45; }
.mo-alertas-toast-actions { display: flex; gap: 8px; margin-top: 4px; }
.mo-alertas-toast .secondary-btn { color: #fff; border-color: rgba(255, 255, 255, .35); background: transparent; }
@keyframes moAlertasIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .mo-alertas-toast { left: 16px; right: 16px; width: auto; top: 64px; } }
@media (prefers-reduced-motion: reduce) { .mo-alertas-toast { animation: none; } }
