/* ============================================================
   notifications.css — toasts + sino de notificações
   ============================================================ */

/* ── Toasts (canto inferior-direito) ─────────────────────────── */
.toast-host {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-width: min(380px, calc(100vw - 2.5rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--ink-2, #16161f);
  border: 1px solid var(--wire-2, #ffffff28);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(0.5rem) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.visible { opacity: 1; transform: translateY(0) scale(1); }
.toast.leaving { opacity: 0; transform: translateY(0.5rem) scale(0.98); }

.toast-icon { flex-shrink: 0; margin-top: 0.05rem; }
.toast-error .toast-icon { color: #f87171; }
.toast-success .toast-icon { color: #4ade80; }
.toast-info .toast-icon { color: var(--amber, #f5a623); }

.toast-body { flex: 1; min-width: 0; }
.toast-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text, #e8e8f0);
  margin-bottom: 0.15rem;
}
.toast-msg {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-2, #b8b8cc);
}
.toast-actions { margin-top: 0.5rem; }
.toast-retry {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--amber, #f5a623);
  background: color-mix(in srgb, var(--amber, #f5a623) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber, #f5a623) 35%, transparent);
  border-radius: 7px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: background 0.15s;
}
.toast-retry:hover { background: color-mix(in srgb, var(--amber, #f5a623) 20%, transparent); }

.toast-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-3, #888898);
  cursor: pointer;
  padding: 0.1rem;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
}
.toast-close:hover { color: var(--text, #e8e8f0); background: var(--ghost, #ffffff0d); }

@media (max-width: 600px) {
  .toast-host {
    bottom: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    max-width: none;
  }
}

/* ── Sino na nav ─────────────────────────────────────────────── */
.notif-wrap { position: relative; display: inline-flex; }
.notif-bell {
  position: relative;
  background: transparent;
  border: 1px solid var(--wire, #ffffff1e);
  border-radius: 8px;
  color: var(--text-2, #b8b8cc);
  cursor: pointer;
  padding: 0.4375rem 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.notif-bell:hover { color: var(--text, #e8e8f0); border-color: var(--wire-2, #ffffff28); background: var(--ghost, #ffffff0d); }

.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--ink, #0a0a0f);
}

.notif-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 340px;
  max-width: calc(100vw - 2rem);
  max-height: 420px;
  overflow: hidden;
  background: var(--ink-2, #16161f);
  border: 1px solid var(--wire-2, #ffffff28);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: none;
  flex-direction: column;
  z-index: 200;
}
.notif-panel.open { display: flex; }

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--wire, #ffffff1e);
}
.notif-panel-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text, #e8e8f0);
}

.notif-list { overflow-y: auto; max-height: 360px; }
.notif-empty {
  padding: 2rem 1rem;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8125rem;
  color: var(--text-3, #888898);
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--wire, #ffffff12);
  position: relative;
}
.notif-item.unread { background: color-mix(in srgb, var(--amber, #f5a623) 6%, transparent); }
.notif-item.unread::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 1.1rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber, #f5a623);
}
.notif-item-icon { flex-shrink: 0; margin-top: 0.1rem; }
.notif-item-icon.notif-error { color: #f87171; }
.notif-item-icon.notif-success { color: #4ade80; }
.notif-item-icon.notif-info { color: var(--amber, #f5a623); }

.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text, #e8e8f0);
  margin-bottom: 0.1rem;
}
.notif-item-msg {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-2, #b8b8cc);
}
.notif-item-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.35rem;
}
.notif-item-time {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  color: var(--text-3, #888898);
}
.notif-retry {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--amber, #f5a623);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.notif-retry:hover { text-decoration: underline; }

.notif-item-dismiss {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-3, #888898);
  cursor: pointer;
  padding: 0.1rem;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}
.notif-item:hover .notif-item-dismiss { opacity: 1; }
.notif-item-dismiss:hover { color: var(--text, #e8e8f0); }

.notif-mark-read {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-3, #888898);
  background: transparent;
  border: none;
  cursor: pointer;
}
.notif-mark-read:hover { color: var(--amber, #f5a623); }