/* ---------------------------------------------------------------- Modais e avisos */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 14, 12, .28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(520px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border-radius: var(--r-xl);
  padding: 24px;
  background: var(--surface-strong);
  animation: surgir .3s var(--ease);
}
@keyframes surgir { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.modal h2 { margin-bottom: 8px; }
.modal .corpo { color: var(--text-2); display: flex; flex-direction: column; gap: 14px; }
.modal .rodape { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.modal.folha { width: min(560px, 100%); }
@media (max-width: 640px) {
  .overlay { place-items: end center; padding: 0; }
  .modal { width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
.check-linha { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--text); font-size: 14.5px; }
.check-linha input { width: 18px; height: 18px; accent-color: var(--accent); }

#toast-root { position: fixed; left: 50%; top: calc(var(--topbar-h) + env(safe-area-inset-top) + 12px); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 550; display: flex; align-items: center; gap: 8px; animation: surgir .3s var(--ease); background: var(--surface-strong); }
.toast .i { color: var(--accent); }
.toast.erro .i { color: var(--danger); }

.menu { position: absolute; z-index: 30; min-width: 240px; border-radius: var(--r); padding: 6px; background: var(--surface-strong); }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; text-align: left; font-size: 14px; }
.menu button:hover { background: var(--accent-soft); }
