/* Alertas flutuantes de sucesso, informação, aviso e erro, em todas as telas. */
.flash-stack { position: fixed; top: 20px; right: 20px; z-index: 1000; display: grid; gap: 10px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.flash { --flash-accent: #2f6fd0; --flash-bg: #fff; --flash-text: #1f2933; display: flex; align-items: flex-start; gap: 12px; padding: 14px 12px 14px 16px; border: 1px solid #d9dde3; border-left: 4px solid var(--flash-accent); border-radius: 8px; background: var(--flash-bg); color: var(--flash-text); box-shadow: 0 10px 30px #0f172a29; font-size: .875rem; line-height: 1.5; pointer-events: auto; animation: flash-in .2s ease-out; }
.flash > .icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; color: var(--flash-accent); }
.flash p { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.flash-body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.flash-body .errorlist { margin: 0; padding-left: 18px; }
.flash-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.flash-links a { text-decoration: underline; }
dialog .flash-stack { position: fixed; }
.flash--success { --flash-accent: #1f8a5b; }
.flash--warning { --flash-accent: #b7791f; }
.flash--error { --flash-accent: #c53043; }
.flash-close { display: inline-grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; margin: -4px 0 -4px 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: inherit; opacity: .7; cursor: pointer; }
.flash-close:hover { opacity: 1; background: #0000000d; }
.flash-close:focus-visible { outline: 2px solid var(--flash-accent); outline-offset: 2px; }
.flash-close .icon { width: 16px; height: 16px; }
.flash.is-leaving { opacity: 0; transform: translateX(16px); transition: opacity .2s, transform .2s; }
:root[data-theme="dark"] .flash { --flash-bg: #1f1f22; --flash-text: #f0f0f1; border-color: #3a3a3e; box-shadow: 0 10px 30px #0009; }
:root[data-theme="dark"] .flash--info { --flash-accent: #6ea8fe; }
:root[data-theme="dark"] .flash--success { --flash-accent: #4cc38a; }
:root[data-theme="dark"] .flash--warning { --flash-accent: #f2b84b; }
:root[data-theme="dark"] .flash--error { --flash-accent: #ff7b8a; }
:root[data-theme="dark"] .flash-close:hover { background: #ffffff14; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } .flash.is-leaving { transition: none; } }
@media (max-width: 600px) { .flash-stack { top: 12px; right: 16px; left: 16px; width: auto; } }
