/** Flo — Central de Notificações: sino da barra superior, caixa de entrada e preferências. */

/* Sino */
.flo-bell { position: relative; }
.flo-bell__button { position: relative; }
.flo-bell__count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  border-radius: var(--flo-radius-full); background: var(--flo-danger); color: #fff;
  font: var(--flo-text-caption); font-weight: 700; line-height: 1;
}
.flo-bell__count[hidden] { display: none; }
/* Fixo na janela: o JS calcula left/top ao abrir para o painel nunca sair da tela, onde quer que a barra quebre a linha. */
.flo-bell__panel {
  position: fixed; left: var(--flo-space-4); top: 72px; z-index: 60;
  width: min(380px, calc(100vw - 2 * var(--flo-space-4))); max-height: min(520px, calc(100vh - 110px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--flo-surface); color: var(--flo-ink); border: 1px solid var(--flo-border); border-radius: var(--flo-radius-lg); box-shadow: var(--flo-shadow-lg);
}
.flo-bell__panel[hidden] { display: none; }
.flo-bell__head { display: flex; align-items: center; justify-content: space-between; gap: var(--flo-space-3); padding: var(--flo-space-3) var(--flo-space-4); border-bottom: 1px solid var(--flo-border); }
.flo-bell__body { overflow-y: auto; flex: 1; }
.flo-bell__empty { margin: 0; padding: var(--flo-space-6) var(--flo-space-4); color: var(--flo-ink-soft); text-align: center; max-width: none; }
.flo-bell__foot { display: flex; justify-content: space-between; gap: var(--flo-space-3); padding: var(--flo-space-3) var(--flo-space-4); border-top: 1px solid var(--flo-border); font: var(--flo-text-small); }
.flo-bell__foot a { color: var(--flo-accent); }

/* Item (sino e caixa de entrada) */
.flo-notif-list { list-style: none; margin: 0; padding: 0; }
.flo-notif { position: relative; display: flex; align-items: flex-start; gap: var(--flo-space-3); padding: var(--flo-space-3) var(--flo-space-4); border-bottom: 1px solid var(--flo-border); background: var(--flo-surface); --flo-notif-color: var(--flo-ink-soft); }
.flo-notif:last-child { border-bottom: 0; }
.flo-notif--info { --flo-notif-color: var(--flo-accent); }
.flo-notif--success { --flo-notif-color: var(--flo-success); }
.flo-notif--warning { --flo-notif-color: var(--flo-warning); }
.flo-notif--danger { --flo-notif-color: var(--flo-danger); }
.flo-notif.is-unread { background: color-mix(in srgb, var(--flo-notif-color) 7%, var(--flo-surface)); box-shadow: inset 3px 0 0 var(--flo-notif-color); }
.flo-notif.is-resolved { opacity: 1; }
.flo-notif.is-resolved .flo-notif__title { text-decoration: line-through; text-decoration-thickness: 1px; }
.flo-notif__link { display: flex; align-items: flex-start; gap: var(--flo-space-3); flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.flo-notif__link:hover .flo-notif__title { text-decoration: underline; }
.flo-notif__icon { flex: none; display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; background: color-mix(in srgb, var(--flo-notif-color) 14%, transparent); color: var(--flo-notif-color); }
.flo-notif__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.flo-notif__title { font-weight: 600; color: var(--flo-ink); overflow-wrap: anywhere; }
.flo-notif__body { color: var(--flo-ink); font: var(--flo-text-small); overflow-wrap: anywhere; }
.flo-notif__time { color: var(--flo-ink-soft); font: var(--flo-text-caption); }
.flo-notif__time strong { color: var(--flo-ink); }

/* Caixa de entrada */
.flo-notif-tools { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--flo-space-3) var(--flo-space-4); margin-bottom: var(--flo-space-4); }
.flo-notif-filters { display: flex; flex-wrap: wrap; gap: var(--flo-space-3); }
.flo-notif-filters .flo-field { margin: 0; min-width: 180px; }
.flo-notif-actions { display: flex; flex-wrap: wrap; gap: var(--flo-space-2); align-items: center; }
.flo-notif-count { margin: 0 0 var(--flo-space-2); color: var(--flo-ink-soft); font: var(--flo-text-small); max-width: none; }
.flo-notif-list--page { border: 1px solid var(--flo-border); border-radius: var(--flo-radius-md); overflow: hidden; }
.flo-notif-list--page .flo-notif { align-items: center; flex-wrap: wrap; }
.flo-notif-list--page .flo-notif__text { flex: 1 1 240px; }
.flo-notif-pager { display: flex; align-items: center; justify-content: center; gap: var(--flo-space-4); margin-top: var(--flo-space-4); }
#notif-body[aria-busy="true"] { opacity: 1; }

/* Preferências */
.flo-notif-prefs { display: grid; gap: var(--flo-space-6); grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); align-items: start; }
@media (max-width: 900px) { .flo-notif-prefs { grid-template-columns: minmax(0, 1fr); } }
.flo-notif-type { margin-bottom: var(--flo-space-2); }
.flo-notif-type .flo-help { display: block; margin: 0; padding-left: 26px; }
.flo-notif-status { font-weight: 600; margin: 0 0 var(--flo-space-3); }
.flo-notif-devices [data-push-note] { margin-bottom: var(--flo-space-3); }
.flo-notif-devices .flo-notif-actions { margin-bottom: var(--flo-space-3); }
.flo-card__subtitle { margin: var(--flo-space-5) 0 var(--flo-space-2); font: var(--flo-text-h4, 600 1rem/1.3 var(--flo-font-body)); }
.flo-notif-devicelist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--flo-space-2); }
.flo-notif-devicelist li { display: flex; align-items: center; justify-content: space-between; gap: var(--flo-space-3); padding: var(--flo-space-3); border: 1px solid var(--flo-border); border-radius: var(--flo-radius-md); }
.flo-notif-devicelist li > div { display: flex; flex-direction: column; min-width: 0; }
.flo-notif-none { color: var(--flo-ink-soft); margin: 0; }
